-
Notifications
You must be signed in to change notification settings - Fork 330
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
azure_rm_galleryimageversion_info throwing an exception when there are no versions #1434
Comments
@christianmasopust Thank you for submitting the problem. It has fixed in #1436! |
wow.... that was fast... Thanks a lot! |
@Fred-sun Are you sure about the fix? I've tried it here (now with collection version 2.2.0) but it still does not work. Looking at the "item" in function format_item shows that it always has some content, when there is no version found the item is: {'value': []} And, I'm not sure that format_item should return None. If it does, the result of azure_rm_galleryimageversion_info would be: ok: [localhost] => {
"gallery_image_version_info": {
"changed": false,
"failed": false,
"versions": [
null
]
}
} and that would give 1 as the length of the versions list |
A similar issue is when trying to get the image version information of a none existing version, here (with the above fix) it would return: ok: [localhost] => {
"gallery_image_version_info": {
"changed": false,
"failed": false,
"versions": null
}
} which also may be wrong. shouldn't "versions" then be an empty list instead of null? |
@christianmasopust Did you update to the branch you changed in #1346? This change is still under review and has not been released, if you want to test, please update the #1346 branch code test, thank you! |
SUMMARY
azure_rm_galleryimageversion_info is failing with the following exception when there are no versions created for an image:
ISSUE TYPE
COLLECTION VERSION
2.1.1
OS / ENVIRONMENT
RHEL 9
STEPS TO REPRODUCE
query image version of an image that don't have versions created so far
EXPECTED RESULTS
empty list?
ACTUAL RESULTS
Exception thrown
The text was updated successfully, but these errors were encountered: