Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interceptor Timeout #1452

Open
dibyom opened this issue Sep 29, 2022 Discussed in #1451 · 10 comments
Open

Interceptor Timeout #1452

dibyom opened this issue Sep 29, 2022 Discussed in #1451 · 10 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.

Comments

@dibyom
Copy link
Member

dibyom commented Sep 29, 2022

Discussed in #1451

Originally posted by joshua-blickensdoerfer September 29, 2022
Hello,

i have written a custom Cluster interceptor. In the eventlistener log i can see that there is a timeout after a few seconds

"logger":"eventlistener","caller":"sink/sink.go:381","msg":"Post "http://custom-svc.tekton-framework.svc:80\": net/http: timeout awaiting response headers"

Is there any way to increase the timeout duration for custom interceptors? I've tried increasing the value of "'-el-readtimeout" and "-el-httpclient-readtimeout" this did not seem to have any effect.

Kind regards
Joshua

@dibyom dibyom added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 29, 2022
@jmcshane
Copy link
Contributor

jmcshane commented Oct 3, 2022

Right now, the way this could be done on the eventlistener would be to add custom args for overriding the defaults for the http client. We could build an HTTP client for each cluster interceptor, this could simplify the default EL http client construction as we have to assemble the full tls config for all the interceptors on startup right now in https://github.com/tektoncd/triggers/blob/v0.21.0/pkg/adapter/adapter.go#L124 and keep a watch on it to continually update.

I could see a clusterinterceptorspec like:

kind: ClusterInterceptor
...
spec:
  timeouts:
    tlshandshake:
    responseheader:
    expectcontinuetimeout: 
    readtimeout:
    keepalive:

Obviously, these could all be optional values so we can distinguish being unset vs set to 0, but I'm thinking about the "default" behavior here. Would nil mean "default to the current eventlistener value" vs 0 meaning "no timeout"? Are we concerned about the penalty for rebuilding the interceptor httpclient on every interceptor call?

@dibyom
Copy link
Member Author

dibyom commented Oct 3, 2022

Would nil mean "default to the current eventlistener value" vs 0 meaning "no timeout"?

Yeah I think that makes sense

Are we concerned about the penalty for rebuilding the interceptor httpclient on every interceptor call?

I think so 😬 do we need to build the interceptor on each call? can we do it periodically or when needed if a interceptor changes?

(Doesn't help with timeouts but for certs at least we could provide tls.Config's GetCertificate similar to how knative/pkg's webhook implementation does:)

@jmcshane
Copy link
Contributor

jmcshane commented Oct 3, 2022

I think so 😬 do we need to build the interceptor on each call? can we do it periodically or when needed if an interceptor changes?

Yeah, that was my presumption as well. Let me take a look at how the interceptor watch works and see if we can keep these clients somewhere reasonable and just update on watches

@tekton-robot
Copy link

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 tekton-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 1, 2023
@tekton-robot
Copy link

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 tekton-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 31, 2023
@tekton-robot
Copy link

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
Copy link

@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.

@khrm
Copy link
Contributor

khrm commented Mar 3, 2023

/remove-lifecycle rotten

/lifecycle-frozen

We will handle this in future releases.

@tekton-robot tekton-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Mar 3, 2023
@khrm
Copy link
Contributor

khrm commented Mar 3, 2023

/reopen
/lifecycle frozen

@tekton-robot
Copy link

@khrm: Reopened this issue.

In response to this:

/reopen
/lifecycle frozen

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 tekton-robot reopened this Mar 3, 2023
@tekton-robot tekton-robot added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
Status: In Progress
Development

No branches or pull requests

4 participants