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

Add a media type to the image manifest #437

Merged

Conversation

sudo-bmitch
Copy link
Contributor

@sudo-bmitch sudo-bmitch commented Jun 30, 2023

Media type is recommended for manifests and required in descriptors.

The media type was excluded from the empty layer manifest intentionally to verify registries support clients that ignore the "SHOULD" in the image spec.

Fixes #435

The media type was excluded from the empty layer manifest intentionally.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
@sudo-bmitch sudo-bmitch mentioned this pull request Jul 1, 2023
8 tasks
@sudo-bmitch sudo-bmitch added this to the v1.1.0 milestone Jul 1, 2023
@jdolitsky jdolitsky merged commit 51c53ef into opencontainers:main Jul 6, 2023
@sudo-bmitch sudo-bmitch deleted the pr-conformance-media-type branch July 6, 2023 17:02
@jdolitsky jdolitsky mentioned this pull request Jul 6, 2023
8 tasks
@@ -14,6 +14,9 @@ type manifest struct {
// SchemaVersion is the image manifest schema that this image follows
SchemaVersion int `json:"schemaVersion"`

// MediaType specifies the type of this document data structure e.g. `application/vnd.oci.image.manifest.v1+json`
MediaType string `json:"mediaType,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

kk.. trying to remember if there was a good reason for us to have our own copy of these types vs importing them from the aligning image spec release

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was asking the same thing recently. We are injecting a custom field in the descriptor where we can't just extend the struct in the test (since we would need to modify the manifests that include the descriptor). If we modified the tests to only extend the manifests with custom fields, this could become an import.

rchincha pushed a commit to rchincha/distribution-spec that referenced this pull request Jul 11, 2023
The media type was excluded from the empty layer manifest intentionally.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
sudo-bmitch added a commit to sudo-bmitch/distribution-spec that referenced this pull request Aug 18, 2023
The media type was excluded from the empty layer manifest intentionally.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
@sudo-bmitch sudo-bmitch mentioned this pull request Feb 1, 2024
8 tasks
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.

Conformance tests should include recommended manifest fields
4 participants