-
Notifications
You must be signed in to change notification settings - Fork 588
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
[WIP]: Started using tracker to ensure typemeta is set #7093
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Cali0707 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #7093 +/- ##
==========================================
+ Coverage 78.29% 78.32% +0.03%
==========================================
Files 250 250
Lines 13290 13311 +21
==========================================
+ Hits 10405 10426 +21
Misses 2353 2353
Partials 532 532
☔ View full report in Codecov by Sentry. |
inmemorychannelInformer.Informer().AddEventHandler(controller.HandleAll( | ||
controller.EnsureTypeMeta( | ||
r.tracker.OnChanged, | ||
messagingv1.SchemeGroupVersion.WithKind("InMemoryChannel"), | ||
), | ||
)) |
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.
Sorry for the vague comment, it's not the tracker the solution but EnsureTypeMeta
therefore where we set the handler (just above, it eventually calls ReconcileKind) we need to call EnsureTypeMeta
gvk := messagingv1.SchemeGroupVersion.WithKind("InMemoryChannel")
// ...
AddFunc: controller.EnsureTypeMeta(impl.Enqueue, gvk)
UpdateFunc: controller.PassNew(controller.EnsureTypeMeta(impl.Enqueue, gvk)),
DeleteFunc: controller.EnsureTypeMeta(r.deleteFunc, gvk),
that ensures that whatever object is passed to callback has the Typemeta
based on gvk
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.
Okay thanks that makes sense!
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. |
Closing following discussion on #7091 re: fixing this in pkg |
Fixes #7091
Proposed Changes
EnsureTypeMeta
to ensure that the type meta is properly setPre-review Checklist