Skip to content
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

Image Manifest config must allow any mediaType? #1026

Closed
wants to merge 1 commit into from

Conversation

brackendawson
Copy link

@brackendawson brackendawson commented Feb 13, 2023

Following investigations in #1025 I noticed that a registry behaving like Quay.io can comply with the 1.1 spec but only allow an Image Manifest artifact with an artifactType of application/vnd.oci.image.config.v1+json.

Should this be a MUST or a SHOULD, or is the existing text already appropriate?

Signed-off-by: Bracken Dawson [email protected]

Implementations MUST support at least the following media types:

- [`application/vnd.oci.image.config.v1+json`](config.md)
Implementations MUST support any media type that complies with [RFC 6838][rfc6838], including the [naming requirements in its section 4.2][rfc6838-s4.2], and MAY be registered with [IANA][iana].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a bit confused by this change - it now mandates implementations to support any media types, which isn't feasible.

Would it be clearer for you if we added a single line on line 40 like this:

 Implementations MUST support at least the following media types:
        - [`application/vnd.oci.image.config.v1+json`](config.md)
 
        Manifests concerned with portability SHOULD use one of the above media types.

        **Manifests MAY use, and implementations MAY support, other media types not defined here.**

        If the manifest uses a different media type than the above, it MUST comply with [RFC 6838][rfc6838], including the [naming requirements in its section 4.2][rfc6838-s4.2], and MAY be registered with [IANA][iana].

Copy link
Author

@brackendawson brackendawson Feb 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose it depends what kind of implementation you are, a registry can trivially support any media type, it just has to store the blob. And doing this makes artifacts the most portable.

A container runtime needs the information in there, so it can only support known media types, or maybe also their ducks.

Copy link
Contributor

@sudo-bmitch sudo-bmitch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the comments that this isn't feasible for container runtimes (like containerd and runc) to support any config mediaType. We'd need to split the wording for different scenarios (runtimes, registries, and other content producers/consumers).

@brackendawson
Copy link
Author

I think if any change is needed to the config.mediaType description it probably belongs in #1043 now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants