Skip to content
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

Add a check for an image to become 'available' #50

Merged
merged 8 commits into from
Jun 29, 2020

Conversation

KeithMnemonic
Copy link
Contributor

This patch uses the AWS waiter to add a check to ec2publishimg to
allow it to wait for an an image to become available before it
publishes the image.

This close #45

This patch uses the AWS waiter to add a check to ec2publishimg to
allow it to wait for an an image to become available before it
publishes the image.

This close SUSE-Enceladus#45
This patch uses the AWS waiter to add a check to ec2publishimg to
allow it to wait for an an image to become available before it
publishes the image.

This close SUSE-Enceladus#45
This patch uses the AWS waiter to add a check to ec2publishimg to
allow it to wait for an an image to become available before it
publishes the image.

This close SUSE-Enceladus#45

Add a check for an image to become 'available'

This patch uses the AWS waiter to add a check to ec2publishimg to
allow it to wait for an an image to become available before it
publishes the image.

This close SUSE-Enceladus#45

Fix extra blank line
Found an extra line
Copy link
Contributor

@smarlowucf smarlowucf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Only suggestion is if you do a custom waiter here where the code does the state comparison you could have a guard clause on the possible failed state that would allow the loop to exit early.

An example where I did this in Mash https://github.com/SUSE-Enceladus/mash/blob/master/mash/services/replicate/ec2_job.py#L153. Although I have no count so this code could technically get into an infinite loop.

lib/ec2imgutils/ec2publishimg.py Outdated Show resolved Hide resolved
lib/ec2imgutils/ec2publishimg.py Show resolved Hide resolved
Copy link
Contributor Author

@KeithMnemonic KeithMnemonic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think i addressed the comments from Robert and Sean. If not let me know

@KeithMnemonic
Copy link
Contributor Author

Looks good. Only suggestion is if you do a custom waiter here where the code does the state comparison you could have a guard clause on the possible failed state that would allow the loop to exit early.

An example where I did this in Mash https://github.com/SUSE-Enceladus/mash/blob/master/mash/services/replicate/ec2_job.py#L153. Although I have no count so this code could technically get into an infinite loop.

I added some code here to check for other states that should be skipped immediately. see if this is acceptable

@rjschwei rjschwei merged commit 85dc76e into SUSE-Enceladus:master Jun 29, 2020
@KeithMnemonic KeithMnemonic deleted the wait_for_image_avail branch June 29, 2020 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ec2publishimg should wait for image avialability
3 participants