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: support copying referrers for multi-arch images #1122

Merged
merged 16 commits into from
Sep 20, 2023

Conversation

qweeah
Copy link
Contributor

@qweeah qweeah commented Sep 18, 2023

What this PR does / why we need it:
This PR changes oras cp to recursively copy referrers of platform-specific images in an index or manifest list.

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

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>
@codecov-commenter
Copy link

codecov-commenter commented Sep 18, 2023

Codecov Report

Attention: Patch coverage is 70.96774% with 18 lines in your changes missing coverage. Please review.

Project coverage is 80.10%. Comparing base (0efe794) to head (cd84321).
Report is 246 commits behind head on main.

Files with missing lines Patch % Lines
cmd/oras/root/cp.go 70.00% 8 Missing and 4 partials ⚠️
internal/graph/graph.go 72.72% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1122      +/-   ##
==========================================
- Coverage   80.40%   80.10%   -0.31%     
==========================================
  Files          57       57              
  Lines        2945     2991      +46     
==========================================
+ Hits         2368     2396      +28     
- Misses        398      410      +12     
- Partials      179      185       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

cmd/oras/root/cp.go Outdated Show resolved Hide resolved
cmd/oras/root/cp.go Outdated Show resolved Hide resolved
cmd/oras/root/cp.go Outdated Show resolved Hide resolved
cmd/oras/root/cp.go Outdated Show resolved Hide resolved
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>
@qweeah qweeah changed the title feats: support copying referrers for multi-arch images feat: support copying referrers for multi-arch images Sep 19, 2023
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
cmd/oras/root/cp.go Outdated Show resolved Hide resolved
cmd/oras/root/cp.go Outdated Show resolved Hide resolved
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>
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

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
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

@qweeah qweeah merged commit 4485eae into oras-project:main Sep 20, 2023
6 checks passed
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.

support copying image referrers from index predecessor via oras copy
4 participants