-
Notifications
You must be signed in to change notification settings - Fork 23
Add step to update spack-packages repo during snapshot #1117
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
|
I am not sure if this is the correct place to do this, but we can relocate the logic as needed. A few questions I had while looking at this.
|
| old_date = py_gh_repo.get_commit(old_sha).commit.committer.date | ||
| new_date = py_gh_repo.get_commit(tag.sha).commit.committer.date | ||
| # The if new sha is older than the old sha, don't update | ||
| if old_date > new_date: |
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.
I think this is safe since all commits going into develop are going to be merge commits.
|
|
||
| spackages_repo = py_github.get_repo("spack/spack-packages", lazy=True) | ||
| # Create the PR | ||
| pr = spackages_repo.create_pull( |
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.
Should this get an urgent tag?
| ) | ||
| last_commit = pr.get_commits()[pr.commits - 1] | ||
| # Trigger a rebuild everything on the PR to be reviewed by maintainers | ||
| pr.create_comment("@spackbot rebuild everything", last_commit, "", 0) |
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.
I think this should work with the urgent tag, but I am not sure about timing of the events sent to spackbot and the periodicity of the sync script.
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.
Use a label to denote a different branch name scheme to use for this type of CI.
45c292c to
98f5210
Compare
69984f1 to
12bc5fa
Compare
12bc5fa to
18e896b
Compare
18e896b to
83e25da
Compare
8736756 to
dc77769
Compare
Buildcache-tools image provides tools for multiple build cache operations. validate-index, publish (to top level), snapshot
| type=int, | ||
| default=2, | ||
| default=3, | ||
| help=("Target layout version to publish (either 2 or 3, defaults to 2)"), |
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.
| help=("Target layout version to publish (either 2 or 3, defaults to 2)"), | |
| help=("Target layout version to publish (either 2 or 3, defaults to 3)"), |
| if isinstance(project, str): | ||
| project = GL.projects.get(project, lazy=True) | ||
|
|
||
| pipeline = project.pipelines.list(get_all=False, per_page=1, ref=branch, status="success") |
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.
Note that we're relying on default behavior here, which is to sort by pipeline ID, descending.
I think this is the right thing to do; the only other applicable option would be updated_at.
Add spack-package update to snapshot cron.