Skip to content

Conversation

@AkihiroSuda
Copy link
Member

Schema 1 has been substantially deprecated since circa. 2017 in favor of Schema 2 introduced in Docker 1.10 (Feb 2016) and its successor OCI Image Spec v1, but we have not officially deprecated Schema 1.

One of the reasons was that Quay did not support Schema 2 so far, but it is reported that Quay has been supporting Schema 2 since Feb 2020 (moby/buildkit#409).

This PR deprecates pulling Schema 1 images but the feature will not be removed before containerd 2.0.
Pushing Schema 1 images was never implemented in containerd (and its consumers such as BuildKit).

Docker/Moby already disabled pushing Schema 1 images in Docker 20.10 (moby/moby#41295), but Docker/Moby has not yet disabled pulling Schema 1 as containerd has not yet deprecated Schema 1. (moby/moby#42300 (comment))
Docker/Moby is expected to disable pulling Schema 1 images in future after this deprecation.

Schema 1 has been substantially deprecated since circa. 2017 in favor of Schema 2 introduced in Docker 1.10 (Feb 2016)
and its successor OCI Image Spec v1, but we have not officially deprecated Schema 1.

One of the reasons was that Quay did not support Schema 2 so far, but it is reported that Quay has been
supporting Schema 2 since Feb 2020 (moby/buildkit issue 409).

This PR deprecates pulling Schema 1 images but the feature will not be removed before containerd 2.0.
Pushing Schema 1 images was never implemented in containerd (and its consumers such as BuildKit).

Docker/Moby already disabled pushing Schema 1 images in Docker 20.10 (moby/moby PR 41295),
but Docker/Moby has not yet disabled pulling Schema 1 as containerd has not yet deprecated Schema 1.
(See the comments in moby/moby PR 42300.)
Docker/Moby is expected to disable pulling Schema 1 images in future after this deprecation.

Signed-off-by: Akihiro Suda <[email protected]>
@AkihiroSuda AkihiroSuda force-pushed the deprecate-schema1 branch from 072e375 to 4258416 Compare May 2, 2022 10:08
Copy link
Member

@thaJeztah thaJeztah 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 you think we should/can print a deprecation message when someone is pulling a schema 1 image?

Oh! And is this "Schema 2 v1" or "Schema 1"? (I always confuse the two)

Copy link
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM

@estesp
Copy link
Member

estesp commented May 2, 2022

@thaJeztah:

do you think we should/can print a deprecation message when someone is pulling a schema 1 image?

my only consideration here is that the most significant use of containerd is via other tools/layers for which we don't have direct access to stdout/err; so I think we could only realistically do this for ctr which is not a primary/recommended tool for users. I guess we could log CRI pulls as a daemon warning level message; again, not sure if that will really get the attention we would want from actual users.

Oh! And is this "Schema 2 v1" or "Schema 1"? (I always confuse the two)

This is the original schema 1 media type.

@dmcgowan
Copy link
Member

dmcgowan commented May 2, 2022

I guess we could log CRI pulls as a daemon warning level message; again, not sure if that will really get the attention we would want from actual users.

For 1.7 I think we should add deprecation warning logs each time a deprecated feature is used. We don't need to do that in this PR, we should try to do them all together and consistently.

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.

5 participants