-
Notifications
You must be signed in to change notification settings - Fork 20
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
Cron job to start rebuild everything pipelines #845
base: main
Are you sure you want to change the base?
Conversation
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.
Thanks for taking a stab at this @kwryankrattiger! Just curious if you saw the similar thing @zackgalbreath did here, which does much the same, but seems a little simpler. I know in this case you're pushing directly to gitlab, so you'd have to verify whether a similar api is available in the python-gitlab
package.
|
||
|
||
@contextmanager | ||
def chworkingdir(path): |
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.
Did you look at the one provided by contextlib
? Maybe you don't need to write your own.
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.
It would have to be something like with tempdir.TemporaryDirectory() as workingdir, contextmanager.chdir(workingdir)
which I didn't like. The one I have lets be choose whether to chdir to a temp dir or a persistent dir which was nice to test this locally.
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 did the something similar for testing protected publish locally, this is how I avoided forcing use of a temporary directory.
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 see, the way yield works is still a bit of magic to me, I didn't know I could construct it, return the yielded result, and use it in a with clause. 🪄
setup_repo(args.pull_remote, args.push_remote, args.pull_branch) | ||
|
||
if args.tag: | ||
subprocess.run(["git", "tag", args.push_branch], check=True) |
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 you may need an annotated tag object. I feel like Zack ran into something like that when pushing the develop snapshot tags.
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.
It is here for potentially changing this to tag develop and push the new tag on the currently running develop, or push a new develop. I am not sure what is better.
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'm not sure I know what you mean. I'm was just wondering if the git tag
needed a -a
.
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.
oh, this isn't for a release or anything so I don't think there is a need to add any annotations. These also only get pushed to gitlab, so they are opaque to the world.
I decided not to use the API because I wanted to try pushing the latest develop on github and it seemed simpler to me to just use git commands directly. I was back and forth on making this a bash script, but it was easier to just use some of the existing bits from |
I didn't see that, but I used the gitlab API for the pruner. I didn't for this because I didn't need the pagination or API requests and this works no matter where the remotes are located since it just takes source, dest, from branch, to branch/tag. Not direct deps on gh or gl. |
Cron job that starts rebuild everything on a new branch dedicated to rebuilding everything. The branch gets tagged with a date stamp for tracking purposes.
I think we can add these to the list of pruning activities we do with snapshot pruning.
Pre-requisite spack CI change, spack/spack#44200
cc: @scottwittenburg