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

refactor: clone default http transport for registry client #840

Merged
merged 17 commits into from
Mar 3, 2023

Conversation

qweeah
Copy link
Contributor

@qweeah qweeah commented Feb 28, 2023

What this PR does / why we need it:
This PR removes hard-coded transport declaration in registry client.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #839

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?

Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
@qweeah qweeah changed the title refactor: use cloned default http transport in registry client refactor: clone default http transport for registry client Feb 28, 2023
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
@qweeah qweeah marked this pull request as ready for review February 28, 2023 05:20
@codecov-commenter
Copy link

codecov-commenter commented Feb 28, 2023

Codecov Report

❗ No coverage uploaded for pull request base (main@8c238a9). Click here to learn what that means.
The diff coverage is 71.42%.

❗ Current head a2fd7b2 differs from pull request most recent head 4c6a117. Consider uploading reports for the commit 4c6a117 to get more accurate results

📣 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     #840   +/-   ##
=======================================
  Coverage        ?   66.47%           
=======================================
  Files           ?       21           
  Lines           ?      859           
  Branches        ?        0           
=======================================
  Hits            ?      571           
  Misses          ?      242           
  Partials        ?       46           
Impacted Files Coverage Δ
internal/net/net.go 50.00% <0.00%> (ø)
cmd/oras/internal/option/remote.go 67.72% <76.92%> (ø)

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

Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Copy link
Member

@TerryHowe TerryHowe left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
cmd/oras/internal/option/remote.go Outdated Show resolved Hide resolved
internal/net/net.go Outdated Show resolved Hide resolved
… refactor-dailer

Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Copy link
Member

@TerryHowe TerryHowe left a comment

Choose a reason for hiding this comment

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

LGTM

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 merged commit 70fde82 into oras-project:main Mar 3, 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.

refactor net.Dialer so registry client can use transport cloned from http.DefaultTransport
4 participants