-
Notifications
You must be signed in to change notification settings - Fork 519
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
pubsys: raise messages to 'warn' if AMI exists or repo doesn't #1708
Conversation
Thanks! I run into this pretty often when rebuilding without a new commit. The other thing that gets me is when a repo doesn't exist, but it's actually supposed to be there and I've used It's easy to end up building what I intend to be two or three updates for testing purposes, but the final repo only has one because pubsys isn't able to fetch existing content to merge. |
That makes sense, I'll look at making that a warning in this PR as well. |
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 doesn't block this but I was actually thinking that pubsys should error out when the AMI name exists and have an --overwrite flag. Our Makefile.toml could offer a PUBSYS_OVERWRITE option to exercise that flag. In the past, not-overwriting an existing AMI has been costly in test scenarios. Now I name every AMI with a UUID. |
During development, if you make changes without committing, pubsys will see that an AMI exists for your (-dirty) commit and not register a new one. Similarly, if you have a repo configured in Infra.toml and expect to be updating it, but it doesn't exist, pubsys will create a new one. You may not want to continue testing in these cases if you thought a new AMI was going to be built, or an existing repo updated, with your recent changes. Raise these to 'warn' level so they're more obvious.
^ This push also warns if a repo you're probably trying to update (because you have it configured in Infra.toml) doesn't exist. Updated testing.
I'm sympathetic to this, particularly because we already fail if the repo target directory exists, but I think we should probably consider it separately. |
Description of changes:
Testing done:
First
cargo make ami
OK:Second
cargo make ami
WARN:If a configured repo doesn't exist to update in
cargo make repo
:If it does exist:
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.