redhat-openshift-ecosystem / openshift-preflight

Operator and container preflight certification tests
Apache License 2.0
60 stars 65 forks source link

Return a failure instead of an error if no pinned images are found #1197

Closed komish closed 1 month ago

komish commented 2 months ago

If no pinned images were found, we would throw an error for the CertifiedImages check, which isn't technically valid (because we didn't fail to run). This PR converts that into a failure instead. We would get the error in trying to query Pyxis for images with the provided digests. We're returning the error (not Pyxis), but we still want to catch it when returned and make sure it translates to a failure result and not a check execution error.

It also seems like this check had an older style "optional" configuration, which was to return true regardless of things that would cause this check to fail. I've now made this check's return value accurate to its execution, and allow for the "optional" tag enforce that it's non-blocking.

Finally, I've updated tests which asserted that the things would pass according to the older style of "optional". They would now fail, so the checks needed to be updated accordingly.

This check remains non-blocking for certification.

dcibot commented 2 months ago

from change https://github.com/redhat-openshift-ecosystem/openshift-preflight/pull/1197:

komish commented 2 months ago

/test 4.17-e2e

acornett21 commented 2 months ago

Just linking the logs below to show that this did not change our messaging or results

openshift-ci[bot] commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: acornett21, bcrochet, komish

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/redhat-openshift-ecosystem/openshift-preflight/blob/main/OWNERS)~~ [acornett21,bcrochet,komish] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment