-
Notifications
You must be signed in to change notification settings - Fork 663
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
Proposal: Resolve contradiction between image index and image layout mediaTypes #870
Comments
@jonjohnsonjr thoughts? |
I read this differently. The spec says (emphasis mine):
IMO, this means that This bit explains that an index containing other media types are not an error:
So I don't see the contradiction. |
To me, "Future versions of the spec" means "the current version of the spec DOES NOT support mediaTypes other than manifest and index". It would be nice to either correct this phrasing, or remove the |
The key phrase to me is:
Which in an ideal world means the server would not throw an error, and accept it without any special validation. The manifest digest that descriptor points to should not be GC'd. And clients that don't know how to use that media type would search the index for a media type they do know how to handle. To me this is giving implementers advance notice of where future expansion in the spec is expected, and where users may add their custom logic, so we can design tools to not fail when this occurs. This is the Index equivalent of the unknown json fields we'd see in an Image, and follows the extensibility goal. |
The fact that moby/buildkit#2251 shows an example manifest.
|
Currently the image index says: Future versions of the spec MAY use a different mediatype (i.e. a new versioned format). An encountered mediaType that is unknown to the implementation MUST be ignored.
Also, the image layout includes a different mediaType.
This is a contradiction as the current version of the spec says the only mediaType allowed in an image index is
application/vnd.oci.image.manifest.v1+json
andapplication/vnd.oci.image.index.v1+json
and the image layout has an errantapplication/xml
. This is confusing to readers of the spec. Perhaps remove "Future versions" and outright say that implementers MAY use other mediaTypes.The text was updated successfully, but these errors were encountered: