-
Notifications
You must be signed in to change notification settings - Fork 12
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
Change STO/SGO bundles sanity check #595
Change STO/SGO bundles sanity check #595
Conversation
stdout for "oc image info" should be checked instead of the rc to make sure that the correct bundle is being used
- name: Fail is the expected STO bundle was not correctly fetched | ||
ansible.builtin.fail: | ||
msg: "The requested STO bundle couldn't be retrieved from the bundle registry. Check configuration for the bundles registry and retry." | ||
when: "__service_telemetry_bundle_image_path not in sto_bundle_info.stdout" |
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.
Regarding verbosity, this check is the same as the assert below.
You could update the message for assert to list the failed bundle.
Something like:
fail_msg:
"The requested bundle(s) ({% if __service_telemetry_bundle_image_path not in sto_bundle_info.stdout %}STO{%endif%}, {% if __smart_gateway_bundle_image_path not in sto_bundle_info.stdout %}SGO{%endif%}) couldn't be retrieved..."
i.e. use jinja2 templating to add in the name of the bundles(s) that weren't retrievable to the task in L98.
I'm assuming that you wanted to add these tests here so that there is a useful message to tell you which bundle was missing.
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.
Thanks for the review Emma. I opted for dropping the assertion altogether and just stick with the fail checks. Also, kept the debug, I think it's useful info.
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.
That's fair. looks good
Make checks simpler and more granular by using the fail module instead of the assertion for each of the bundles.
- name: Fail is the expected STO bundle was not correctly fetched | ||
ansible.builtin.fail: | ||
msg: "The requested STO bundle couldn't be retrieved from the bundle registry. Check configuration for the bundles registry and retry." | ||
when: "__service_telemetry_bundle_image_path not in sto_bundle_info.stdout" |
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.
That's fair. looks good
Co-authored-by: Chris Sibbitt <[email protected]>
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/91d91f7953684c4fbd72a3b427464219 ✔️ stf-crc-ocp_412-local_build SUCCESS in 36m 30s |
recheck |
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/0bca4b8e27334cae80e388dfa59ecd25 ✔️ stf-crc-ocp_412-local_build SUCCESS in 36m 16s |
recheck |
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/a77a4dcb9f614e01a9ec595b6f042109 ✔️ stf-crc-ocp_412-local_build SUCCESS in 35m 26s |
stdout for "oc image info" should be checked instead of the rc to make sure that the correct bundle is being used