-
Notifications
You must be signed in to change notification settings - Fork 1.2k
✨ Allow non-blocking retrieval of informers #2371
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
✨ Allow non-blocking retrieval of informers #2371
Conversation
Hi @maxsmythe. 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/test-infra repository. |
/ok-to-test |
/retest-required |
@alvaroaleman comments should be addressed |
812a6a7
to
6b4eab6
Compare
rebased. @alvaroaleman @vincepri, let me know what approach you'd like to see for the unit tests, per this thread: |
6b4eab6
to
035e41e
Compare
Rebased again. @alvaroaleman @vincepri Any further feedback? AFACT all threads are closed and/or awaiting feedback. |
bump @vincepri do you mind reviewing this again? Thanks in advance! |
55409c7
to
fc500cc
Compare
@maxsmythe looks like there is something slightly of with the unit test. (I'll take a closer look later, I had it working yesterday) |
@sbueringer It looks like there are multiple possible structures for the underlying object:
I'm inferring this from controller-runtime/pkg/cache/cache.go Lines 267 to 301 in 304027b
We could make |
Ah yup makes sense. I probably didn't test all variants somehow.
+1 Sounds like the best option (feel free to squash directly) |
@maxsmythe Do you have time to address the issue? (context: would be nice to get this PR into the upcoming v0.16 release) |
Yep! Sorry, was out Friday, aiming to push something in the next ~hour |
No worries, thank you! |
ae5f4bb
to
4018c2e
Compare
For sure! Took a bit longer than an hour... still needed to get around golang's visibility restrictions, and was unable to do that without turning |
40519bf
to
2aa20a6
Compare
@maxsmythe: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
@sbueringer unit tests pass |
Perfect. Thank you very much! /lgtm /assign @alvaroaleman @vincepri |
pull-controller-runtime-apidiff job seems still failing |
This is expected behavior. Not sure if we should flag this PR as a breaking change as we're just adding a vararg so it doesn't break anyone using the changed funcs. |
I see. In such case, apidiff job failure is acceptable to merge a PR. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman, maxsmythe 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 |
Thanks for sticking to it and getting this done, @maxsmythe ! |
Thank you for the reviews! |
This PR is split off from #2285
It allows users to retrieve an informer before an informer has finished bootstrapping. This is valuable as it allows users to add/remove listeners without waiting for the informer to be ready. Since a listener is a passive observer of events, it does not require the informer to be fully initialized. Not waiting for full initialization can improve bootstrapping times and enable more flexibility with how dynamic watches are handled.