-
Notifications
You must be signed in to change notification settings - Fork 40.9k
feat(validation-gen): support validation ratcheting for list #132469
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
base: master
Are you sure you want to change the base?
feat(validation-gen): support validation ratcheting for list #132469
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: yongruilin The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cc @aaron-prindle @jpbetz @thockin |
6874397
to
fb477ed
Compare
Co-authored-by: Yongrui Lin <[email protected]>
- identify listtype=set and store in shared listMetadata - pass in cmp for lookup in eachVal - add validate.SemanticDeepEqual as cmpArg for non-comparable args
Co-authored-by: Yongrui Lin <[email protected]>
- Only use simple comparison for built-in types
- Introduced SliceFalselyComparableField to Struct and ImmutableStruct - Updated validation logic to handle unique and deep equality checks for falsely comparable structs - Enhanced test cases to validate the new field's behavior
- Updated EachSliceVal to support a match function and an equivalence comparison function, enhancing its flexibility for validation. - Adjusted related validation logic and tests to utilize the new structure, ensuring backward compatibility and improved validation accuracy.
fb477ed
to
2cf7f44
Compare
This PR may require API review. If so, when the changes are ready, complete the pre-review checklist and request an API review. Status of requested reviews is tracked in the API Review project. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR adds support validation ratcheting for list.
The commits cherry-picked here, have been reviewed and merged in dev repo.
Which issue(s) this PR is related to:
Ref:
Special notes for your reviewer:
The related KEP has been merged:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: