🐛fix(controller): support WaitForSync in custom TypedSyncingSource#3084
🐛fix(controller): support WaitForSync in custom TypedSyncingSource#3084k8s-ci-robot merged 2 commits intokubernetes-sigs:mainfrom
Conversation
There is already support for defining `TypedSyncingSource` but the original code still checks for the original `SyncingSource` before callign `WaitForSync(ctx)` which does not work for custom typed controller. this fix should be backported to v0.19
|
Hi @tareksha. 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. DetailsInstructions 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. |
| return | ||
| } | ||
| syncingSource, ok := watch.(source.SyncingSource) | ||
| syncingSource, ok := watch.(source.TypedSyncingSource[request]) |
There was a problem hiding this comment.
Oh wow, good catch. Mind adding a tiny test that validates that WaitForSync gets called for a TypedSyncingSource?
|
/ok-to-test |
alvaroaleman
left a comment
There was a problem hiding this comment.
Thanks!
/cherrypick release-0.20
|
LGTM label has been added. DetailsGit tree hash: f5d3b69cb9e3224d603a42a547efc0c8eaa95d7d |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman, tareksha The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/cherrypick release-0.20 |
|
@alvaroaleman: new pull request created: #3086 DetailsIn 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-sigs/prow repository. |
|
hi @alvaroaleman we need the fix in v0.19 too |
|
/cherrypick release-0.19 |
|
@sbueringer: #3084 failed to apply on top of branch "release-0.19": DetailsIn 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-sigs/prow repository. |
|
@tareksha Feel free to open a manual cherry-pick PR for release-0.19 |
…ubernetes-sigs#3084) * 🐛fix(controller): use generic WaitForSync There is already support for defining `TypedSyncingSource` but the original code still checks for the original `SyncingSource` before callign `WaitForSync(ctx)` which does not work for custom typed controller. this fix should be backported to v0.19 * test
@sbueringer done #3087 |
The code that calls
WaitForSync(ctx)checks for the originalSyncingSource. This does not work for custom typed controllers whereTypedSyncingSourceis passed with a type parameter other thanreconcile.Request.this fix should be backported to v0.20 and v0.19