Errors from the tracker or the addressable resolver factory
are discarded which isn't helpful for debugging since the
error is generic `kafkachannels "Lister" not found`.
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
I noticed in a few places downstream that reconcilers were creating both trackers and Addressable resolvers, which seems superfluous. As part of examining the way we use the tracker, I'm experimenting with changing this to just take a tracker.
* Return an apimachinery error if psbinding subject WithContext fails
In the event a subject's `WithContext()` call fails, then
ReconcileSubject fails without catching the proper
error (sinkbinding's WithContext returns its own custom errors). This
can manifest itself in instances where the sinkbinding subject has
been deleted before the sinkbinding itself, and leaves the reconcile
deletion loop stuck before the finalizer can be removed. Leaving the
sinkbinding itself stuck, despite the subject already being deleted.
* Alter URIFromObjectReference to return apierrs
This allows for reconcile deletion to properly remove finalizer and
delete sinkbinding
* Update Tests
* Drop unneeded Sprintf
This augments the injection codegen with the capability to produce a duck.InformerFactory
attached to context for each type that we process.
Now a `duck.InformerFactory` for "Addressable" can be produced by "Get"ing it from the context.
This is triggered by placing `// +genduck` on the type that implements `duck.Implementable`.
Destination sits in a strange versioned directory without a group under APIs. Destination is in fact part of our duck type space, so it belongs under the `duck` group. This moves the definition (previously v1alpha1) to `v1` because it is referenced from source types that have been designated `v1`.
* change Destination api and addressable resolver, fixed unit tests and added more unit tests
* make validateDestination visible
* rename error msg, added comments, added unit tests
* reformat error msg and change positive case order
* modified error msg when ref is not valid
* fixed typo