-
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
manifest add/annotate
option doesn't look to work.
#15069
Comments
@flouthoc can you take a look? |
@vrothberg Sure. |
Found the issue: by default we generate inspect output with Patch which fixed for me: diff --git a/vendor/github.com/containers/common/libimage/manifest_list.go b/vendor/github.com/containers/common/libimage/manifest_list.go
index 4480df548..d68bb6aa8 100644
--- a/vendor/github.com/containers/common/libimage/manifest_list.go
+++ b/vendor/github.com/containers/common/libimage/manifest_list.go
@@ -14,6 +14,7 @@ import (
"github.com/containers/image/v5/types"
"github.com/containers/storage"
"github.com/opencontainers/go-digest"
+ v1 "github.com/opencontainers/image-spec/specs-go/v1"
)
// NOTE: the abstractions and APIs here are a first step to further merge
@@ -210,8 +211,8 @@ func (i *Image) IsManifestList(ctx context.Context) (bool, error) {
}
// Inspect returns a dockerized version of the manifest list.
-func (m *ManifestList) Inspect() (*manifest.Schema2List, error) {
- return m.list.Docker(), nil
+func (m *ManifestList) Inspect() (*v1.Index, error) {
+ return m.list.OCIv1(), nil
}
// Options for adding a manifest list. Output of
|
From above comment #15069 (comment)
@vrothberg WDYT about this point. I am inclined to change default to |
I also like the idea of a new flag |
I think we should follow what |
@vrothberg Could this be a breaking change since it changes the output struct of |
@flouthoc I think we can make it as the API returns raw bytes (i.e., Would need to happen in |
ManifestInspect should contain all known formats for a valid manifest list as of now only supported formats are `OCIv1` and `Docker` so inspect should support that. Example output from podman ```console podman manifest inspect test { "ociv1": { "schemaVersion": 2, "mediaType": "application/vnd.oci.image.index.v1+json", "manifests": [ { "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "digest": "sha256:9b2a28eb47540823042a2ba401386845089bb7b62a9637d55816132c4c3c36eb", "size": 528, "annotations": { "annotationTest1": "annotationTest2" }, "platform": { "architecture": "amd64", "os": "linux" } } ] }, "docker": { "schemaVersion": 2, "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json", "manifests": [ { "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "size": 528, "digest": "sha256:9b2a28eb47540823042a2ba401386845089bb7b62a9637d55816132c4c3c36eb", "platform": { "architecture": "amd64", "os": "linux" } } ] } } ``` Closes: containers/podman#15069 Signed-off-by: Aditya R <[email protected]>
ManifestInspect should contain all known formats for a valid manifest list as of now only supported formats are `OCIv1` and `Docker` so inspect should support that. Example output from podman ```console podman manifest inspect test { "ociv1": { "schemaVersion": 2, "mediaType": "application/vnd.oci.image.index.v1+json", "manifests": [ { "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "digest": "sha256:9b2a28eb47540823042a2ba401386845089bb7b62a9637d55816132c4c3c36eb", "size": 528, "annotations": { "annotationTest1": "annotationTest2" }, "platform": { "architecture": "amd64", "os": "linux" } } ] }, "docker": { "schemaVersion": 2, "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json", "manifests": [ { "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "size": 528, "digest": "sha256:9b2a28eb47540823042a2ba401386845089bb7b62a9637d55816132c4c3c36eb", "platform": { "architecture": "amd64", "os": "linux" } } ] } } ``` Closes: containers/podman#15069 Signed-off-by: Aditya R <[email protected]>
ManifestInspect should contain all known formats for a valid manifest list as of now only supported formats are `OCIv1` and `Docker` so inspect should support that. Example output from podman ```console podman manifest inspect test { "ociv1": { "schemaVersion": 2, "mediaType": "application/vnd.oci.image.index.v1+json", "manifests": [ { "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "digest": "sha256:9b2a28eb47540823042a2ba401386845089bb7b62a9637d55816132c4c3c36eb", "size": 528, "annotations": { "annotationTest1": "annotationTest2" }, "platform": { "architecture": "amd64", "os": "linux" } } ] }, "docker": { "schemaVersion": 2, "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json", "manifests": [ { "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "size": 528, "digest": "sha256:9b2a28eb47540823042a2ba401386845089bb7b62a9637d55816132c4c3c36eb", "platform": { "architecture": "amd64", "os": "linux" } } ] } } ``` Closes: containers/podman#15069 Signed-off-by: Aditya R <[email protected]>
ManifestInspect should contain all known formats for a valid manifest list as of now only supported formats are `OCIv1` and `Docker` so inspect should support fields from `OCIv1` format as well. Following commit adds a new field to inspect i.e `Annotations` from `OCIv1`. Example output from podman ```console podman manifest inspect test { "schemaVersion": 2, "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json", "manifests": [ { "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "size": 528, "digest": "sha256:9b2a28eb47540823042a2ba401386845089bb7b62a9637d55816132c4c3c36eb", "platform": { "architecture": "amd64", "os": "linux" }, "annotations": { "annotationTest1": "annotationTest2" } } ] } ``` Closes: containers/podman#15069 Signed-off-by: Aditya R <[email protected]>
ManifestInspect should contain all known formats for a valid manifest list as of now only supported formats are `OCIv1` and `Docker` so inspect should support fields from `OCIv1` format as well. Following commit adds a new field to inspect i.e `Annotations` from `OCIv1`. Example output from podman ```console podman manifest inspect test { "schemaVersion": 2, "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json", "manifests": [ { "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "size": 528, "digest": "sha256:9b2a28eb47540823042a2ba401386845089bb7b62a9637d55816132c4c3c36eb", "platform": { "architecture": "amd64", "os": "linux" }, "annotations": { "annotationTest1": "annotationTest2" } } ] } ``` Closes: containers/podman#15069 Signed-off-by: Aditya R <[email protected]>
ManifestInspect should contain all known formats for a valid manifest list as of now only supported formats are `OCIv1` and `Docker` so inspect should support fields from `OCIv1` format as well. Following commit adds a new field to inspect i.e `Annotations` from `OCIv1`. Example output from podman ```console podman manifest inspect test { "schemaVersion": 2, "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json", "manifests": [ { "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "size": 528, "digest": "sha256:9b2a28eb47540823042a2ba401386845089bb7b62a9637d55816132c4c3c36eb", "platform": { "architecture": "amd64", "os": "linux" }, "annotations": { "annotationTest1": "annotationTest2" } } ] } ``` Closes: containers/podman#15069 Signed-off-by: Aditya R <[email protected]>
ManifestInspect should contain all known formats for a valid manifest list as of now only supported formats are `OCIv1` and `Docker` so inspect should support fields from `OCIv1` format as well. Following commit adds a new field to inspect i.e `Annotations` from `OCIv1`. Example output from podman ```console podman manifest inspect test { "schemaVersion": 2, "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json", "manifests": [ { "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "size": 528, "digest": "sha256:9b2a28eb47540823042a2ba401386845089bb7b62a9637d55816132c4c3c36eb", "platform": { "architecture": "amd64", "os": "linux" }, "annotations": { "annotationTest1": "annotationTest2" } } ] } ``` Closes: containers/podman#15069 Signed-off-by: Aditya R <[email protected]>
ManifestInspect should contain all known formats for a valid manifest list as of now only supported formats are `OCIv1` and `Docker` so inspect should support fields from `OCIv1` format as well. Following commit adds a new field to inspect i.e `Annotations` from `OCIv1`. Example output from podman ```console podman manifest inspect test { "schemaVersion": 2, "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json", "manifests": [ { "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "size": 528, "digest": "sha256:9b2a28eb47540823042a2ba401386845089bb7b62a9637d55816132c4c3c36eb", "platform": { "architecture": "amd64", "os": "linux" }, "annotations": { "annotationTest1": "annotationTest2" } } ] } ``` Closes: containers/podman#15069 Signed-off-by: Aditya R <[email protected]>
ManifestInspect should contain all known formats for a valid manifest list as of now only supported formats are `OCIv1` and `Docker` so inspect should support fields from `OCIv1` format as well. Following commit adds a new field to inspect i.e `Annotations` from `OCIv1`. Example output from podman ```console podman manifest inspect test { "schemaVersion": 2, "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json", "manifests": [ { "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "size": 528, "digest": "sha256:9b2a28eb47540823042a2ba401386845089bb7b62a9637d55816132c4c3c36eb", "platform": { "architecture": "amd64", "os": "linux" }, "annotations": { "annotationTest1": "annotationTest2" } } ] } ``` Closes: containers/podman#15069 Signed-off-by: Aditya R <[email protected]>
ManifestInspect should contain all known formats for a valid manifest list as of now only supported formats are `OCIv1` and `Docker` so inspect should support fields from `OCIv1` format as well. Following commit adds a new field to inspect i.e `Annotations` from `OCIv1`. Example output from podman ```console podman manifest inspect test { "schemaVersion": 2, "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json", "manifests": [ { "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "size": 528, "digest": "sha256:9b2a28eb47540823042a2ba401386845089bb7b62a9637d55816132c4c3c36eb", "platform": { "architecture": "amd64", "os": "linux" }, "annotations": { "annotationTest1": "annotationTest2" } } ] } ``` Closes: containers/podman#15069 Signed-off-by: Aditya R <[email protected]> Signed-off-by: tomsweeneyredhat <[email protected]>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
.manifests[].annotations
field looks failed to display bypodman manifest inspect
.--feature
with--annotate
,--feature
is ignored.I think
no.2
issue related toMIME
type.annotations
field exist onlyoci
type.On the other hands,
features
field exists onlydocker
type.Therefore,
--features
should not be used with--annotation
.Steps to reproduce the issue:
manifest annotate
manifest add
Describe the results you received:
Describe the results you expected:
podman manifest inspect
display.manifests[].annotations
field .--feature
with--annotate
, or output warning message.Additional information you deem important (e.g. issue happens only occasionally):
The local manifest file exists
annotations
field.Output of
podman version
:version
Output of
podman info --debug
:info
Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
Fedora36, KVM
The text was updated successfully, but these errors were encountered: