-
Notifications
You must be signed in to change notification settings - Fork 84
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
fix: Improve output when there is no signature associated #666
Conversation
3efd9f2
to
db8829d
Compare
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## main #666 +/- ##
==========================================
- Coverage 33.33% 33.21% -0.12%
==========================================
Files 32 32
Lines 2019 2026 +7
==========================================
Hits 673 673
- Misses 1324 1331 +7
Partials 22 22
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
if !titlePrinted { | ||
fmt.Printf("%s has no associated signature\n", ref) | ||
} |
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.
Do we need this printout? If there is no associated signature, the output of list is just empty.
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.
Yes, otherwise the output (as shown below) looks incomplete.
For unsigned image referred by tag, user wont know which image was inspected/listed.
# unsigned image referred by tag
➜ notation git:(no-sig) ✗ ./notation inspect $IMAGE
Warning: Always inspect the artifact using digest(@sha256:...) rather than a tag(:v1) because resolved digest may not point to the same signed artifact, as tags are mutable.
For unsigned image referred by digest, not printing anything doesn't looks right and would like to keep output consistent with unsigned image refereed by tag
# unsigned image referred by digest
➜ notation git:(no-sig) ✗ ./notation inspect $IMAGE
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.
Yes, otherwise the output (as shown below) looks incomplete.
For unsigned image referred by tag, user wont know which image was inspected/listed.
# unsigned image referred by tag ➜ notation git:(no-sig) ✗ ./notation inspect $IMAGE Warning: Always inspect the artifact using digest(@sha256:...) rather than a tag(:v1) because resolved digest may not point to the same signed artifact, as tags are mutable.For unsigned image referred by digest, not printing anything doesn't looks right and would like to keep output consistent with unsigned image refereed by tag
# unsigned image referred by digest ➜ notation git:(no-sig) ✗ ./notation inspect $IMAGE
Got it. Makes sense to me.
Signed-off-by: Pritesh Bandi <[email protected]>
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.
LGTM
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.
LGTM
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.
LGTM
Fixes: #624