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

Request for Feedback: OCI image-spec 1.1.0 #2030

Open
sudo-bmitch opened this issue Jul 6, 2023 · 7 comments
Open

Request for Feedback: OCI image-spec 1.1.0 #2030

sudo-bmitch opened this issue Jul 6, 2023 · 7 comments
Labels
kind/feature A request for, or a PR adding, new functionality

Comments

@sudo-bmitch
Copy link

OCI is approaching a 1.1.0 release on the image-spec and distribution-spec, so we are reaching out to implementations to see if you have any concerns implementing support for those changes that we should address before a GA release.

A full diff of the changes can be viewed at:

I'm happy to take feedback here, you can raise an issue in OCI, or respond in our tracking issue at opencontainers/image-spec#1093.

@mtrmac mtrmac added the kind/feature A request for, or a PR adding, new functionality label Jul 12, 2023
@mtrmac
Copy link
Collaborator

mtrmac commented Jul 28, 2023

@sudo-bmitch Looking at the distribution spec so far, I have filed opencontainers/distribution-spec#454 . I don’t think that’s blocking the spec release at all.


Note to self - distribution spec changes:

Other spec points of note:

  • (Recorded elsewhere) Deleting a tag, not a manifest by digest, is possible
  • “A 4XX response code from the registry MAY return a body in any format” (contra the traditional docker/distribution implementation), but if it is JSON, there is a mandatory format.

@mtrmac
Copy link
Collaborator

mtrmac commented Jul 28, 2023

Note to self — image spec changes:

  • New os.* and variant, ArgsEscaped fields in image config — probably mostly irrelevant, but see e.g. checkImageDestinationForCurrentRuntime. OTOH Podman might need to update how it creates runtime-spec data, per https://github.com/opencontainers/image-spec/blob/main/conversion.md : runtime-spec conversion does not follow current OCI spec podman#19459 .
  • data property in descriptors — probably consume it, and possibly produce it (with what heuristics?)
  • artifactType property in descriptors — seems irrelevant right now
  • subject field on both manifests and image indices.
  • artifactType in manifests; “ the config.mediaType is set to the empty value, the artifactType MUST be defined.”
  • “Any extra fields in the Image JSON struct are considered implementation specific and MUST NOT generate an error by any implementations which are unable to interpret them.” - probably worth adding a test. (OTOH they are also ignored on format conversions)
  • “Implementations processing content SHOULD NOT generate an error if they encounter an unknown property in a known media type.” [Sure, but to be explicit that data is just lost on edits.] Probably worth adding tests, both for parsing in general, and possibly that no-edit copies don’t lose that data.
  • (Entries in index’manifests:) “An encountered mediaType that is unknown to the implementation MUST NOT generate an error.”
  • (Manifest itself:) “An encountered mediaType that is unknown MUST NOT generate an error.”
  • “Implementations storing or copying image manifests MUST NOT error on encountering a [config MIME type] value that is unknown to the implementation.”, and “MUST NOT attempt to parse the referenced content if this media type is unknown”
  • Manifests’ layers “SHOULD have at least one entry”, i.e. we should not break on 0 (but there MUST be a layer on on a non-artifact)
  • Manifests’ layers “Implementations storing or copying image manifests MUST NOT error on encountering a mediaType that is unknown to the implementation.”
  • application/vnd.oci.empty.v1+json for “unused descriptors” — we probably don’t need to treat that specially.

Other spec points of note:

  • “JSON content SHOULD be serialized as canonical JSON”
  • specs-go/v1/Image{LayoutFile,LayoutVersion,IndexFile,BlobsDir should be used in the oci* transports.

@mtrmac
Copy link
Collaborator

mtrmac commented Jul 28, 2023

@sudo-bmitch Looking at containers/image, I think the changes are very useful and I have no concerns with the spec.

It will take some time for the “MUST” compatibility mechanisms on manifest upload / deletion to be implemented, though — both to just implement them (they don’t exist right now in c/image), for the implementations to propagate to supported products, and ultimately for users to upgrade their stable systems which can already upload OCI manifests. So I’m not sure that the “MUST” requirements, in practice, provide a guarantee any other part of the ecosystem can rely on, outside of repos with strictly controlled writers (which don’t really EDIT need this world-wide spec guarantee to impose that strict control).

@cgwalters
Copy link
Contributor

I think the idea is it's basically "MUST" if one claims/advertises 1.1 support/compliance.

@sudo-bmitch
Copy link
Author

I think the idea is it's basically "MUST" if one claims/advertises 1.1 support/compliance.

That's exactly it. The "MUST" sections turn into a conformance test for registries to advertise support for 1.1 conformance. For clients, it's good to ensure you have support for older and non-conformant registries.

@mtrmac
Copy link
Collaborator

mtrmac commented Aug 7, 2023

#2062 fixes the low-hanging fruit.

More is tracked by RH as https://issues.redhat.com/browse/RUN-1880 .

@davidspek
Copy link

distribution/distribution is waiting for the release to be cut before implementing the changes (see distribution/distribution#3834 (comment)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature A request for, or a PR adding, new functionality
Projects
None yet
Development

No branches or pull requests

4 participants