Trigger responses are sent back into the Broker.#917
Conversation
In a follow up PR, I plan to include matching of expressions. It turns our that they are somewhat more involved than expected.
| // 2. Filter Deployment. | ||
| // 3. Ingress Deployment. | ||
| // 4. K8s Services that point at the Deployments. | ||
| // 5. Ingress Channel is created to get events from Triggers back into this Broker via the |
There was a problem hiding this comment.
Could we add a note here saying something that this is necessary because subscription can only route to Channel objects and hence we need to create an artificial channel instead of feeding it to the Ingress Service directly. If I understood correctly.
There was a problem hiding this comment.
Also, probably open an issue to track about relaxing the constraint that only channels can be used as a target for response from a Subscription.
There was a problem hiding this comment.
I think the channel here isn't actually so bad because it decouples the publish and consume failure domains. With the ingress channel, consume doesn't depend on the broker ingress availability, only channel availability (which the consumer already depends on via its subscription to the main trigger channel).
For the intentionally simple "respond with event" use case, having simpler failure modes is good IMO.
|
The following is the coverage report on pkg/.
|
|
This PR's switch to using the CloudEvents SDK will cause Broker & Trigger to stop propagating trace headers. |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Harwayne, vaikas-google 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 |
|
talked offline, good to go. |
* Nit (knative#4385) Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> (cherry picked from commit 3ceaad4) Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * emit a k8s event when dropping events (knative#4389) * emit a k8s event when dropping events Signed-off-by: Ville Aikas <vaikas@vmware.com> * go imports Signed-off-by: Ville Aikas <vaikas@vmware.com> * tags Signed-off-by: Ville Aikas <vaikas@vmware.com> * fix silliness Signed-off-by: Ville Aikas <vaikas@vmware.com> * simplify Signed-off-by: Ville Aikas <vaikas@vmware.com> (cherry picked from commit 0a54fd9) * [recordevents] Removed EventBroadcaster usage and replaced with manual send (knative#4393) * Removed EventBroadcaster usage and replaced with manual creation and send of events Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Boilerplate Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Remove redundant format Removed sequence annotation Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Added required value Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * ?!?! Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Maybe this one fix the issue? Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Maybe this one fix the issue? Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Removed useless double log line Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Remove useless headers Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Missing host header Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Nit Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Now it works on my machine, i'm warning you prow! Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Nit Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Now it works for long events too Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Suggestions Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Fixed the dropped counter thing Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Nit Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> (cherry picked from commit 7de59ec) Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Wrong merge fix Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> Co-authored-by: Ville Aikas <11279988+vaikas@users.noreply.github.com>
Fixes #899.
Fixes #905.
Proposed Changes
Channelfor eachBroker.Trigger'sSubscriptionsets its reply to theBroker's IngressChannel.Release Note