tektoncd / triggers

Event triggering with Tekton!
Apache License 2.0
558 stars 420 forks source link

Configurable timeout and/or retries on webhook interceptors #861

Closed viniagostini closed 3 years ago

viniagostini commented 3 years ago

Feature request

Currently, I have a webhook interceptor calling a service that sometimes takes more than 5 seconds to respond, and when it happens the trigger throws a Timeout error.

Would be nice if I could configure some retry strategy or increase this timeout.

dibyom commented 3 years ago

Hi, sorry about the delayed response. We discussed this during a Working Group meeting. Summarizing the discussion:

We're trying to decide between providing config options vs adding some standardized retry behavior for webhook interceptors. Adding a config option can lead to some complexity (e.g. we already have EL level timeouts...how will this interact with that). Maybe we could just do some standard retries e.g. 3 retries on failure with a timeout of 5 seconds (utilizing the current EventListener's timeout values).

As a workaround for now, you could try increasing the EventListener's timeouts https://github.com/tektoncd/triggers/blob/master/docs/eventlisteners.md#response-timeout

There is also ongoing work on moving interceptor processing to a new HTTP API. Once that's done we could try standardizing retry behavior based on the kind of error and the already set EL level timeouts.

tekton-robot commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

@tekton-robot: Closing this issue.

In response to [this](https://github.com/tektoncd/triggers/issues/861#issuecomment-860120597): >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](https://github.com/tektoncd/plumbing). Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.