-
Notifications
You must be signed in to change notification settings - Fork 595
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
use Source informer instead of conditions #4296
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4296 +/- ##
=======================================
Coverage 80.26% 80.26%
=======================================
Files 287 287
Lines 7889 7889
=======================================
Hits 6332 6332
Misses 1174 1174
Partials 383 383
Continue to review full report at Codecov.
|
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.
/lgtm
if dependencyAnnotation, ok := t.GetAnnotations()[eventingv1.DependencyAnnotation]; ok { | ||
dependencyObjRef, err := eventingv1.GetObjRefFromDependencyAnnotation(dependencyAnnotation) | ||
if err != nil { | ||
t.Status.MarkDependencyFailed("ReferenceError", "Unable to unmarshal objectReference from dependency annotation of trigger: %v", err) | ||
return fmt.Errorf("getting object ref from dependency annotation %q: %v", dependencyAnnotation, err) | ||
} | ||
trackKResource := r.kresourceTracker.TrackInNamespace(ctx, b) | ||
trackSource := r.sourceTracker.TrackInNamespace(ctx, t) |
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.
Good catch!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pierDipi, vaikas 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 |
Sinkbinding test failed with the deployment not getting to be ready, so not really surprising that the events were not observed:
|
* use Source informer instead of conditions * remove now unused broker variable
* use Source informer instead of conditions * remove now unused broker variable
* use Source informer instead of conditions * remove now unused broker variable
@vaikas can you write a more detailed explanation of what the mismatch was? Why did changing from the kresource duck to the source duck fix it? Technically this feature should only need the Ready status of the kresource duck. |
The other bit (in addition to the duck change, was the change to which Informer we use) here: We were using the Conditions informer, but using the KResource lister and hence hilarity ensued. We do not have a KResource informer that I'm aware of which would've also been a way to fix this (namely, use the same informer / lister). But since the feature is explicitly tracking Sources, seemed like a fine way to fix it by changing it to use informer for Source and hence the matching lister. |
Thanks for the explanation, I get it now :) |
Fixes #4294
Proposed Changes
Release Note
Docs