-
Notifications
You must be signed in to change notification settings - Fork 541
OCPBUGS-32158: Add CEL validation for RegistrySources in Image API #1859
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
OCPBUGS-32158: Add CEL validation for RegistrySources in Image API #1859
Conversation
@muraee: This pull request references Jira Issue OCPBUGS-32158, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. 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 openshift-eng/jira-lifecycle-plugin repository. |
Hello @muraee! Some important instructions when contributing to openshift/api: |
/jira refresh |
@muraee: This pull request references Jira Issue OCPBUGS-32158, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira ([email protected]), skipping review request. 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 openshift-eng/jira-lifecycle-plugin repository. |
80a0f74
to
699c773
Compare
/retest-required |
699c773
to
ad2927a
Compare
/retest-required |
2 similar comments
/retest-required |
/retest-required |
/lgtm |
cc @deads2k |
looks good to me from a registry perspective 👍🏼 |
ad2927a
to
4db0990
Compare
cc @JoelSpeed @deads2k could take a look please. |
Can you please link to where this is validated in a webhook for core OCP? When was this CRD introduced into HyperShift, could there be existing resources that become broken by the addition of this CEL? |
Some code generation issues here as well, will need to rerun the CRD generation |
@JoelSpeed not sure where/if the webhook exist, I was just saying, if it exists then it won't run for Hypershift. This is validated in the MCO code directly, see: and its also mentioned on the field description Line 178 in 85dc560
|
4db0990
to
0584006
Compare
@JoelSpeed can we process with this PR, or do you want to use the |
This validation should ratchet already, what I'd like to see is a test case added that shows this. Check the |
9f8eba8
to
5cc319e
Compare
@JoelSpeed I added some tests, and adjusted the CEL to make the fields mutually exclusive, as |
5cc319e
to
79fcfda
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: csrwng, JoelSpeed, muraee 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 |
/retest-required |
2 similar comments
@muraee: The following test failed, say
Full PR test history. Your PR dashboard. 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-sigs/prow repository. I understand the commands that are listed here. |
/retest-required |
@muraee: Jira Issue OCPBUGS-32158: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-32158 has been moved to the MODIFIED state. 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 openshift-eng/jira-lifecycle-plugin repository. |
[ART PR BUILD NOTIFIER] Distgit: ose-cluster-config-api |
/cherry-pick release-4.18 |
@muraee: new pull request created: #2218 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-sigs/prow repository. |
HyperShift embeds Image config API directly, so any webhook validation will not be triggered.
This adds CEL validation to the CRD directly to mitigate that.
ref: https://issues.redhat.com/browse/OCPBUGS-32158