-
Notifications
You must be signed in to change notification settings - Fork 89
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
fix: Add timeout for http client #1318
Conversation
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
Tested on OpenShift 4.9 with proxy configured -- issue eclipse-che/che#21087 is resolved. 👍 |
pkg/deploy/tls/tls_utils.go
Outdated
@@ -248,6 +248,7 @@ func doRequestForTLSCrtChain(ctx *deploy.DeployContext, requestURL string, skipP | |||
transport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true} | |||
client := &http.Client{ | |||
Transport: transport, | |||
Timeout: time.Second * 10, |
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.
It may be worth using a shorter timeout (3 or 5 seconds) -- from my experience, this check is done three times during Che Operator startup, which means ~30 seconds before the operator is ready.
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.
Agree. I will update it
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.
Re-approving for good measure
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: amisevsk, tolusha The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report
@@ Coverage Diff @@
## main #1318 +/- ##
==========================================
- Coverage 60.46% 60.46% -0.01%
==========================================
Files 77 77
Lines 6342 6343 +1
==========================================
Hits 3835 3835
- Misses 2121 2122 +1
Partials 386 386
Continue to review full report at Codecov.
|
Signed-off-by: Anatolii Bazko abazko@redhat.com
What does this PR do?
Add timeout for http client
Screenshot/screencast of this PR
N/A
What issues does this PR fix or reference?
eclipse-che/che#21087
How to test this PR?
N/A
PR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or reference
andHow to test this PR
completedReviewers
Reviewers, please comment how you tested the PR when approving it.