Skip to content

Clarify ignore language, ensure future compat#1028

Closed
AaronFriel wants to merge 2 commits intoopencontainers:mainfrom
AaronFriel:friel/ignore-accept
Closed

Clarify ignore language, ensure future compat#1028
AaronFriel wants to merge 2 commits intoopencontainers:mainfrom
AaronFriel:friel/ignore-accept

Conversation

@AaronFriel
Copy link
Copy Markdown
Contributor

The usage of "ignore[d]" appears may have resulted in ambiguous parsing of the spec.

One interpretation is that OCI 1.0 already required registries to accept Artifact and future media types, and implementations - clients and registries - that fail to handle arbitrary media types for blobs, arbitrary media types for image configs.

Signed-off-by: Aaron Friel <mayreply@aaronfriel.com>
It is set to true if this history item doesn't correspond to an actual layer in the rootfs section (for example, Dockerfile's [ENV](https://docs.docker.com/engine/reference/builder/#/env) command results in no change to the filesystem).

Any extra fields in the Image JSON struct are considered implementation specific and MUST be ignored by any implementations which are unable to interpret them.
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.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is specific to registry implementations, right? (as opposed to "client implementations" which feels included in that "any")

In other words, the intent is that we expect Docker Hub and friends to accept Helm charts, but it's still 100% reasonable and expected for the Docker CLI/Engine to bail with a helpful error if you try to docker run a Helm chart. 😅

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, hm.

An example of a client that's in-the-middle is, e.g., oras copy. I expect ORAS to faithfully copy manifests and blobs from one registry to another. But I suppose that's a "MAY".

@sudo-bmitch
Copy link
Copy Markdown
Contributor

Related: #902

Signed-off-by: Aaron Friel <mayreply@aaronfriel.com>
@AaronFriel
Copy link
Copy Markdown
Contributor Author

@sudo-bmitch @tianon PTAL, I've amended this in two ways:

Grandfathering OCI 1.1-rc behavior

Documenting deviation from the descriptor spec, but limiting the blast radius. That is, rather than destroy the value of the media type, codify it as opaque and inaccurate in a limited number of cases.

This preserves the intent of the descriptor spec, which I fear with #999 will be irreparably damaged.

This change should not conflict with #1029, except #1029 should be changed to indicate that this "SCRATCH" specification exists only for artifacts using image manifests and going forward, implementations SHOULD use artifact manifest.

Distinguishing behavior of clients vs registries/proxies

Implementations fall into two categories:

  1. Storing and copying content, which MUST accept arbitrary media types and content for manifests and blobs.
  2. Processing content, which MUST NOT generate an error when encountering unknown properties. (Implied: they MAY generate an error when encountering unknown manifests.)

@AaronFriel
Copy link
Copy Markdown
Contributor Author

PTAL

AaronFriel added a commit to AaronFriel/image-spec that referenced this pull request Mar 2, 2023
Implementations lack any information to determine whether the `config` property
of an Image Manifest describes the `artifactType` of the manifest, or the media
type of the referenced content. This is necessitated by the removal of artifact
manifest (opencontainers#999) and addition of scratch descriptors (opencontainers#1023) to support
artifacts.

If opencontainers#999 is withdrawn, this pull request should be withdrawn as well and opencontainers#1028
considered instead.
AaronFriel added a commit to AaronFriel/image-spec that referenced this pull request Mar 2, 2023
Implementations lack any information to determine whether the `config` property
of an Image Manifest describes the `artifactType` of the manifest, or the media
type of the referenced content. This is necessitated by the removal of artifact
manifest (opencontainers#999) and addition of scratch descriptors (opencontainers#1023) to support
artifacts.

If opencontainers#999 is withdrawn, this pull request should be withdrawn as well and opencontainers#1028
considered instead.

Signed-off-by: Aaron Friel <mayreply@aaronfriel.com>
@AaronFriel
Copy link
Copy Markdown
Contributor Author

Closing in favor of #1030

@AaronFriel AaronFriel closed this Mar 2, 2023
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