triggers icon indicating copy to clipboard operation
triggers copied to clipboard

Feature: EventListener response customization

Open bitsofinfo opened this issue 3 years ago • 28 comments

Would be great to be able customize the response the EventListener returns to invokers.

Currently it always returns JSON like this:

{"eventListener":"my-listener-v1","namespace":"tekton-pipelines","eventID":"hg6ps"}

Use case

When integrating w/ interactive tools like Slack slash commands, the response returned by the EventListener is directly consumed by the caller (slack) and displayed to the user as feedback. It generally looks like this:

image

Would be good to be able to bind some CEL filters to an EventListenerResponder that would qualify it as the thing that is responsible for formulating both a status code AND content type + content to be returned to the caller. Maybe the mechanism could work similar to how the webhook interceptors work.

bitsofinfo avatar Oct 06 '20 14:10 bitsofinfo

/kind feature

dibyom avatar Oct 06 '20 15:10 dibyom

The Notifications work that @afrittoli is doing in TEP-0032 might be related here.

dibyom avatar Dec 09 '20 20:12 dibyom

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale with a justification. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

tekton-robot avatar Mar 09 '21 20:03 tekton-robot

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten with a justification. Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

tekton-robot avatar Apr 08 '21 21:04 tekton-robot

/remove-lifecycle rotten

bitsofinfo avatar Apr 09 '21 14:04 bitsofinfo

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale with a justification. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

tekton-robot avatar Jul 08 '21 14:07 tekton-robot

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten with a justification. Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

tekton-robot avatar Oct 15 '21 01:10 tekton-robot

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen with a justification. Mark the issue as fresh with /remove-lifecycle rotten with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

tekton-robot avatar Nov 14 '21 02:11 tekton-robot

@tekton-robot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen with a justification. Mark the issue as fresh with /remove-lifecycle rotten with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

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.

tekton-robot avatar Nov 14 '21 02:11 tekton-robot

/reopen

bitsofinfo avatar Nov 17 '21 18:11 bitsofinfo

@bitsofinfo: Reopened this issue.

In response to this:

/reopen

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.

tekton-robot avatar Nov 17 '21 18:11 tekton-robot

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen with a justification. Mark the issue as fresh with /remove-lifecycle rotten with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

tekton-robot avatar Dec 17 '21 18:12 tekton-robot

@tekton-robot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen with a justification. Mark the issue as fresh with /remove-lifecycle rotten with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

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.

tekton-robot avatar Dec 17 '21 18:12 tekton-robot

/reopen

bitsofinfo avatar Dec 20 '21 16:12 bitsofinfo

@bitsofinfo: Reopened this issue.

In response to this:

/reopen

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.

tekton-robot avatar Dec 20 '21 16:12 tekton-robot

This would definitely be a helpful feature for us when integrating with slack as well.

bmudda avatar Dec 20 '21 16:12 bmudda

/remove-lifecycle rotten

bitsofinfo avatar Dec 20 '21 16:12 bitsofinfo

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale with a justification. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

tekton-robot avatar Mar 20 '22 17:03 tekton-robot

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten with a justification. Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

tekton-robot avatar Apr 19 '22 17:04 tekton-robot

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen with a justification. Mark the issue as fresh with /remove-lifecycle rotten with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

tekton-robot avatar May 19 '22 18:05 tekton-robot

@tekton-robot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen with a justification. Mark the issue as fresh with /remove-lifecycle rotten with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

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.

tekton-robot avatar May 19 '22 18:05 tekton-robot

/reopen

khrm avatar May 19 '22 20:05 khrm

/remove-lifecycle rotten

khrm avatar May 19 '22 20:05 khrm

/lifecycle frozen

khrm avatar May 19 '22 20:05 khrm

Any word on this? Another use case is for hooking up the EventListener to a Knative Eventing Broker. The Broker requires a response to be either empty or a single valid CloudEvent. The current response from EventListener causes the Broker to retry the event up to the limit, resulting in multiple pipeline runs per event. Only solution has been to disable retries altogether in the knative Trigger delivery spec 😞

rusty-jules avatar Oct 26 '22 22:10 rusty-jules

This seems very related to #1439

treyhyde avatar Oct 27 '22 01:10 treyhyde

This seems to be handled as part of https://github.com/tektoncd/triggers/pull/1548 which is released in Triggers v0.24

savitaashture avatar May 30 '23 04:05 savitaashture

This is related to customizing EL's response. ATM, we do this only for CloudEvent done as part of #1439

khrm avatar May 30 '23 18:05 khrm