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: avoid copy suggestion when only config is skipped #1164

Merged
merged 8 commits into from
Nov 3, 2023

Conversation

sajayantony
Copy link
Contributor

@sajayantony sajayantony commented Nov 2, 2023

What this PR does / why we need it:
The recommendation to use ORAS copy will be skipped if the only layer not downloaded is the config.

When we try to download an image

image

When there is an artifact with one layer and only empty config is skipped -

image

Signed-off-by: Sajay Antony <sajaya@microsoft.com>
@codecov-commenter
Copy link

codecov-commenter commented Nov 2, 2023

Codecov Report

Merging #1164 (8201e93) into main (b911ad6) will decrease coverage by 0.05%.
The diff coverage is 75.00%.

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

@@            Coverage Diff             @@
##             main    #1164      +/-   ##
==========================================
- Coverage   79.94%   79.89%   -0.05%     
==========================================
  Files          65       65              
  Lines        3520     3547      +27     
==========================================
+ Hits         2814     2834      +20     
- Misses        492      496       +4     
- Partials      214      217       +3     
Files Coverage Δ
cmd/oras/root/cp.go 79.59% <78.57%> (+0.75%) ⬆️
cmd/oras/root/push.go 73.30% <76.92%> (+0.87%) ⬆️
cmd/oras/root/pull.go 72.14% <71.42%> (-1.65%) ⬇️

cmd/oras/root/pull.go Outdated Show resolved Hide resolved
sajayantony and others added 4 commits November 2, 2023 18:38
Co-authored-by: Billy Zha <qweeah@gmail.com>
Signed-off-by: Sajay Antony <sajaya@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/root/cp.go Outdated Show resolved Hide resolved
cmd/oras/root/pull.go Outdated Show resolved Hide resolved
cmd/oras/root/push.go Outdated Show resolved Hide resolved
cmd/oras/root/cp.go Outdated Show resolved Hide resolved
cmd/oras/root/push.go Outdated Show resolved Hide resolved
cmd/oras/root/push.go Outdated Show resolved Hide resolved
cmd/oras/root/pull.go Show resolved Hide resolved
cmd/oras/root/pull.go Outdated Show resolved Hide resolved
cmd/oras/root/pull.go Outdated Show resolved Hide resolved
cmd/oras/root/pull.go Show resolved Hide resolved
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 d9b2c5c into oras-project:main Nov 3, 2023
6 checks passed
qweeah added a commit to qweeah/oras that referenced this pull request Nov 4, 2023
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
qweeah added a commit that referenced this pull request Nov 4, 2023
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
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.

5 participants