-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
🐛fix(controller): support WaitForSync in custom TypedSyncingSource #3084
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. 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. |
@@ -200,7 +200,7 @@ func (c *Controller[request]) Start(ctx context.Context) error { | |||
sourceStartErrChan <- err | |||
return | |||
} | |||
syncingSource, ok := watch.(source.SyncingSource) | |||
syncingSource, ok := watch.(source.TypedSyncingSource[request]) |
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.
Oh wow, good catch. Mind adding a tiny test that validates that WaitForSync
gets called for a TypedSyncingSource
?
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.
added
/ok-to-test |
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.
Thanks!
/cherrypick release-0.20
LGTM label has been added. Git 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
Needs 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 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-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":
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-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 whereTypedSyncingSource
is passed with a type parameter other thanreconcile.Request
.this fix should be backported to v0.20 and v0.19