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
Oras Discover - json output include details of the image itself and not just directly attached artifacts (option for all artifacts) #1403
update the --format json option to include details of the image itself including digest and application type.
Can we also have a flag to output all artifacts whether direct or indirect in the json output. So for example if i have an sbom attached as an artifact, which is signed, - the json output shows the sbom details but no mention of the signature for the sbom.
Why is this needed for ORAS?
At moment because the json doesn't include the image details i am havig to discover that info by other means. Ideally the three supported output formats of json / tree and table should be aligned so they all output the same - ideally everything.(or indirect via a switch if need be)
Are you willing to submit PRs to contribute to this feature?
Yes, I am willing to implement it.
Reacted by Feynman Zhou, Billy Zha, Yi Zha and Xiaoxuan Wang
Metadata of the subject image should be included in the JSON output of oras discover
Support showing indirect referrers in the JSON output of oras discover (This requires redesign fields in v1.2.0's model and might introduce breaking changes)
Based on the community discussion on Feb 18, @oras-project/oras-cli ORAS maintainers agreed on these things:
Show root image and its all referrers in the JSON output by default. This ensures data consistency among other data format output (e.g. tree, table)
Use referrers as the field name in the top-level and second-level referrers, instead of manifests
Show the referrers with full depth by default, introduce a flag --depth to allow users to limit the maximum depth of referrers in the formatted output.
ORAS will not introduce an additional flag to limit the number of referrers now since there is no clear performace concern so far. ORAS can provide the automatic timeout mechanism to users in case too many referrers with a root image.
Use JSON Schema and text to list the fields in formatted output
I'll split this issue into two pull requests for easier implementation:
Show the root image when running oras discover --format json, use referrers as the field name
Show the referrers with full depth by default, introduce a flag --depth to allow users to limit the maximum depth of referrers in the formatted output. This applies to all available formats.
I'll split this issue into two pull requests for easier implementation:
Show the root image when running oras discover --format json, use referrers as the field name[ ] Show the referrers with full depth by default, introduce a flag --depth to allow users to limit the maximum depth of referrers in the formatted output. This applies to all available formats.
@wangxiaoxuan273 It's good to split it into two or even more PRs to address this issue for easier code review. I also updated my spec in #1625 .
Activity
qweeah commentedon Jun 12, 2024
I can see two requirements raised in this issue:
oras discoveroras discover(This requires redesign fields in v1.2.0's model and might introduce breaking changes)/cc @FeynmanZhou @yizha1
@akcrisp Feel free to add more details
sajayantony commentedon Jul 17, 2024
Nested artifacts can be challenging but the subject of the referrers can be included as a descriptor in the format output.
qweeah commentedon Nov 27, 2024
https://github.com/qweeah/oras/releases/tag/v1.2.0-discover
Sharing a demo of my own private build back in June. This private build
manifeststo the format model oforas discoverto show metadata of the referrers.-r/recursiveto show indirect referrers.To install
Here is a demo of listing indirect referrers in the formatted output
FeynmanZhou commentedon Dec 10, 2024
This is a totally valid feature request to me. The formatted output of
oras discoveris supposed to show the image itself not just the referrers.Thanks @qweeah for sharing the idea and PoC. I will need to validate it and update the formatted output spec first. I moved this issue to v1.3.0-beta.2
wangxiaoxuan273 commentedon Mar 7, 2025
From #1625 (comment)
Based on the community discussion on Feb 18, @oras-project/oras-cli ORAS maintainers agreed on these things:
referrersas the field name in the top-level and second-level referrers, instead ofmanifests--depthto allow users to limit the maximum depth of referrers in the formatted output.wangxiaoxuan273 commentedon Mar 7, 2025
I'll split this issue into two pull requests for easier implementation:
oras discover --format json, usereferrersas the field nameFeynmanZhou commentedon Mar 7, 2025
@wangxiaoxuan273 It's good to split it into two or even more PRs to address this issue for easier code review. I also updated my spec in #1625 .
wangxiaoxuan273 commentedon Mar 7, 2025
Based on the offline discussion on March 7, the following conclusions have been reached:
oras discoverwill be deprecated.