-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Podman manifest inspect does not display remote annotations #23163
Comments
isn't it just a visualization issue or am I missing something? @mtrmac is there any reason why we are hardcoding Dropping the hardcode value is enough to print the annotations. diff --git a/pkg/domain/infra/abi/manifest.go b/pkg/domain/infra/abi/manifest.go
index 144740ec8..82d300192 100644
--- a/pkg/domain/infra/abi/manifest.go
+++ b/pkg/domain/infra/abi/manifest.go
@@ -189,7 +189,7 @@ func (ir *ImageEngine) remoteManifestInspect(ctx context.Context, name string, o
if err != nil {
return nil, fmt.Errorf("parsing manifest blob %q as a %q: %w", string(result), manType, err)
}
- list, err := listBlob.ConvertToMIMEType(manifest.DockerV2ListMediaType)
+ list, err := listBlob.ConvertToMIMEType(manType)
if err != nil {
return nil, err
} |
(I didn’t know Podman has this feature…) History points at #7735 (comment) for motivation; the 7ac8000cc1 commit, also, points out the existence of podman/pkg/api/handlers/libpod/manifests.go Line 200 in 3b07ae4
AFAICT the local Podman variant doesn’t care / doesn’t say one way or the other about the output, the data is just a blob that is printed to stdout, and the man page doesn’t document anything about it. In the remote Podman case, the data is clearly expected to be The local-storage code path in So, assuming the “remote-registry inspect” code path is the rarely used one, that one should also return I also think that The remote-registry inspect code also seems to be returning data from a non-manifest-list v2s2 images ( #8100 ). With a warning, but, still. I don’t know how, if at all, that could fit into the better-typed API. Also note that this is unable to handle non-index OCI images. My impression is that adding this feature has just been a mistake (note that the remote Podman client can’t unmarshal the returned data), but it might also be a mistake we can’t undo any more. I don’t know. |
The define.ManifestListData attempts to be a union of all of the information that could be expressed in either a Schema 2 or OCI manifest, with the hope that all of its contents, whichever format it's in, will all be preserved across a JSON encoding/decoding cycle. Looking at it again, its
I think the swagger for the remote API only notes that this returns JSON, but beyond that I don't think it specifies anything about the format that it returns, so the remote path could switch to passing back whatever it received from the registry without even looking at it. If we extend
I will note that I do not enjoy the ambiguity of this "sometimes this looks at a local image, sometimes it doesn't" behavior. |
I’m sorry, in “My impression is that adding this feature has just been a mistake” I was referring to |
(The remote client is using the inspect endpoint (via |
A friendly reminder that this issue had no activity for 30 days. |
At the very least the |
Fixes: containers#23163 Signed-off-by: Daniel J Walsh <[email protected]>
Issue Description
Related to discussions in thread
If you run
podman manifest inspect quay.io/giuseppe/zstd-chunked:fedora-manifest
on any remote manifest, you are unable to see the annotations which were added to the zstd:chunked manifest.Compare the output of the following commands:
Steps to reproduce the issue
See above.
podman manifest inspect
on the local manifest (and see annotations)podman manifest inspect
on the remote manifest (and see no annotations)Describe the results you received
As above
Describe the results you expected
I would expect
podman manifest inspect
to show all annotations on the manifests, since an annotation is a requirement for zstd images.When running
skopeo inspect --raw
, we can see the annotations, so I expected Podman to return the same.podman info output
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
N/A
Additional information
N/A
The text was updated successfully, but these errors were encountered: