-
Notifications
You must be signed in to change notification settings - Fork 181
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 #1011
Comments
Several questions regarding what kind of artifacts should be produced by oras commands with OCI image-spec 1.1.0. Taking The guidelines for artifact usage in image-spec rc4, the artifact can be put into either 1) Question 1: Between Question 2: If the artifact type is packed into the |
As I've mentioned in #1043 (comment), For question 2, I would suggest no fallback based on the above default behavior. |
If a user provides an artifact type without specifying image spec version, and oras v1.1 pack it into Here is a detailed example based on oras push localhost:5000/test:artifact --artifact-type test.artifact.type oras v1.0.0 will generate below manifest: {
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"config": {
"mediaType": "test.artifact.type",
"digest": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
"size": 2
},
"layers": [],
"annotations": {
...
}
} My question is: if oras v1.1.x generates below manifest for the same command, should it be considered as a breaking change? {
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"artifactType": "test.artifact.type",
"config": {
"mediaType": "application/vnd.oci.empty.v1+json",
"digest": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
"size": 2
},
"layers": [],
"annotations": {
...
}
} To facilitate understanding, here is the diff of manifests generated by v1.0.0(before) and v1.1.x(after) {
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.manifest.v1+json",
+ "artifactType": "test.artifact.type",
"config": {
- "mediaType": "test.artifact.type",
+ "mediaType": "application/vnd.oci.empty.v1+json",
"digest": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
"size": 2
},
"layers": [],
"annotations": {
...
}
} |
We had to add the {
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"config": {
"mediaType": "test.artifact.type",
"digest": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
"size": 2
},
"layers": [],
"annotations": {
// ...
}
} The blob
There was a conflict between that mediaType being used for the artifact and that mediaType being used to reference the blob content. Hence the empty descriptor definition was added along with the artifactType field to get back into compliance with the spec while supporting artifact use cases that did not have their own dedicated config blob. |
@sudo-bmitch Thanks for the feedback. Just to confirm, are you suggesting that below is the preferred artifact manifest that should be produced by oras CLI to avoid any ambiguity: {
...
"artifactType": "test.artifact.type", // specified via `--artifact-type`
"config": {
"mediaType": "application/vnd.oci.empty.v1+json",
"digest": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
"size": 2
},
...
} |
@qweeah yes. I'd still read the old format, but write the new one for artifacts going forward. Let me know if you see registries rejecting that today. At least check, I think ECR started allowing it, which was the only hold out that I was aware of. |
To clarify my above comment (since it's getting linked outside of this issue), generating with the When there is a config blob for the artifact (e.g. helm charts), there's often no need to add an additional If an artifact needs to override the |
Related issue: #532 Related discussion: oras-project/oras#1011 (comment) Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
This issue was closed because it has been stalled for 30 days with no activity. |
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.
The text was updated successfully, but these errors were encountered: