Modernize API markers: Replace immutable CEL validation rules with +k8s:immutable marker - #4902
Modernize API markers: Replace immutable CEL validation rules with +k8s:immutable marker#4902chinmaychahar wants to merge 3 commits into
Conversation
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: chinmaychahar 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 |
|
|
|
Welcome @chinmaychahar! |
|
Hi @chinmaychahar. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
|
My idea is to start small and targeted with this PR. Will continue iterating once I get some review on the expectations of current changes and if I'm headed in this right direction! |
Signed-off-by: maychin <maychin@amazon.com> Signed-off-by: chinmaychahar <chinmay.cc.06@gmail.com>
ba8b38c to
512f780
Compare
|
I made a couple of changes since last review. Could you take a look? |
|
there is just a single line of change, is this correct? |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: chinmaychahar 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 |
|
Could the CI checks on this PR be triggered? Thanks! |
|
/ok-to-test |
|
Hey @rikatz, changed the PR description The +k8s:immutable marker changes the validation message from "Value is immutable" to "field is immutable", the rule itself is unchanged but verify-crdify flags it as breaking. Is the new message okay, or would you suggest a different fix? |
|
Hey @rikatz, should I increase the scope of this PR with the other rules as well? I wanted to keep it scoped for immutables for now |
|
yes please. Also run a make generate to make api verify pass. Thanks |
|
or at least, just run the make generate, and we can move to other markers on other PRs |
|
@chinmaychahar: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. |
|
make generate is done and verify-codegen passes now. verify-crdify is failing because +k8s:immutable changes the message from "Value is immutable" to "field is immutable". Any way to correct this? |
|
I think +k8s:immutable marker hardcodes its message to "field is immutable", so it can't keep the old "Value is immutable" |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Replaces the
self == oldSelfCEL XValidation rules with the controller-tools 0.21.0+k8s:immutablemarker on:GatewayClass.controllerNameXMesh.controllerNameThese are the only two occurrences of this pattern. Scoped to immutability only for now; can follow up
AtMostOneOfseparatelyWhich issue(s) this PR fixes:
Ref #4834
Does this PR introduce a user-facing change?:
Currently, the immutability validation message for
GatewayClass.spec.controllerNamechanged from "Value is immutable" to "field is immutable"