Skip to content

Add retries for temporary network issues #471

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

Merged
merged 2 commits into from
Jun 21, 2019

Conversation

jonjohnsonjr
Copy link
Collaborator

We pretty commonly see this issue when communicating with a registry:

Get https://gcr.io/v2/: net/http: TLS handshake timeout

This causes a huge amount of pain if it's a failure within e.g. a large
CI job, since the entire thing would fail.

Fixes #77

This uses k8s.io/apimachinery/pkg/util/wait because we happen to already depend on it.

@codecov-io
Copy link

codecov-io commented Jun 19, 2019

Codecov Report

Merging #471 into master will increase coverage by 0.46%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #471      +/-   ##
==========================================
+ Coverage   62.37%   62.83%   +0.46%     
==========================================
  Files          74       76       +2     
  Lines        3686     3721      +35     
==========================================
+ Hits         2299     2338      +39     
+ Misses       1078     1074       -4     
  Partials      309      309
Impacted Files Coverage Δ
pkg/v1/remote/transport/error.go 94.28% <100%> (ø) ⬆️
pkg/v1/remote/transport/retry.go 100% <100%> (ø)
pkg/v1/google/list.go 61.44% <100%> (+0.47%) ⬆️
pkg/internal/retry/retry.go 100% <100%> (ø)
pkg/v1/remote/write.go 63.17% <100%> (+0.57%) ⬆️
pkg/v1/remote/options.go 60.6% <100%> (+1.23%) ⬆️

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 abf9ef0...7f89772. Read the comment docs.

@jonjohnsonjr jonjohnsonjr force-pushed the retry-temporary-network branch 3 times, most recently from 51cadbf to 48fee3d Compare June 20, 2019 19:15
@jonjohnsonjr jonjohnsonjr changed the title Add retries for temporary network issues [wip] Add retries for temporary network issues Jun 20, 2019
@jonjohnsonjr jonjohnsonjr force-pushed the retry-temporary-network branch 5 times, most recently from eb20d78 to 8e750bc Compare June 20, 2019 22:52
@jonjohnsonjr jonjohnsonjr changed the title [wip] Add retries for temporary network issues Add retries for temporary network issues Jun 20, 2019
@jonjohnsonjr jonjohnsonjr force-pushed the retry-temporary-network branch 2 times, most recently from f706e93 to 281d486 Compare June 20, 2019 23:52
We pretty commonly see this issue when communicating with a registry:
```
Get https://gcr.io/v2/: net/http: TLS handshake timeout
```

This causes a huge amount of pain if it's a failure within e.g. a large
CI job, since the entire thing would fail.

Fixes google#77
@jonjohnsonjr jonjohnsonjr force-pushed the retry-temporary-network branch from 281d486 to 1333cbe Compare June 21, 2019 18:30
@jonjohnsonjr jonjohnsonjr merged commit 1183648 into google:master Jun 21, 2019
@jonjohnsonjr jonjohnsonjr deleted the retry-temporary-network branch June 21, 2019 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't use http.DefaultTransport in the CLI
3 participants