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

AWS: Add a warning when the filter returns >1 imgs #39

Merged
merged 1 commit into from
Nov 10, 2024

Conversation

JAVGan
Copy link
Contributor

@JAVGan JAVGan commented Nov 8, 2024

The AWSService method get_image_filters expects the result to be unique, as it will blindly return the first element of the list.

This commit adds a warning to log the case which the filter didn't return a list of single image.

@JAVGan
Copy link
Contributor Author

JAVGan commented Nov 8, 2024

@lslebodn @rohanpm PTAL

Copy link

@lslebodn lslebodn left a comment

Choose a reason for hiding this comment

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

I would add similar warning also to get_snapshot_by_name

cloudimg/aws.py Outdated
amis = [x['ImageId'] for x in images]
log.warning(
"Filtered more than one image: %s",
",".join(amis),
Copy link

Choose a reason for hiding this comment

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

Suggested change
",".join(amis),
", ".join(amis),

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

The `AWSService` method `get_image_filters` expects the result to be
unique, as it will blindly return the first element of the list.

This commit adds a warning to log the case which the filter didn't
return a list of single image.
@lslebodn
Copy link

lslebodn commented Nov 9, 2024

I would add similar warning also to get_snapshot_by_name

@JAVGan please add ^^ as well.

@rohanpm rohanpm merged commit 1df18a2 into release-engineering:master Nov 10, 2024
4 of 5 checks passed
@JAVGan
Copy link
Contributor Author

JAVGan commented Nov 11, 2024

I would add similar warning also to get_snapshot_by_name

@JAVGan please add ^^ as well.

Added on #41

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.

3 participants