You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
show annotations by default for oras discover --format tree #1534
As per the ORAS diagnose experience proposal, we should add a new --format tree-full flag for oras discover to control the detailed metadata output, such as printing the annotations.
Once we have a way to print the detailed metadata output, we can mark the --verbose flag as deprecated.
- Deprecate the `--verbose` flag and keep `--debug` flag to avoid ambiguity. It is reasonable to continue using `--debug` to enable the output of `DEBUG` level logs as it is in ORAS. Meanwhile, this change will make the diagnose experience much more straightforward and less breaking since only ORAS `pull/push/attach/discover` commands have verbose output.
- Make the verbose output of commands `pull`, `push`, `attach` as the default (status) output. See examples at the bottom.
- Make the verbose output of command `discover` as a formatted output, controlled by `--format tree-full`.
Hi @Horiodino , thank you for volunteering! Sure please feel free to create a PR and let us know if anything is unclear.
Just a note: In #1558 we deprecated the --verbose flag for other commands but oras discover. It's time to apply the same for oras discover as well when we add --format tree-full to it.
Really nice to see this coming together. Given that the discover was done before the OCI specification was finalized, it might be good to actually show the annotations in the default output. This aligns well with the API.
Annotations are the main way for a user to consume the output since IMHO the set of digests alone might not usable besides giving an indication.
Basically my vote would be to avoid a tree-full option and just make this the default output as its more usable.
i’m also considering the fact that that we are trying to have lesser options verbose|debug.
Reacted by Lixia (Sylvia) Lei, Terry Howe and Yi Zha
When there are multiple referrers with the same artifact type, annotations can be helpful in distinguishing the referrers, however the way we display it does look overwhelming.
Really nice to see this coming together. Given that the discover was done before the OCI specification was finalized, it might be good to actually show the annotations in the default output. This aligns well with the API.
Annotations are the main way for a user to consume the output since IMHO the set of digests alone might not usable besides giving an indication.
Basically my vote would be to avoid a tree-full option and just make this the default output as its more usable. i’m also considering the fact that that we are trying to have lesser options verbose|debug.
The referrers' annotations are useful metadata for users. However, I have concerns on showing referrers' annotations recursively in the default output may complicate the tree hierarchy, especially when there are multiple referrers and each has a bunch of annotations. The reference graph relationship between the root image and referrers will be hard to recognized. Just as the example output shared by @Wwwsylvia above.
From the user's point of view, the purpose of querying a tree view is to list a tree of the referrers and show their dependency hierarchy. Annotations are supposed to be printed only when users want to dig into the detailed metadata of each referrer.
Considering annotation is a key-value format, I would suggest showing annotations metadata in a JSON or table format. This will provide a better user experience to the formatted output.
I would suggest refine the output of --format tree by merging --format tree-full into --format tree.
The problem of the --format tree-full is that the annotations are mixed with the artifact type of the referrers. Those annotations should share the same root node under the subject node.
I would suggest refine the output of --format tree by merging --format tree-full into --format tree.
The problem of the --format tree-full is that the annotations are mixed with the artifact type of the referrers. Those annotations should share the same root node under the subject node
Putting <> around the artifact type of the referrer
Making annotations a separate node
Use * mark to list the annotations
This tree view looks much more straightforward to me, but the artifact reference hierarchy looks complicated when there is multiple referrers.
If we want to output annotations of each referrer in the tree view, we may need to consider providing a flag to allow users to hide the annotations for a simple tree view, just like a silent mode.
Using different colors via TTY sounds good for usability. Can we do a PoC to show its effect?
Just to confirm the same data should be shown according to the format that users choose, right? So, although we are discussing tree view, but what is shown on tree view should be shown for Json format, right?
Colors look pretty cool and [annotations] LGTM, but showing [annotations] as a separate child node may not be the optimal solution. My only concern is that users might mistake [annotations] is a referrer. We need to document the design logics of tree view on oras.land.
changed the title [-]Add a new `--format tree-full` flag for `oras discover`[/-][+]show annotations by default for `oras discover --format tree`[/+]on Mar 28, 2025
Activity
Horiodino commentedon Jan 1, 2025
Hi, I’m interested in working on this. If no one else is currently assigned, would it be alright if I take it on?
Wwwsylvia commentedon Jan 2, 2025
Hi @Horiodino , thank you for volunteering! Sure please feel free to create a PR and let us know if anything is unclear.
Just a note: In #1558 we deprecated the
--verboseflag for other commands butoras discover. It's time to apply the same fororas discoveras well when we add--format tree-fullto it.sajayantony commentedon Jan 8, 2025
Really nice to see this coming together. Given that the discover was done before the OCI specification was finalized, it might be good to actually show the annotations in the default output. This aligns well with the API.
Annotations are the main way for a user to consume the output since IMHO the set of digests alone might not usable besides giving an indication.
Basically my vote would be to avoid a
tree-fulloption and just make this the default output as its more usable.i’m also considering the fact that that we are trying to have lesser options
verbose|debug.Horiodino commentedon Jan 8, 2025
ok 👍 i will apply the changes
Wwwsylvia commentedon Jan 10, 2025
When there are multiple referrers with the same artifact type, annotations can be helpful in distinguishing the referrers, however the way we display it does look overwhelming.
Here is an experiment I did:
oras discoveroutput without annotations:oras discoveroutput with annotations:oras discoveroutput in table format:FeynmanZhou commentedon Jan 10, 2025
@sajayantony
The referrers' annotations are useful metadata for users. However, I have concerns on showing referrers' annotations recursively in the default output may complicate the tree hierarchy, especially when there are multiple referrers and each has a bunch of annotations. The reference graph relationship between the root image and referrers will be hard to recognized. Just as the example output shared by @Wwwsylvia above.
From the user's point of view, the purpose of querying a tree view is to list a tree of the referrers and show their dependency hierarchy. Annotations are supposed to be printed only when users want to dig into the detailed metadata of each referrer.
Considering annotation is a key-value format, I would suggest showing annotations metadata in a JSON or table format. This will provide a better user experience to the formatted output.
shizhMSFT commentedon Jan 21, 2025
I would suggest refine the output of
--format treeby merging--format tree-fullinto--format tree.The problem of the
--format tree-fullis that the annotations are mixed with the artifact type of the referrers. Those annotations should share the same root node under the subject node.1 remaining item
shizhMSFT commentedon Jan 22, 2025
@Wwwsylvia Instead of putting special marks, I'm thinking about using different colors via TTY.
Horiodino commentedon Jan 26, 2025
Could someone please give a final review so we can make the necessary changes? Everyone seems to have different opinions.
FeynmanZhou commentedon Feb 18, 2025
This tree view looks much more straightforward to me, but the artifact reference hierarchy looks complicated when there is multiple referrers.
If we want to output annotations of each referrer in the tree view, we may need to consider providing a flag to allow users to hide the annotations for a simple tree view, just like a silent mode.
Using different colors via TTY sounds good for usability. Can we do a PoC to show its effect?
yizha1 commentedon Feb 19, 2025
Just to confirm the same data should be shown according to the format that users choose, right? So, although we are discussing tree view, but what is shown on tree view should be shown for Json format, right?
shizhMSFT commentedon Feb 20, 2025
@Wwwsylvia @FeynmanZhou How about just making annotations a separate node with coloring?
Again, with no color (
--no-tty):The new node is named
<annotations>as we already have a<unknown>node defined for empty artifact type.Wwwsylvia commentedon Feb 21, 2025
Colors LGTM.
If
<>has been occupied by node, how about[annotations]😀?Horiodino commentedon Feb 21, 2025
LGTM ,adding more flags is bad ux.
shizhMSFT commentedon Feb 24, 2025
The proposal of
[annotations]also LGTM.Wwwsylvia commentedon Feb 24, 2025
We should also fix the docs issue for the
--no-ttyflag: #1630FeynmanZhou commentedon Feb 24, 2025
Colors look pretty cool and
[annotations]LGTM, but showing[annotations]as a separate child node may not be the optimal solution. My only concern is that users might mistake[annotations]is a referrer. We need to document the design logics of tree view onoras.land.[-]Add a new `--format tree-full` flag for `oras discover`[/-][+]show annotations by default for `oras discover --format tree`[/+]