-
Notifications
You must be signed in to change notification settings - Fork 40.4k
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
Make selectors atomic #97989
Make selectors atomic #97989
Conversation
Hi @Danil-Grigorev. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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/test-infra repository. |
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. |
@jpbetz Can you think of a good way to test whether this is going to break? |
@jpbetz @apelisse I added some tests covering the change. I also observed a couple of left-overs still needed to be fixed with defaulted |
The underlying mechanism was tested in kubernetes-sigs/structured-merge-diff#170 so I'd expect tests of the specific cases, like @Danil-Grigorev has added, to be sufficient for this PR. |
I've reviewed the tests. The approach of checking that adding a field of to the selector results in a conflict looks right to me. Use of /lgtm |
8624b8c
to
f073baf
Compare
Just realized I committed unwanted tests. PTAL again 😄 |
I don't know if this was already covered. Here's a list of structs that need to be marked as atomic. I opened #100131 with a bunch of tag changes. It has the struct tags and overlaps with this PR for some of the map type tags. structs that need structType=atomic:
|
This PR only included common selectors which are user faced. Some of them were not covered, as I guess there was no generate tasks for those openapi types. The plan was to include those later. Let me have a look and update missing. |
8953bdc
to
66869b0
Compare
66869b0
to
2e12d3d
Compare
/remove-sig node |
I'm pretty sure this is still lgtm, can we get the label re-applied? |
Maybe squash some of these commits together? |
Ensure that all label selectors are treated as atomic values, to exclude situations when selectors are being corrupted by different actors attempting to apply their overlapping definition for this field with server-side-apply.
52c1a75
to
d8a7764
Compare
@apelisse squashed. |
/remove-sig node |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Danil-Grigorev, liggitt 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 |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Ensure that all label selectors are treated as atomic values, to exclude situations when selectors are being corrupted by different actors attempting to apply their overlapping definition for this field with server-side-apply.
Which issue(s) this PR fixes:
Fixes #97970
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
/sig api-machinery
/wg api-expression