-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Informer Lifecycle Improvements #97214
Informer Lifecycle Improvements #97214
Conversation
Hi @kevindelgado. 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. |
/assign @caesarxuchao |
/triage accepted |
/assign @yliaog |
82c0bbf
to
1f87ccb
Compare
/retest |
2 similar comments
/retest |
/retest |
/unassign |
// results in an appropriate error. | ||
// Please note: If, for some reason, the same handler has been added multiple | ||
// times, all registrations will be removed. | ||
RemoveEventHandler(handler ResourceEventHandler) error |
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.
the interface has changed, please sync with the latest
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.
hmm ok, it looks like it will be changing back to returning an error, I will wait until #98657 is updated to sync with latest
@kevindelgado: 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/test-infra repository. |
FYI |
Yea sorry for how slow this is moving. This PR is blocked on #98657 which is still in review and I have been trying to push it forward without much luck. Feel free to ping that PR like I have been doing to try to see if progress can be made there. |
t.Errorf("informer reports not to be stopped although stop channel closed") | ||
return | ||
} | ||
err := informer.RemoveEventHandler(listener) |
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.
RemoveEventHandler
may access handler
obj by fmt.Errorf
, so this line should be wrapped by listener.lock. or may casuse DATA RACE
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
Is this PR still needed, please rebase if so (or we can close it?) |
I think this PR is still needed because #79610 error occurs on v1.23.0 cluster created by kind. @kevindelgado |
This PR is older than 4 weeks and needs as rebase. Please rebase the PR against latest master and reopen if still needed. /close |
@dims: Closed this PR. In response to this:
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. |
@kevindelgado
|
What type of PR is this?
/kind feature
What this PR does / why we need it:
Implementation of Informer Lifecycle Managemt design doc
Discussed at the Nov 4 sig-api-machinery meeting:video
It does a few things that are broken up by commit:
RunWithStopOptions()
method on theSharedInformer
interface. It exposes running informers with stop options on the various informer factories (currently only supports global stop options that apply to all informers of an informer factory)RunWithStopOptions()
and provides a way to retrieve the stop channel for given informer to determine when an individual informer is stopped.This is tested manually by modifying controller-runtime to use the new interfaces. Also by running the resource quota controller and GC controller with the new interfaces to verify that the informer shuts down as expected.
Unit testing has been added to the relevant pieces of tools/cache and metadatainformer/dynamicinformer. Integration tests for both the garbage collector and quota controller test that the install CRD/uninstall CRD/reinstall CRD flow continues to work while the informer gets stopped and restarted as expected.
Which issue(s) this PR fixes:
Fixes #79610
Unblocks work relating to kubernetes-sigs/controller-runtime#1192
based on #98657