triggers icon indicating copy to clipboard operation
triggers copied to clipboard

Add option for EventListener to specify different HTTP response codes

Open gnunn1 opened this issue 3 years ago • 8 comments

Feature request

Currently the Tekton eventlistener responds to successful POST requests with a 202 to indicate that the pipeline has started but has not completed. When interfacing with SCM systems like Github, Gitlab, etc this is sufficient however triggers are quite flexible with bindings enabling the event listener to be called from a variety of sources.

These alternative systems sometimes have specific requirements for response codes and having flexibility to choose the response codes for common scenarios (success, failure, etc) provides for more capability without needing to write adapters.

Use case

In my use case I would like to call the eventlistener from a button in Slack however Slack expects a 200 response code as an acknowledgement instead of a 202.

gnunn1 avatar Jul 15 '22 14:07 gnunn1

/assign @khrm

khrm avatar Jul 15 '22 15:07 khrm

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 Oct 13 '22 16:10 tekton-robot

/remove-lifecycle stale

khrm avatar Oct 19 '22 15:10 khrm

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 May 09 '23 16:05 tekton-robot

/remove-lifecycle stale

khrm avatar May 11 '23 09:05 khrm

As I'm integrating knative eventing with tekton by configuring the event listener as a knative event sink, the 202 response code will not be recognised by knative for a successful event delivery. Therefore, unexpected re-delivery happens. It would be nice to be able customise the behaviour (i.e. return a normal 200 code)

rhtevan avatar Jul 04 '23 13:07 rhtevan

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 Nov 07 '23 15:11 tekton-robot

https://github.com/tektoncd/triggers/pull/1469 might be an alternative for cloud events users for now

dibyom avatar Nov 15 '23 16:11 dibyom