Skip to content

Commit

Permalink
distribution: show image schema deprecation on all registries
Browse files Browse the repository at this point in the history
When we added this deprecation warning, some registries had not yet
moved away from the deprecated specification, so we made the warning
conditional for pulling from Docker Hub.

That condition was added in 647dfe9,
which is over 4 Years ago, which should be time enough for images
and registries to have moved to current specifications.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Aug 2, 2023
1 parent 982bc0e commit 8c4af5d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions distribution/pull_v2.go
Expand Up @@ -436,13 +436,9 @@ func (p *puller) pullTag(ctx context.Context, ref reference.Named, platform *oci

switch v := manifest.(type) {
case *schema1.SignedManifest:
// give registries time to upgrade to schema2 and only warn if we know a registry has been upgraded long time ago
// TODO: condition to be removed
if reference.Domain(ref) == "docker.io" {
msg := fmt.Sprintf("[DEPRECATION NOTICE] Docker Image Format v1, and Docker Image manifest version 2, schema 1 support will be removed in an upcoming release. Suggest the author of %s to upgrade the image to the OCI Format, or Docker Image manifest v2, schema 2. More information at https://docs.docker.com/go/deprecated-image-specs/", ref)
log.G(ctx).Warn(msg)
progress.Message(p.config.ProgressOutput, "", msg)
}
msg := fmt.Sprintf("[DEPRECATION NOTICE] Docker Image Format v1, and Docker Image manifest version 2, schema 1 support will be removed in an upcoming release. Suggest the author of %s to upgrade the image to the OCI Format, or Docker Image manifest v2, schema 2. More information at https://docs.docker.com/go/deprecated-image-specs/", ref)
log.G(ctx).Warn(msg)
progress.Message(p.config.ProgressOutput, "", msg)

id, manifestDigest, err = p.pullSchema1(ctx, ref, v, platform)
if err != nil {
Expand Down

0 comments on commit 8c4af5d

Please sign in to comment.