-
Notifications
You must be signed in to change notification settings - Fork 2.8k
refactor: Pair of lists to list of pairs in update changes #5681
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?
Conversation
…s (adjust use sites)
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
Welcome @bachorp! |
Hi @bachorp. 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 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-sigs/prow repository. |
Maybe. Hard to say where this refactoring will provide benefits or not. Most likely yes. Greater Encapsulation - definately something nice to have. If this will be accepted, I think we should first made a decision about following PRs |
This refactor makes sense to me. |
/ok-to-test |
Was it tested on real cluster? No changes detected? |
No. I could most probably do so in a couple weeks. |
PR needs rebase. 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. |
@bachorp We will release next week. If you can test (and rebase) this PR before, maybe it will make it. Otherwise it will be for the next release. |
@mloiseleur Thanks for the info! I just shaved off a few patches that could make it into this week's release. For the main part I would then target the one afterwards. |
What does it do ?
This patch set refactors the
Changes
struct to reflect the relationship ofUpdateOld
andUpdateNew
.Interestingly, there is one test case,
TestApplyRecordsOnEncryptionKeyChangeWithKeyIdLabel
, that does not work under the new regime, which hints at some other problem with either the test case or the implementation.If need be, this PR can be split into a sequence of PRs, depending on maintainer feedback.
Motivation
New and Old parts of updates cannot be treated independently. Pairing corresponding
Endpoint
objects guarantees that matching parts will stick together. This allows for simpler code at use sites ofChanges
(mainlyProvider.ApplyChanges
) and evades some class of indexing bugs such as #5542.More