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

fix: remove root from virtual referrers #1130

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

shizhMSFT
Copy link
Contributor

What this PR does / why we need it:
Fix a bug when oras cp -r a loop index.

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

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: Shiwei Zhang <shizh@microsoft.com>
@codecov-commenter
Copy link

Codecov Report

Merging #1130 (89f4bed) into main (8cf946f) will decrease coverage by 0.05%.
The diff coverage is 100.00%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@            Coverage Diff             @@
##             main    #1130      +/-   ##
==========================================
- Coverage   80.10%   80.06%   -0.05%     
==========================================
  Files          57       57              
  Lines        2991     2994       +3     
==========================================
+ Hits         2396     2397       +1     
- Misses        410      412       +2     
  Partials      185      185              
Files Changed Coverage Δ
cmd/oras/root/cp.go 81.36% <100.00%> (+0.35%) ⬆️

... and 1 file with indirect coverage changes

@sajayantony
Copy link
Contributor

Should we include a test for this case?

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. BTW is this allowed by spec? Having a subject which is also a member of manifests sound wierd.

@qweeah
Copy link
Contributor

qweeah commented Sep 23, 2023

Should we include a test for this case?

I can add one

@qweeah qweeah merged commit 4cf5390 into oras-project:main Sep 25, 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.

oras cp -r fails if index has a child manifest as subject
4 participants