-
Notifications
You must be signed in to change notification settings - Fork 111
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
scripts/ami-copy-regions: Try waiting on all AMIs #341
scripts/ami-copy-regions: Try waiting on all AMIs #341
Conversation
(Tested lightly locally) |
/hold |
19c04c7
to
c688961
Compare
/hold cancel Now tested better |
scripts/ami-copy-regions
Outdated
# this could take a long time, but in practice EC2 parallelizes | ||
# so this way we avoid failing if the first image or two happens | ||
# to take too long. | ||
for _ in range(1): |
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.
Maybe this is a really dumb question but what's the point of this line?
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.
The comment above was attempting to explain that.
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 except I meant range(2)
here...fixed.
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.
This by the way is why we have code review 😄
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.
Yeah, I was slightly confused and thought you were trying to do something magical with a single loop that I wasn't aware of 😄
The copying seems to have added ~14 minutes to the job run, which I guess is normal given that one upload in the cloud
job takes about the same time.
- Unbuffer stdout so stderr isn't confusingly first - Use a tuple instead of dict so that we can add the AMIs to a set - Try a --dry-run first so that we verify we have permissions (this may be the issue?) - Finally and perhaps most importantly, wait for every AMI at least once. This way if the first one is slow, we'll move on to the next.
c688961
to
e688e5c
Compare
/lgtm |
(this may be the issue?)
least once. This way if the first one is slow, we'll move
on to the next.