-
Notifications
You must be signed in to change notification settings - Fork 190
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!: support showing indirect referrers for all formats of oras discover
#1653
base: main
Are you sure you want to change the base?
feat!: support showing indirect referrers for all formats of oras discover
#1653
Conversation
Signed-off-by: Xiaoxuan Wang <[email protected]>
oras discover
oras discover
Signed-off-by: Xiaoxuan Wang <[email protected]>
cmd.Flags().BoolVarP(&opts.verbose, "verbose", "v", false, "display full metadata of referrers") | ||
cmd.Flags().IntVarP(&opts.depth, "depth", "", 20, "level of indirect referrers to display") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any ideas about a better default value than 20?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the specified depth is less or equal than 0, it should be considered as infinity. And we can use 0
as the default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we use 0 to represent infinity, we will need to do extra explanation to the users and it may cause confusion.
Signed-off-by: Xiaoxuan Wang <[email protected]>
oras discover
oras discover
Signed-off-by: Xiaoxuan Wang <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1653 +/- ##
==========================================
+ Coverage 84.38% 84.56% +0.18%
==========================================
Files 125 125
Lines 5661 5657 -4
==========================================
+ Hits 4777 4784 +7
+ Misses 629 621 -8
+ Partials 255 252 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
What this PR does / why we need it:
This pull request:
--depth
flag tooras discover
command and it applies to all formats. It represents the depth of referrers to display. For example when depth is 1, the command shows only direct referrers; when depth is 2, it shows direct referrers and their referrers. Default is 20, which in practice usually shows all referrers of an image.table
andjson
formats, which previously was showing only the indirect referrers. Now all formats by default show all levels of referrers.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Part of #1403
Please check the following list: