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

fix: Add timeout for http client #1318

Merged
merged 2 commits into from
Feb 4, 2022
Merged

fix: Add timeout for http client #1318

merged 2 commits into from
Feb 4, 2022

Conversation

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
@amisevsk
Copy link
Contributor

amisevsk commented Feb 3, 2022

Tested on OpenShift 4.9 with proxy configured -- issue eclipse-che/che#21087 is resolved. 👍

@@ -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,
Copy link
Contributor

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.

Copy link
Contributor Author

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

@openshift-ci openshift-ci bot removed the lgtm label Feb 3, 2022
Copy link
Contributor

@amisevsk amisevsk left a 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

@openshift-ci openshift-ci bot added the lgtm label Feb 3, 2022
@openshift-ci
Copy link

openshift-ci bot commented Feb 3, 2022

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@codecov
Copy link

codecov bot commented Feb 3, 2022

Codecov Report

Merging #1318 (1213ad1) into main (df718e6) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            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              
Impacted Files Coverage Δ
pkg/deploy/tls/tls_utils.go 2.49% <0.00%> (-0.01%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update df718e6...1213ad1. Read the comment docs.

@tolusha tolusha merged commit a00fe51 into main Feb 4, 2022
@tolusha tolusha deleted the 21087 branch February 4, 2022 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants