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

resolver: replace standard http client to go-retryablehttp #76

Merged
merged 3 commits into from
Jul 1, 2022

Conversation

power-more
Copy link
Contributor

Previously, our snapshot will download the image through the go standard http
client, if the http download fails and does not do a retry. Now we retry
for defaultRetryMax = 4 times.

Fixes: #54

Signed-off-by: zhaoshang zhaoshangsjtu@linux.alibaba.com

@power-more power-more force-pushed the zhaoshang/retry branch 2 times, most recently from 478729b to 9dcce02 Compare June 23, 2022 05:52
@codecov-commenter
Copy link

codecov-commenter commented Jun 23, 2022

Codecov Report

Merging #76 (438a892) into main (044d191) will decrease coverage by 0.07%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main      #76      +/-   ##
==========================================
- Coverage   28.49%   28.42%   -0.08%     
==========================================
  Files          17       17              
  Lines        1516     1520       +4     
==========================================
  Hits          432      432              
- Misses       1020     1024       +4     
  Partials       64       64              
Impacted Files Coverage Δ
pkg/filesystem/fs/fs.go 6.79% <0.00%> (ø)
pkg/filesystem/fs/resolver.go 0.00% <0.00%> (ø)

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 044d191...438a892. Read the comment docs.

@jiangliu
Copy link
Contributor

Could you please help to rebase the PR?

@power-more
Copy link
Contributor Author

Could you please help to rebase the PR?

done

@imeoer
Copy link
Collaborator

imeoer commented Jun 28, 2022

Thanks for the contribution, how about also replacing all http.NewRequestWithContext in here?

Previously, our snapshot will download the image (nydus blob) through the
go standard http client, if the http download fails and does not do a retry.
Now we retry for defaultRetryMax = 4 times.

Fixes: containerd#54

Signed-off-by: zhaoshang <zhaoshangsjtu@linux.alibaba.com>
Signed-off-by: zhaoshang <zhaoshangsjtu@linux.alibaba.com>
Signed-off-by: zhaoshang <zhaoshangsjtu@linux.alibaba.com>
@imeoer imeoer merged commit 10c80fa into containerd:main Jul 1, 2022
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.

Replace standard http client to go-retryablehttp
4 participants