Skip to content

exporter/containerimage: default to oci-mediatypes=true - #6824

Merged
tonistiigi merged 8 commits into
moby:masterfrom
tonistiigi:oci-mediatypes
Jun 4, 2026
Merged

tonistiigi merged 8 commits into
moby:masterfrom
tonistiigi:oci-mediatypes

Conversation

@tonistiigi

@tonistiigi tonistiigi commented Jun 3, 2026 •

Copy link
Copy Markdown
Member

fixes #6094
closes #6095

testing updated version of #6095

This helper has not been used for some time.

Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
To facilitate this change, we now fail when there is an exporter option
conflict instead of implicitly setting oci-mediatypes=true.

Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
This matches the documentation, which never specified behavior for
empty/unknown (non-boolean) strings.

We can also remove the parseBoolWithDefault helper, as this was the last
consumer.

Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
When support for zstd was introduced, these mediaTypes were not yet
available in released versions of their respective Go packages. That is
no longer the case.

Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
Allow annotation and attestation exports with OCI media types enabled, fix
the zstd media type map, and update integration tests for the new default.
Keep Docker media types explicit where legacy behavior is under test.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Add compatibility-version 30 for the new OCI media type default while keeping
version 20 pinned to the historical image exporter behavior through v0.31.x.

Track omitted oci-mediatypes separately from explicit false, add v30
compatibility goldens, and document the supported compatibility versions.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@tonistiigi tonistiigi added this to the v0.31.0 milestone Jun 3, 2026
@tonistiigi
tonistiigi marked this pull request as ready for review June 3, 2026 16:28
@tonistiigi

Copy link
Copy Markdown
Member Author

@crazy-max @neersighted Green now. This now connects with compatibliity-version. 30 is the new behavior, old versions keep using the non-oci defaults.

@crazy-max crazy-max left a comment

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.

LGTM

Would need some docs follow-up (cc @dvdksn):

Do we want follow-ups to default to true for cache exporters?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

oci-mediatypes not defaulting to true if no attestations/annotations in image exporter

3 participants