-
Notifications
You must be signed in to change notification settings - Fork 395
docker,openshift: create http.Client with Timeout #42
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
Conversation
|
lgtm ping @mtrmac |
| httpClient = &http.Client{Transport: transport} | ||
| httpClient.Transport = transport | ||
| } | ||
|
|
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.
While openshift-copies.go is modified from the originals, I’d prefer not introducing new behavior in there. Could this be moved to openshift.go (which contains the only caller of this function)?
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.
mm sure, I don't understand what I actually have to move
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.
- Do not change
openshift-copies.go - In
openshift.go:newOpenshiftClient, set theTimeoutas desired.
|
ACK on the |
b163a94 to
29d43b7
Compare
|
@mtrmac rebased good to go after your LGTM |
openshift/openshift.go
Outdated
| if *baseURL != *ref.baseURL { | ||
| return nil, fmt.Errorf("Unexpected baseURL mismatch: default %#v, reference %#v", *baseURL, *ref.baseURL) | ||
| } | ||
| http.Client.Timeout = 1 * time.Minute |
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.
Fails build; s/http.Client/httpClient/?
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.
my bad, fixed
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
And avoid creating 3 clients in
docker_client.go@mtrmac PTAL
Signed-off-by: Antonio Murdaca runcom@redhat.com