Skip to content

save: Remove platform from config descriptor#47661

Merged
tianon merged 1 commit intomoby:masterfrom
cpuguy83:oci_tar_no_platform
Apr 5, 2024
Merged

save: Remove platform from config descriptor#47661
tianon merged 1 commit intomoby:masterfrom
cpuguy83:oci_tar_no_platform

Conversation

@cpuguy83
Copy link
Member

@cpuguy83 cpuguy83 commented Apr 2, 2024

This was brought up by bmitch that its not expected to have a platform object in the config descriptor.
Also checked with tianon who agreed, its not wrong but is unexpected and doesn't neccessarily make sense to have it there.

Also, while technically incorrect, ECR is throwing an error when it sees this.

- remove erroneous `platform` from image `config` OCI descriptor in `docker save` output

Copy link
Member

@tianon tianon left a comment

Choose a reason for hiding this comment

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

Agreed, this is unexpected -- I've thought about putting it here myself before, but I think I'd personally classify this as a case of "undefined behavior" in the spec, since platform should technically only be set on descriptors in an index (https://github.com/opencontainers/image-spec/blob/v1.1.0/descriptor.md#:~:text=Descriptors%20pointing%20to%20application/vnd.oci.image.manifest.v1%2Bjson%20SHOULD%20include%20the%20extended%20field%20platform).

IMO a decent alternative would be to set data on this config blob, but maybe only if it's below a certain size (so we ensure it isn't the thing that pushes us over the 4MiB recommended/enforced-by-at-least-Docker-Hub manifest size limit).

This was brought up by bmitch that its not expected to have a platform
object in the config descriptor.
Also checked with tianon who agreed, its not _wrong_ but is unexpected
and doesn't neccessarily make sense to have it there.

Also, while technically incorrect, ECR is throwing an error when it sees
this.

Signed-off-by: Brian Goff <[email protected]>
@cpuguy83 cpuguy83 force-pushed the oci_tar_no_platform branch from f084bc4 to 9160b9f Compare April 2, 2024 17:16
@cpuguy83
Copy link
Member Author

cpuguy83 commented Apr 2, 2024

Repushed to fix typo in commit title.

@cpuguy83 cpuguy83 changed the title save: Remove platfrom from config descriptor save: Remove platform from config descriptor Apr 2, 2024
@vvoland vvoland added this to the 27.0.0 milestone Apr 3, 2024
@vvoland vvoland added the area/images Image Distribution label Apr 3, 2024
Copy link
Contributor

@vvoland vvoland left a comment

Choose a reason for hiding this comment

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

LGTM; do we want to highlight this in the release notes?

@thaJeztah
Copy link
Member

@cpuguy83 can you write a short blurb for the release-notes? 🤗

@tianon
Copy link
Member

tianon commented Apr 5, 2024

I took a stab at a changelog entry, PTAL

@cpuguy83
Copy link
Member Author

cpuguy83 commented Apr 5, 2024

Thanks @tianon
I just trimmed off the "containere store" bit since this should be for either store.

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.

4 participants