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

feat: add retry support to the auth client #838

Merged
merged 1 commit into from
Feb 28, 2023
Merged

Conversation

souleb
Copy link
Contributor

@souleb souleb commented Feb 27, 2023

What this PR does / why we need it:

If implemented the assembled oras auth client will have the default retry policy set for the underlying http roundTripper.

Which issue(s) this PR fixes:

Fixes #769

Please check the following list:

  • Does the affected code have corresponding tests, e.g. unit test, E2E test?
  • Does this change require a documentation update?
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have an appropriate license header?

Copy link
Contributor

@qweeah qweeah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with some minor suggestions on unit test.

@codecov-commenter
Copy link

codecov-commenter commented Feb 27, 2023

Codecov Report

Merging #838 (a3ce16e) into main (cedd16d) will increase coverage by 0.07%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main     #838      +/-   ##
==========================================
+ Coverage   67.46%   67.54%   +0.07%     
==========================================
  Files          21       21              
  Lines         873      875       +2     
==========================================
+ Hits          589      591       +2     
  Misses        239      239              
  Partials       45       45              
Impacted Files Coverage Δ
cmd/oras/internal/option/remote.go 70.81% <100.00%> (+0.28%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shizhMSFT shizhMSFT changed the title Add retry support to the auth client feat: add retry support to the auth client Feb 28, 2023
If implemented the assembled oras auth client will have the default
retry policy set for the underlying http roundTripper.

Signed-off-by: Soule BA <bah.soule@gmail.com>
Copy link
Contributor

@qweeah qweeah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, will follow up refactoring in #839

@qweeah qweeah merged commit fc7a82b into oras-project:main Feb 28, 2023
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.

Request for retry support
5 participants