Skip to content

🐛markers/OneOf: make order deterministic relative to XValidation#1224

Merged
k8s-ci-robot merged 2 commits intokubernetes-sigs:mainfrom
shashankram:oneof-order
Jun 30, 2025
Merged

🐛markers/OneOf: make order deterministic relative to XValidation#1224
k8s-ci-robot merged 2 commits intokubernetes-sigs:mainfrom
shashankram:oneof-order

Conversation

@shashankram
Copy link
Contributor

@shashankram shashankram commented Jun 26, 2025

Currently, if both XValidation and AtMostOneOf/ExactlyOneOf constraints are specified, the ordering of CEL rules can change due to both sets of markers have the same apply priority. This change ensures that OneOf markers always run after XValidation markers. Without this, the generated CRD can change without any API changes, which is undesirable.

Currently, if both XValidation and AtMostOneOf/ExactlyOneOf constraints
are specified, the ordering of CEL rules can change due to both
sets of markers have the same apply priority. This change ensures that
OneOf markers always run **after** XValidation markers.
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 26, 2025
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 26, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @shashankram. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 26, 2025
@shashankram
Copy link
Contributor Author

/assign @JoelSpeed @alvaroaleman

@JoelSpeed
Copy link
Contributor

This makes sense, but I wonder, if we ever changed the XValidation priority, would we pick up on this? Is there a way to make sure in the future that the prio of this marker is always after the XValidation?

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 27, 2025
@shashankram
Copy link
Contributor Author

This makes sense, but I wonder, if we ever changed the XValidation priority, would we pick up on this? Is there a way to make sure in the future that the prio of this marker is always after the XValidation?

/ok-to-test

@JoelSpeed fixed it to make it more explicit

@JoelSpeed
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 30, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

DetailsGit tree hash: cb3589b5ca676e18a5875404a3884128907e2533

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JoelSpeed, shashankram

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

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 30, 2025
@k8s-ci-robot k8s-ci-robot merged commit b7a48d5 into kubernetes-sigs:main Jun 30, 2025
8 checks passed
@shashankram shashankram deleted the oneof-order branch June 30, 2025 15:09
alexymantha pushed a commit to alexymantha/controller-tools that referenced this pull request Jul 3, 2025
🐛markers/OneOf: make order deterministic relative to XValidation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants