Skip to content

Trigger responses are sent back into the Broker.#917

Merged
knative-prow-robot merged 170 commits into
knative:masterfrom
Harwayne:broker-ingress-cloudevents
Mar 20, 2019
Merged

Trigger responses are sent back into the Broker.#917
knative-prow-robot merged 170 commits into
knative:masterfrom
Harwayne:broker-ingress-cloudevents

Conversation

@Harwayne
Copy link
Copy Markdown
Contributor

@Harwayne Harwayne commented Mar 18, 2019

Fixes #899.
Fixes #905.

Proposed Changes

  • Create an internal only Ingress Channel for each Broker.
  • Trigger's Subscription sets its reply to the Broker's Ingress Channel.

Release Note

Events may not be delivered for a few seconds during a reconcile attempt when this is first deployed.

Tracing Ids will get dropped when going through Triggers.

Harwayne and others added 30 commits January 28, 2019 09:13
In a follow up PR, I plan to include matching of expressions. It turns
our that they are somewhat more involved than expected.
Copy link
Copy Markdown
Contributor

@vaikas vaikas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this!

// 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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a note and #925.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Harwayne Harwayne changed the title [WIP] Trigger responses are sent back into the Broker. Trigger responses are sent back into the Broker. Mar 19, 2019
@knative-prow-robot knative-prow-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 19, 2019
@knative-metrics-robot
Copy link
Copy Markdown

The following is the coverage report on pkg/.
Say /test pull-knative-eventing-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/eventing/v1alpha1/broker_types.go 76.9% 100.0% 23.1
pkg/broker/receiver.go 96.2% 82.7% -13.4
pkg/reconciler/v1alpha1/broker/broker.go 86.6% 89.8% 3.2
pkg/reconciler/v1alpha1/trigger/trigger.go 78.9% 79.5% 0.6

@Harwayne
Copy link
Copy Markdown
Contributor Author

This PR's switch to using the CloudEvents SDK will cause Broker & Trigger to stop propagating trace headers.

@vaikas
Copy link
Copy Markdown
Contributor

vaikas commented Mar 20, 2019

/approve
since @grantr had comments, leaving out the LGTM for them.

@knative-prow-robot
Copy link
Copy Markdown
Contributor

[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

Details Needs approval from an approver in each of these files:
  • OWNERS [Harwayne,vaikas-google]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@vaikas
Copy link
Copy Markdown
Contributor

vaikas commented Mar 20, 2019

talked offline, good to go.
/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 20, 2019
@knative-prow-robot knative-prow-robot merged commit 82d9baf into knative:master Mar 20, 2019
Harwayne added a commit to Harwayne/knative-eventing that referenced this pull request Mar 25, 2019
knative-prow-robot pushed a commit that referenced this pull request Mar 26, 2019
@Harwayne Harwayne deleted the broker-ingress-cloudevents branch May 9, 2019 18:59
cardil pushed a commit to cardil/knative-eventing that referenced this pull request Oct 28, 2020
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants