-
Notifications
You must be signed in to change notification settings - Fork 66
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
log validation errors separately in deployableByOLM check #847
log validation errors separately in deployableByOLM check #847
Conversation
Signed-off-by: Jose R. Gonzalez <jose@flutes.dev>
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.
Thank you @komish! We have now a clear error in the logs:
time="2022-12-02T20:22:55Z" level=debug msg="running check: DeployableByOLM"
time="2022-12-02T20:22:57Z" level=trace msg="reading annotations file from the bundle"
time="2022-12-02T20:22:57Z" level=debug msg="image extraction directory is /tmp/preflight-2553569998/fs"
time="2022-12-02T20:22:58Z" level=info msg="check completed: DeployableByOLM" err="the bundle cannot be deployed because deployment validation has failed: [{Name:ibm-mq.v1.3.1 Errors:[Error: Value : (ibm-mq.v1.3.1) olm.maxOpenShiftVersion csv.Annotations not specified with an OCP version lower than 4.9. This annotation is required to prevent the user from upgrading their OCP cluster before they have installed a version of their operator which is compatible with 4.9. For further information see https://docs.openshift.com/container-platform/4.8/operators/operator_sdk/osdk-working-bundle-images.html#osdk-control-compat_osdk-working-bundle-images] Warnings:[Warning: Value ibm-mq.v1.3.1: this bundle is using APIs which were deprecated and removed in v1.22. More info: https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-22. Migrate the API(s) for CRD: ([\"queuemanagers.mq.ibm.com\"])]}]" result=ERROR
@tkrishtop: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: acornett21, bcrochet, komish, tkrishtop 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:
Approvers can indicate their approval by writing |
Fixes #844
Preflight executes a pre-deployment validation on the bundle to prevent failures in deployment caused by invalid bundles.
In some cases, the validation logic would return that the bundle is invalid, but this is not considered an error in validation execution so our error returned would be
nil
, giving the user no information as to what happened in their deployment. In truth, we hadn't even deployed the bundle yet.This PR fixes this behavior, and now prints out all validation errors in the output in cases where our validation results == failed, but no error was thrown by the validation functions.
Signed-off-by: Jose R. Gonzalez jose@flutes.dev