-
Notifications
You must be signed in to change notification settings - Fork 206
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
Missing backwards compatibility and upgrade procedures for Artifact Manifest #368
Comments
Clients MUST support older version of the distribution-spec, but the manifest definitions are part of image-spec. Registries and clients may chose to reject unknown media types, and the distribution-spec describes the Accept headers the clients should send, and the responses from the registry when it rejects a manifest. So if a registry does not support the artifact manifest, and a client attempts to push it, the registry should reject it with an error (I believe I would strongly discourage an automatic fallback from Artifact to Image manifests. Attempting to do this changes the manifest, so it is no longer the same, breaking reproducibility and the ability to compare manifests across different registries. When creating a manifest with an automatic fallback capability, there would be a motivation to default to the Artifact manifest and rely on the fallback, which will create non-portable manifests the moment the originating registry is upgraded before all other registries where the artifact may be later copied. And if an automatic fallback is attempted on a copy of an artifact between registries, that would alter the digest, breaking signing and causing a significant headache for mirroring tools to try to sort out what artifact maps to which between two registries. That mapping would also break when the fallback registry is later upgraded. Instead of an automatic fallback, I would recommend that tooling creating artifacts default to the Image manifest until there is reason to believe that all registries where the artifact may be copied have been upgraded. |
@sudo-bmitch I've changed my mind here, see: https://github.com/opencontainers/image-spec/pull/1004/files#r1093930361 |
The heading of the "Backwards Compatibility" section suggests to me that section(s) are missing:
The OCI Image Spec - artifact (apdx-7) type may not be supported by older versions of the OCI Distribution Spec, however this document prescribes that clients MUST support registries that fail to support this media type.
The
oras
CLI client'spush
command for example will automatically push an image manifest when an artifact manifest fails.Should the
oras push
client behavior be documented and codified here? I believe that documenting this would clarify what should happen onoras cp
and other subcommands.The text was updated successfully, but these errors were encountered: