-
Notifications
You must be signed in to change notification settings - Fork 206
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 inspection of unsigned schema1 images #1748
Conversation
... just because this is incorrect and confusing. Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
... by not incorrectly invoking the schema2 code; otherwise it tries to unmarshal nil as JSOn, and fails. I'm not sure whether schema1 images can contain a comment or a health check; just not crashing is an improvement. Signed-off-by: Miloslav Trmač <[email protected]>
(It would be nice to have unit tests for inspect, but I’m primarily working on other things; this is just a minimal change so that the original diagnosis is not completely lost.) |
Tested manually: $ for f in oci v2s2 v2s1; do skopeo copy --format $f docker://quay.io/libpod/alpine dir:f-$f || break; done
$ cp -a f-v2s1 f-v2s1-unsigned
$ vi f-v2s1-unsigned/manifest.json # to remove the "signatures" top-level field
$ for f in oci v2s2 v2s1 v2s1-unsigned; do bin/podman rmi -a && skopeo copy --preserve-digests dir:f-$f containers-storage:f-$f && bin/podman image inspect f-$f || break; done The
|
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mtrmac, vrothberg The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
… by not doing anything, like with the (much more common) signed schema1 images.
Fixes containers/podman#20156 .