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
Propagate HasSynced properly #113985
Propagate HasSynced properly #113985
Conversation
Please note that we're already in Test Freeze for the Fast forwards are scheduled to happen every 6 hours, whereas the most recent run was: Thu Nov 17 21:25:15 UTC 2022. |
OK shockingly this is now a local change that doesn't break the world! I'd like feedback on the names before I fix all the comments? |
I'm gonna be out next week, so this will be on hold for a bit unless I feel especially inspired |
(I was feeling inspired, all this needs now is more tests and a use of the AsyncTracker. And to be squashed.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this out with some of the rests from the original issues, passes with handler.HasSync
checked 👍 👍
Great news, then! We can probably get this ready to go next week when I'm back. |
Wow, looking forward to this PR being merged. If possible, consider cherry-picking client-go v1.22 and later. 🎉🎉🎉 👍🏻👍🏻👍🏻 |
The interface lgtm now, the logic looks fine. I'm concerned about how we'll know if we've done something incorrect with the sync tracker without any error and without a panic. This code is used to ensure to synchronization of resources used for server safety and as it stands now, if we had a significant bug, we could improperly report "synchronized==true" without any reporting or failure. I think that panicking is a better outcome in that case than silently being unsafe in a way that we have no detection for. |
/lgtm holding for other reviewers. |
* Add tracker types and tests * Modify ResourceEventHandler interface's OnAdd member * Add additional ResourceEventHandlerDetailedFuncs struct * Fix SharedInformer to let users track HasSynced for their handlers * Fix in-tree controllers which weren't computing HasSynced correctly * Deprecate the cache.Pop function
75e2a9e
to
8100efc
Compare
squashed/rebased |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alexzielenski, lavalamp, 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 |
/retest |
1 similar comment
/retest |
This is a concerning amount of flakes, but they don't appear related to this PR. /retest |
/lgtm |
/hold cancel |
Fix #113763 by:
/kind bug
What this PR does / why we need it:
Plumbs the fact of whether an item was in the initial list or not to controllers, where they can choose to track whether they have processed it or not.
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: