-
Notifications
You must be signed in to change notification settings - Fork 420
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
Add Timeout for EventListener Server #747
Conversation
This pr might potentially resolve #687 |
21c8471
to
fe25c38
Compare
/retest |
The following is the coverage report on the affected files.
|
/test pull-tekton-triggers-integration-tests |
1 similar comment
/test pull-tekton-triggers-integration-tests |
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
|
||
srv := &http.Server{ | ||
Addr: fmt.Sprintf(":%s", sinkArgs.Port), | ||
ReadTimeout: sinkArgs.ELReadTimeOut * time.Second, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ReadTimeout includes reading both headers + body. Maybe we should use ReadHeaderTimeout
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or may we set both? What would be the sane values for all these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 seconds sounds reasonable to me.
The following is the coverage report on the affected files.
|
@dibyom Yea, that's good. |
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
WriteTimeout: sinkArgs.ELWriteTimeOut * time.Second, | ||
IdleTimeout: sinkArgs.ELIdleTimeOut * time.Second, | ||
Handler: http.TimeoutHandler(mux, | ||
sinkArgs.ELTimeOutHandler*time.Second, "EventListener Timeout!\n"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a way to add some extra info here e.g. the eventID or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, unless we write our own custom thing.
Summarizing discussion from last week's WG:
|
Added Timeout to avoid running out of file descriptor and leaking connections. These timeouts are configurable via config.
/approve (We should still consider adding a context based timeout to cancel trigger processing that takes more than x seconds) |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dibyom The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Added Timeout to avoid running out of file descriptor and leaking connections.
Changes
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Release Notes