-
Notifications
You must be signed in to change notification settings - Fork 17
new method for ingesting tarballs via a single staging PR #232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
return EESSITaskAction.ADD | ||
elif action_str == "update": | ||
return EESSITaskAction.UPDATE | ||
return EESSITaskAction.UNKNOWN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would probably be good to, at least for now, return EESSITaskAction.ADD
here, allowing us to test/use this new functionality with the existing metadata files (which don't have an action defined yet). In the future we can make this field required and revert to UNKNOWN
..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we should work around this by returning UNKNOWN
ADD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed in b1663f1
other = [ # anything that is not in <prefix>/software nor <prefix>/modules | ||
member.path | ||
for member in members | ||
if ( | ||
not PurePosixPath(prefix).joinpath("software") in PurePosixPath(member.path).parents | ||
and not PurePosixPath(prefix).joinpath("modules") in PurePosixPath(member.path).parents | ||
) | ||
# if not fnmatch.fnmatch(m.path, os.path.join(prefix, 'software', '*')) | ||
# and not fnmatch.fnmatch(m.path, os.path.join(prefix, 'modules', '*')) | ||
] | ||
members_list = sorted(swdirs + modfiles + other) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An initial attempt to run this on some real 2025.06 tarballs (containing EB 5.1.1) ultimately resulted in the PR description not being updated anymore after it had processed four of them, probably because the message became too long. This is because it's not taking the reprod
dirs in the tarball into account, which was fixed in #235. Can be fixed here in the same way:
other = [ # anything that is not in <prefix>/software nor <prefix>/modules | |
member.path | |
for member in members | |
if ( | |
not PurePosixPath(prefix).joinpath("software") in PurePosixPath(member.path).parents | |
and not PurePosixPath(prefix).joinpath("modules") in PurePosixPath(member.path).parents | |
) | |
# if not fnmatch.fnmatch(m.path, os.path.join(prefix, 'software', '*')) | |
# and not fnmatch.fnmatch(m.path, os.path.join(prefix, 'modules', '*')) | |
] | |
members_list = sorted(swdirs + modfiles + other) | |
reprod_dirs = [ | |
member.path | |
for member in members | |
if member.isdir() and PurePosixPath(member.path).match(os.path.join(prefix, 'reprod', '*', '*', '*')) | |
] | |
other = [ # anything that is not in <prefix>/software nor <prefix>/modules nor <prefix>/reprod | |
member.path | |
for member in members | |
if ( | |
not PurePosixPath(prefix).joinpath('software') in PurePosixPath(member.path).parents | |
and not PurePosixPath(prefix).joinpath('modules') in PurePosixPath(member.path).parents | |
and not PurePosixPath(prefix).joinpath('reprod') in PurePosixPath(member.path).parents | |
) | |
# if not fnmatch.fnmatch(m.path, os.path.join(prefix, 'software', '*')) | |
# and not fnmatch.fnmatch(m.path, os.path.join(prefix, 'modules', '*')) | |
] | |
members_list = sorted(swdirs + modfiles + reprod_dirs + other) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes. I wonder if we need to be a little more aggressive about shortening/limiting the size of the description. Just thinking that we may have plenty of tarballs for GPU builds, it will require a more concise presentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed in d7952d8
This PR is based on the proof-of-concept #213. It aims at keeping only necessary code from the proof-of-concept, move the main loop into a separate script, and thus leave the existing ingestion code unchanged.
Summary of the ideas/changes/additions:
States, repository directory structure ... in a picture
High-level overview of state handler functions
_handle_add_undetermined
_handle_add_new_task
TaskState
file_handle_add_payload_staged
PAYLOAD_STAGED
in default and feature branch after it was created)PULL_REQUEST
, feature branch:APPROVED
) and create pull requestPULL_REQUEST
, feature branch:APPROVED
) and update pull requestCreating/updating a pull request will create and update a
TaskSummary.html
file and create/update the description of the pull request._handle_add_pull_request
REJECTED