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

oras discover should show a placeholder of artifactType if it's not presented in an index referrer #1108

Closed
1 task done
qweeah opened this issue Sep 7, 2023 · 2 comments · Fixed by #1336
Closed
1 task done
Assignees
Labels
enhancement New feature or request ux User experience related
Milestone

Comments

@qweeah
Copy link
Contributor

qweeah commented Sep 7, 2023

What is the version of your ORAS CLI

1.1.0

What would you like to be added?

Currently oras discover shows an empty node when artifactType if it's not presented in an index referrer, like

✗ oras discover -o tree localhost:5000/test:multi
localhost:7000/command/artifacts@sha256:e2bfc9cc6a84ec2d7365b5a28c6bc5806b7fa581c9ad7883be955a64e3cc034f
├── referrer/index
│   └── sha256:d37baf66300b9006b0f4c7102075d56b970fbf910be5c6bca07fdbb000dfa383
└── 
    └── sha256:7679bc22c33b87aa345c6950a993db98a6df7a6cc77a35c388908a3

Should use a placeholder for the empty artifactType, like <nil> since fmt.Println(nil) prints <nil>

✗ oras discover -o tree localhost:5000/test:multi
localhost:7000/command/artifacts@sha256:e2bfc9cc6a84ec2d7365b5a28c6bc5806b7fa581c9ad7883be955a64e3cc034f
├── referrer/index
│   └── sha256:d37baf66300b9006b0f4c7102075d56b970fbf910be5c6bca07fdbb000dfa383
└── <nil>
    └── sha256:7679bc22c33b87aa345c6950a993db98a6df7a6cc77a35c388908a3

Why is this needed for ORAS?

Showing an empty node makes no sense and will confuse our user.

Are you willing to submit PRs to contribute to this feature?

  • Yes, I am willing to implement it.
@qweeah qweeah added the enhancement New feature or request label Sep 7, 2023
@qweeah qweeah added this to the v1.2.0 milestone Sep 7, 2023
@Wwwsylvia
Copy link
Member

<nil> makes me feel like the node is nil, but not artifactType is nil.
How about something like <unknown> or <unknown artifact>?

$ oras discover -o tree localhost:5000/test:multi
localhost:7000/command/artifacts@sha256:e2bfc9cc6a84ec2d7365b5a28c6bc5806b7fa581c9ad7883be955a64e3cc034f
├── referrer/index
│   └── sha256:d37baf66300b9006b0f4c7102075d56b970fbf910be5c6bca07fdbb000dfa383
└── <unknown>
    └── sha256:7679bc22c33b87aa345c6950a993db98a6df7a6cc77a35c388908a3

@FeynmanZhou FeynmanZhou added the ux User experience related label Sep 12, 2023
@yizha1 yizha1 modified the milestones: v1.2.0, v1.3.0 Jan 23, 2024
@wangxiaoxuan273
Copy link
Contributor

I'd like to work on this item

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ux User experience related
Projects
5 participants