Skip to content

distribution: checkSupportedMediaType: allow additional media-types#44567

Merged
cpuguy83 merged 1 commit intomoby:masterfrom
thaJeztah:relax_checkSupportedMediaType
Dec 2, 2022
Merged

distribution: checkSupportedMediaType: allow additional media-types#44567
cpuguy83 merged 1 commit intomoby:masterfrom
thaJeztah:relax_checkSupportedMediaType

Conversation

@thaJeztah
Copy link
Member

This addresses a regression introduced in 407e3a4 (#44367), which turned out to be "too strict", as there's old images that use, for example;

docker pull python:3.5.1-alpine
3.5.1-alpine: Pulling from library/python
unsupported media type application/octet-stream

Before 407e3a4, such mediatypes were accepted;

docker pull python:3.5.1-alpine
3.5.1-alpine: Pulling from library/python
e110a4a17941: Pull complete
30dac23631f0: Pull complete
202fc3980a36: Pull complete
Digest: sha256:f88925c97b9709dd6da0cb2f811726da9d724464e9be17a964c70f067d2aa64a
Status: Downloaded newer image for python:3.5.1-alpine
docker.io/library/python:3.5.1-alpine

This patch copies the additional media-types, using the list of types that were added in a215e15 (#30262), which fixed a similar issue.

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

This addresses a regression introduced in 407e3a4,
which turned out to be "too strict", as there's old images that use, for example;

    docker pull python:3.5.1-alpine
    3.5.1-alpine: Pulling from library/python
    unsupported media type application/octet-stream

Before 407e3a4, such mediatypes were accepted;

    docker pull python:3.5.1-alpine
    3.5.1-alpine: Pulling from library/python
    e110a4a17941: Pull complete
    30dac23631f0: Pull complete
    202fc3980a36: Pull complete
    Digest: sha256:f88925c97b9709dd6da0cb2f811726da9d724464e9be17a964c70f067d2aa64a
    Status: Downloaded newer image for python:3.5.1-alpine
    docker.io/library/python:3.5.1-alpine

This patch copies the additional media-types, using the list of types that
were added in a215e15, which fixed a
similar issue.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
Copy link
Member Author

Hmm... getting that odd error here as well; 🤔

> [containerd-alt-15 1/1] RUN --mount=from=containerd-src,src=/usr/src/containerd,readwrite --mount=target=/root/.cache,type=cache   git fetch origin   && git checkout -q "v1.5.11"   && make bin/containerd   && make bin/containerd-shim-runc-v2   && mv bin /out:
#0 4.935 + bin/containerd
#47 268.1 # github.com/containerd/containerd/vendor/github.com/miekg/pkcs11
#47 268.1 cgo: malformed DWARF TagVariable entry
#47 279.5 make: *** [Makefile:213: bin/containerd] Error 2

@thaJeztah
Copy link
Member Author

@cpuguy83 cpuguy83 merged commit 676250a into moby:master Dec 2, 2022
@thaJeztah thaJeztah deleted the relax_checkSupportedMediaType branch December 2, 2022 23:27
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.

3 participants