OCPBUGS-90570: Reject non-empty checksum for OCI images#501
Conversation
* Reject non-empty checksum for OCI images GetChecksum() made checksums optional for OCI images but never rejected a non-empty checksum. This causes the webhook to accept invalid configurations where both oci:// scheme and a checksum are provided, leading to confusing provisioning failures. Signed-off-by: mabulgu <mabulgu@gmail.com> * Address review: move OCI check before live-iso and improve error message Move the OCI checksum validation before the live-iso early return to prevent bypassing the check with oci:// + live-iso + non-empty checksum. Include field context in the error message for better user guidance. Signed-off-by: mabulgu <mabulgu@gmail.com> --------- Signed-off-by: mabulgu <mabulgu@gmail.com>
|
@mabulgu: This pull request references Jira Issue OCPBUGS-90570, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn 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 openshift-eng/jira-lifecycle-plugin repository. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mabulgu The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/jira refresh |
|
@mabulgu: This pull request references Jira Issue OCPBUGS-90570, which is invalid:
Comment DetailsIn 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 openshift-eng/jira-lifecycle-plugin repository. |
|
/jira refresh |
|
@mabulgu: This pull request references Jira Issue OCPBUGS-90570, which is valid. The bug has been moved to the POST state. 7 validation(s) were run on this bug
Requesting review from QA contact: DetailsIn 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 openshift-eng/jira-lifecycle-plugin repository. |
|
/retest |
|
@mabulgu: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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-sigs/prow repository. I understand the commands that are listed here. |
OCPBUGS-84305: Reject non-empty checksum for OCI images
Cherry-pick of upstream metal3-io#3186 to release-4.22.
GetChecksum()made checksums optional for OCI images but never rejected a non-empty checksum. This causes the webhook to accept invalid configurations where bothoci://scheme and a checksum are provided, leading to confusing provisioning failures.This fix:
spec.image.checksumwhen anoci://URL is used, returning a clear error messageoci://+live-iso+ non-empty checksum