containers / skopeo

Work with remote images registries - retrieving information, images, signing content
Apache License 2.0
8.06k stars 766 forks source link

Skopeo inspect outright fails with OCI artifacts #1933

Open mpagot opened 1 year ago

mpagot commented 1 year ago

With Skopeo 1.5.0 I was able to get

% podman run -it skopeo/stable:v1.5.0 inspect docker://registry.opensuse.org/devel/sap/trento/factory/charts/trento/trento-server:1.2.2-dev2

{
    "Name": "registry.opensuse.org/devel/sap/trento/factory/charts/trento/trento-server",
...
    "Env": null
}

With the latest Skopeo version I have an error

% podman run -it skopeo/stable:v1.11.1 inspect docker://registry.opensuse.org/devel/sap/trento/factory/charts/trento/trento-server:1.2.2-dev2

FATA[0000] unsupported image-specific operation on artifact with type "application/vnd.cncf.helm.config.v1+json"
mtrmac commented 1 year ago

Thanks for your report.

The change to refuse to provide image-specific data for non-image artifacts is intentional, although we didn’t anticipate that completely breaking skopeo inspect.

What do you actually use skopeo inspect for in this case? The only data that is relevant for the artifact is name (already known to the user), other tags in the repo (available via list-tags), and data about the blob digests/MIME types/sizes.

So what is the necessary output? Is it essentially an image presence check? Is the goal to list data about the blobs (and if so, for what purpose)? Something else?

mpagot commented 1 year ago

Last version working for me is 1.8.0. First version with this FATA is 1.9.0 Looking at the code I'd guess it has been introduced with https://github.com/containers/skopeo/commit/62158a58bcef9240e821d92253484420b952ddbe

mpagot commented 1 year ago

I agree with you that skopeo inspect is not needed for helm chart

Feel free to close this issue

mtrmac commented 1 year ago

I think this report is valuable — and I meant the question about what is the purpose and expected output.


On the one hand, the current fields of skopeo inspect are mostly inapplicable to artifacts, and there are no reasonable substitute values that could be used instead (e.g. for architecture), so just failing does seem appropriate right now.

OTOH, there are probably some uses of skopeo inspect that make sense; at the very least “what is that thing at all?” is a question that should be possible to answer using skopeo inspect in some reasonably convenient way.

Compare #1283 . At this point it’s not clear to me what a good UI would look like, so I’m starting by looking for use cases.

mpagot commented 1 year ago

My use case use a script calling skopeo inspect in a loop against a mixed list of images and artifact. The output was only used to create a log file for possible further debug. So I'm not expecting any particular content. For my particular use case I'll probably improve the loop by checking the type of image and skip the skopeo inspect for the artifacts.

github-actions[bot] commented 1 year ago

A friendly reminder that this issue had no activity for 30 days.