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: remove empty artifact CLI message and show hints for pulling OCI image layout #1157

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

sajayantony
Copy link
Contributor

@sajayantony sajayantony commented Oct 31, 2023

What this PR does / why we need it:
Update the message for oras pull of an image to something actionable -

The current outputs looks like this

❯ oras pull localhost:5000/hello-world:latest
Downloaded empty artifact
Pulled [registry] localhost:5000/hello-world:latest
Digest: sha256:7e9b6e7ba2842c91cf49f3e214d04a7a496f8214356f41d81a6e6dcad11f11e3

The PR modifies this to

❯ go run ./cmd/oras  pull localhost:5000/hello-world:latest
Skipped pulling layers without "org.opencontainers.image.title"
Use 'oras copy localhost:5000/hello-world:latest --to-oci-layout <layout-dir>' to pull all layers.

Also changed to character for checkmark.

@sajayantony
Copy link
Contributor Author

sajayantony commented Nov 1, 2023

Open to rewording this

Skipped pulling layers without "org.opencontainers.image.title"

Another option would be

Skipped pulling layers without annotation value for "org.opencontainers.image.title"

cmd/oras/root/pull.go Outdated Show resolved Hide resolved
@qweeah qweeah changed the title Removed empty artifact CLI message feat: remove empty artifact CLI message and show hints for pulling OCI image layout Nov 2, 2023
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 suggestions:
Action prompt Pulled can be formatted into the same length with Skipped
image to make output aligned.

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

Codecov Report

Merging #1157 (14833b8) into main (9ec4f1b) will increase coverage by 0.08%.
The diff coverage is 87.50%.

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

@@            Coverage Diff             @@
##             main    #1157      +/-   ##
==========================================
+ Coverage   79.85%   79.94%   +0.08%     
==========================================
  Files          65       65              
  Lines        3520     3520              
==========================================
+ Hits         2811     2814       +3     
+ Misses        494      492       -2     
+ Partials      215      214       -1     
Files Coverage Δ
cmd/oras/internal/display/progress/status.go 95.08% <100.00%> (ø)
cmd/oras/root/pull.go 73.91% <86.66%> (+1.44%) ⬆️

@sajayantony sajayantony merged commit f41d56d into oras-project:main Nov 2, 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.

3 participants