From 3f8ce7502f2066ac2a8007f347e903792731c22c Mon Sep 17 00:00:00 2001 From: dhij Date: Wed, 16 Aug 2023 16:14:19 -0400 Subject: [PATCH] go mod tidy and rename to docker/distribution --- BUILDING.md | 2 +- Dockerfile | 2 +- Makefile | 2 +- blobs.go | 2 +- cmd/digest/main.go | 2 +- cmd/registry-api-descriptor-template/main.go | 4 +- cmd/registry/main.go | 28 +++--- context/context.go | 2 +- context/http.go | 2 +- context/trace.go | 2 +- contrib/token-server/errors.go | 2 +- contrib/token-server/main.go | 8 +- contrib/token-server/token.go | 6 +- contrib/token-server/token_test.go | 2 +- go.mod | 2 +- health/api/api.go | 2 +- health/api/api_test.go | 2 +- health/checks/checks.go | 2 +- health/doc.go | 6 +- health/health.go | 4 +- manifest/manifestlist/manifestlist.go | 4 +- manifest/manifestlist/manifestlist_test.go | 4 +- manifest/ocischema/builder.go | 4 +- manifest/ocischema/builder_test.go | 2 +- manifest/ocischema/index.go | 4 +- manifest/ocischema/index_test.go | 4 +- manifest/ocischema/manifest.go | 4 +- manifest/ocischema/manifest_test.go | 6 +- manifest/schema1/config_builder.go | 6 +- manifest/schema1/config_builder_test.go | 6 +- manifest/schema1/manifest.go | 4 +- manifest/schema1/reference_builder.go | 6 +- manifest/schema1/reference_builder_test.go | 6 +- manifest/schema2/builder.go | 2 +- manifest/schema2/builder_test.go | 2 +- manifest/schema2/manifest.go | 4 +- manifest/schema2/manifest_test.go | 4 +- notifications/bridge.go | 8 +- notifications/bridge_test.go | 12 +-- notifications/endpoint.go | 2 +- notifications/event.go | 2 +- notifications/event_test.go | 2 +- notifications/http_test.go | 2 +- notifications/listener.go | 6 +- notifications/listener_test.go | 16 ++-- notifications/metrics.go | 2 +- registry.go | 2 +- registry/api/v2/descriptors.go | 4 +- registry/api/v2/errors.go | 2 +- registry/api/v2/urls.go | 2 +- registry/api/v2/urls_test.go | 2 +- registry/auth/htpasswd/access.go | 4 +- registry/auth/htpasswd/access_test.go | 4 +- registry/auth/htpasswd/htpasswd.go | 2 +- registry/auth/silly/access.go | 4 +- registry/auth/silly/access_test.go | 4 +- registry/auth/token/accesscontroller.go | 4 +- registry/auth/token/token.go | 2 +- registry/auth/token/token_test.go | 4 +- registry/client/auth/session.go | 6 +- registry/client/auth/session_test.go | 6 +- registry/client/blob_writer.go | 2 +- registry/client/blob_writer_test.go | 8 +- registry/client/errors.go | 4 +- registry/client/repository.go | 12 +-- registry/client/repository_test.go | 60 ++++++------- registry/handlers/api_test.go | 90 +++++++++---------- registry/handlers/app.go | 2 +- registry/handlers/app_test.go | 18 ++-- registry/handlers/catalog.go | 6 +- registry/handlers/context.go | 10 +-- registry/handlers/health_test.go | 6 +- registry/handlers/manifests.go | 8 +- registry/middleware/registry/middleware.go | 6 +- registry/middleware/repository/middleware.go | 2 +- registry/proxy/proxyauth.go | 6 +- registry/proxy/proxyblobstore.go | 8 +- registry/proxy/proxyblobstore_test.go | 14 +-- registry/proxy/proxymanifeststore.go | 8 +- registry/proxy/proxymanifeststore_test.go | 20 ++--- registry/proxy/proxyregistry.go | 22 ++--- registry/proxy/proxytagservice.go | 2 +- registry/proxy/proxytagservice_test.go | 2 +- registry/proxy/scheduler/scheduler.go | 6 +- registry/proxy/scheduler/scheduler_test.go | 6 +- registry/registry.go | 14 +-- registry/registry_test.go | 6 +- registry/root.go | 8 +- registry/storage/blob_test.go | 10 +-- registry/storage/blobserver.go | 4 +- registry/storage/blobstore.go | 6 +- registry/storage/blobwriter.go | 6 +- registry/storage/blobwriter_nonresumable.go | 2 +- registry/storage/blobwriter_resumable.go | 2 +- registry/storage/cache/cache.go | 2 +- registry/storage/cache/cache_test.go | 2 +- registry/storage/cache/cachecheck/suite.go | 4 +- .../cache/cachedblobdescriptorstore.go | 6 +- registry/storage/cache/memory/memory.go | 6 +- registry/storage/cache/memory/memory_test.go | 2 +- registry/storage/cache/metrics/prom.go | 6 +- registry/storage/cache/redis/redis.go | 8 +- registry/storage/cache/redis/redis_test.go | 2 +- registry/storage/catalog.go | 4 +- registry/storage/catalog_test.go | 14 +-- registry/storage/driver/azure/azure.go | 6 +- registry/storage/driver/azure/azure_test.go | 4 +- registry/storage/driver/base/base.go | 6 +- registry/storage/driver/base/regulator.go | 2 +- registry/storage/driver/factory/factory.go | 4 +- registry/storage/driver/filesystem/driver.go | 6 +- .../storage/driver/filesystem/driver_test.go | 4 +- registry/storage/driver/gcs/gcs.go | 6 +- registry/storage/driver/gcs/gcs_test.go | 6 +- registry/storage/driver/inmemory/driver.go | 6 +- .../storage/driver/inmemory/driver_test.go | 4 +- .../driver/middleware/alicdn/middleware.go | 6 +- .../middleware/cloudfront/middleware.go | 6 +- .../driver/middleware/cloudfront/s3filter.go | 2 +- .../middleware/cloudfront/s3filter_test.go | 2 +- .../driver/middleware/redirect/middleware.go | 4 +- .../driver/middleware/storagemiddleware.go | 2 +- registry/storage/driver/oss/oss.go | 6 +- registry/storage/driver/oss/oss_test.go | 6 +- registry/storage/driver/s3-aws/s3.go | 8 +- registry/storage/driver/s3-aws/s3_test.go | 6 +- .../storage/driver/testsuites/testsuites.go | 2 +- registry/storage/filereader.go | 2 +- registry/storage/filereader_test.go | 4 +- registry/storage/garbagecollect.go | 8 +- registry/storage/garbagecollect_test.go | 20 ++--- registry/storage/io.go | 2 +- registry/storage/linkedblobstore.go | 10 +-- registry/storage/linkedblobstore_test.go | 6 +- registry/storage/manifestlisthandler.go | 8 +- registry/storage/manifeststore.go | 16 ++-- registry/storage/manifeststore_test.go | 42 ++++----- registry/storage/ociindexhandler.go | 6 +- registry/storage/ocimanifesthandler.go | 6 +- registry/storage/ocimanifesthandler_test.go | 8 +- registry/storage/purgeuploads.go | 4 +- registry/storage/purgeuploads_test.go | 6 +- registry/storage/registry.go | 8 +- registry/storage/schema2manifesthandler.go | 10 +-- .../storage/schema2manifesthandler_test.go | 10 +-- registry/storage/signedmanifesthandler.go | 20 ++--- registry/storage/tagstore.go | 4 +- registry/storage/tagstore_test.go | 10 +-- registry/storage/v1unsupportedhandler.go | 2 +- registry/storage/vacuum.go | 4 +- testutil/manifests.go | 12 +-- testutil/push.go | 2 +- testutil/tarfile.go | 4 +- version/version.go | 2 +- 154 files changed, 521 insertions(+), 521 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index 4b4053092b..7aca3d2852 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -53,7 +53,7 @@ The `registry` binary can then be run with the following: $ ./bin/registry --version - ./bin/registry github.com/distribution/distribution/v3 v2.7.0-1993-g8857a194 + ./bin/registry github.com/docker/distribution v2.7.0-1993-g8857a194 The registry can be run with a development config using the following incantation: diff --git a/Dockerfile b/Dockerfile index 233044acbc..9ae01ebc95 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ ENV CGO_ENABLED=0 WORKDIR /src FROM base AS version -ARG PKG=github.com/distribution/distribution/v3 +ARG PKG=github.com/docker/distribution RUN --mount=target=. \ VERSION=$(git describe --match 'v[0-9]*' --dirty='.m' --always --tags) REVISION=$(git rev-parse HEAD)$(if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi); \ echo "-X ${PKG}/version.Version=${VERSION#v} -X ${PKG}/version.Revision=${REVISION} -X ${PKG}/version.Package=${PKG}" | tee /tmp/.ldflags; \ diff --git a/Makefile b/Makefile index 42db005ed9..205de4912c 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ VERSION ?= $(shell git describe --match 'v[0-9]*' --dirty='.m' --always) REVISION ?= $(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi) -PKG=github.com/distribution/distribution/v3 +PKG=github.com/docker/distribution # Project packages. PACKAGES=$(shell go list -tags "${BUILDTAGS}" ./... | grep -v /vendor/) diff --git a/blobs.go b/blobs.go index a2718b02c3..edb98f75d7 100644 --- a/blobs.go +++ b/blobs.go @@ -8,7 +8,7 @@ import ( "net/http" "time" - "github.com/distribution/distribution/v3/reference" + "github.com/docker/distribution/reference" "github.com/opencontainers/go-digest" v1 "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/cmd/digest/main.go b/cmd/digest/main.go index 5f0900fa1f..5b52c9f4d2 100644 --- a/cmd/digest/main.go +++ b/cmd/digest/main.go @@ -7,7 +7,7 @@ import ( "log" "os" - "github.com/distribution/distribution/v3/version" + "github.com/docker/distribution/version" "github.com/opencontainers/go-digest" _ "crypto/sha256" diff --git a/cmd/registry-api-descriptor-template/main.go b/cmd/registry-api-descriptor-template/main.go index d43cc1db91..2ac0d1efb3 100644 --- a/cmd/registry-api-descriptor-template/main.go +++ b/cmd/registry-api-descriptor-template/main.go @@ -20,8 +20,8 @@ import ( "regexp" "text/template" - "github.com/distribution/distribution/v3/registry/api/errcode" - v2 "github.com/distribution/distribution/v3/registry/api/v2" + "github.com/docker/distribution/registry/api/errcode" + v2 "github.com/docker/distribution/registry/api/v2" ) var spaceRegex = regexp.MustCompile(`\n\s*`) diff --git a/cmd/registry/main.go b/cmd/registry/main.go index a71d078e84..c6b397950f 100644 --- a/cmd/registry/main.go +++ b/cmd/registry/main.go @@ -3,20 +3,20 @@ package main import ( _ "net/http/pprof" - "github.com/distribution/distribution/v3/registry" - _ "github.com/distribution/distribution/v3/registry/auth/htpasswd" - _ "github.com/distribution/distribution/v3/registry/auth/silly" - _ "github.com/distribution/distribution/v3/registry/auth/token" - _ "github.com/distribution/distribution/v3/registry/proxy" - _ "github.com/distribution/distribution/v3/registry/storage/driver/azure" - _ "github.com/distribution/distribution/v3/registry/storage/driver/filesystem" - _ "github.com/distribution/distribution/v3/registry/storage/driver/gcs" - _ "github.com/distribution/distribution/v3/registry/storage/driver/inmemory" - _ "github.com/distribution/distribution/v3/registry/storage/driver/middleware/alicdn" - _ "github.com/distribution/distribution/v3/registry/storage/driver/middleware/cloudfront" - _ "github.com/distribution/distribution/v3/registry/storage/driver/middleware/redirect" - _ "github.com/distribution/distribution/v3/registry/storage/driver/oss" - _ "github.com/distribution/distribution/v3/registry/storage/driver/s3-aws" + "github.com/docker/distribution/registry" + _ "github.com/docker/distribution/registry/auth/htpasswd" + _ "github.com/docker/distribution/registry/auth/silly" + _ "github.com/docker/distribution/registry/auth/token" + _ "github.com/docker/distribution/registry/proxy" + _ "github.com/docker/distribution/registry/storage/driver/azure" + _ "github.com/docker/distribution/registry/storage/driver/filesystem" + _ "github.com/docker/distribution/registry/storage/driver/gcs" + _ "github.com/docker/distribution/registry/storage/driver/inmemory" + _ "github.com/docker/distribution/registry/storage/driver/middleware/alicdn" + _ "github.com/docker/distribution/registry/storage/driver/middleware/cloudfront" + _ "github.com/docker/distribution/registry/storage/driver/middleware/redirect" + _ "github.com/docker/distribution/registry/storage/driver/oss" + _ "github.com/docker/distribution/registry/storage/driver/s3-aws" ) func main() { diff --git a/context/context.go b/context/context.go index 0a199615ff..074f1a531c 100644 --- a/context/context.go +++ b/context/context.go @@ -4,7 +4,7 @@ import ( "context" "sync" - "github.com/distribution/distribution/v3/uuid" + "github.com/docker/distribution/uuid" ) // instanceContext is a context that provides only an instance id. It is diff --git a/context/http.go b/context/http.go index d295b67f1e..b33c357d4d 100644 --- a/context/http.go +++ b/context/http.go @@ -9,7 +9,7 @@ import ( "sync" "time" - "github.com/distribution/distribution/v3/uuid" + "github.com/docker/distribution/uuid" "github.com/gorilla/mux" log "github.com/sirupsen/logrus" ) diff --git a/context/trace.go b/context/trace.go index 5bf16f8fcf..393d7d0b05 100644 --- a/context/trace.go +++ b/context/trace.go @@ -5,7 +5,7 @@ import ( "runtime" "time" - "github.com/distribution/distribution/v3/uuid" + "github.com/docker/distribution/uuid" ) // WithTrace allocates a traced timing span in a new context. This allows a diff --git a/contrib/token-server/errors.go b/contrib/token-server/errors.go index 2978323916..bcac8ee35c 100644 --- a/contrib/token-server/errors.go +++ b/contrib/token-server/errors.go @@ -3,7 +3,7 @@ package main import ( "net/http" - "github.com/distribution/distribution/v3/registry/api/errcode" + "github.com/docker/distribution/registry/api/errcode" ) var ( diff --git a/contrib/token-server/main.go b/contrib/token-server/main.go index 9a42976ef3..d584474394 100644 --- a/contrib/token-server/main.go +++ b/contrib/token-server/main.go @@ -11,10 +11,10 @@ import ( "strings" "time" - dcontext "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/registry/api/errcode" - "github.com/distribution/distribution/v3/registry/auth" - _ "github.com/distribution/distribution/v3/registry/auth/htpasswd" + dcontext "github.com/docker/distribution/context" + "github.com/docker/distribution/registry/api/errcode" + "github.com/docker/distribution/registry/auth" + _ "github.com/docker/distribution/registry/auth/htpasswd" "github.com/docker/libtrust" "github.com/gorilla/mux" "github.com/sirupsen/logrus" diff --git a/contrib/token-server/token.go b/contrib/token-server/token.go index dc0956d4a8..3e555da75a 100644 --- a/contrib/token-server/token.go +++ b/contrib/token-server/token.go @@ -12,9 +12,9 @@ import ( "strings" "time" - dcontext "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/registry/auth" - "github.com/distribution/distribution/v3/registry/auth/token" + dcontext "github.com/docker/distribution/context" + "github.com/docker/distribution/registry/auth" + "github.com/docker/distribution/registry/auth/token" "github.com/docker/libtrust" ) diff --git a/contrib/token-server/token_test.go b/contrib/token-server/token_test.go index ea93ad4c25..5c0697723e 100644 --- a/contrib/token-server/token_test.go +++ b/contrib/token-server/token_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/distribution/distribution/v3/registry/auth" + "github.com/docker/distribution/registry/auth" "github.com/docker/libtrust" ) diff --git a/go.mod b/go.mod index b8bca8ec8a..31bb1feb44 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/distribution/distribution/v3 +module github.com/docker/distribution go 1.18 diff --git a/health/api/api.go b/health/api/api.go index d7d62a28d1..46aed6d58f 100644 --- a/health/api/api.go +++ b/health/api/api.go @@ -4,7 +4,7 @@ import ( "errors" "net/http" - "github.com/distribution/distribution/v3/health" + "github.com/docker/distribution/health" ) var updater = health.NewStatusUpdater() diff --git a/health/api/api_test.go b/health/api/api_test.go index 66aa6b4197..6a00b4795d 100644 --- a/health/api/api_test.go +++ b/health/api/api_test.go @@ -5,7 +5,7 @@ import ( "net/http/httptest" "testing" - "github.com/distribution/distribution/v3/health" + "github.com/docker/distribution/health" ) // TestGETDownHandlerDoesNotChangeStatus ensures that calling the endpoint diff --git a/health/checks/checks.go b/health/checks/checks.go index f1143490b2..16875ced6b 100644 --- a/health/checks/checks.go +++ b/health/checks/checks.go @@ -10,7 +10,7 @@ import ( "strconv" "time" - "github.com/distribution/distribution/v3/health" + "github.com/docker/distribution/health" ) // FileChecker checks the existence of a file and returns an error diff --git a/health/doc.go b/health/doc.go index 0098378276..5e5ba2fc0c 100644 --- a/health/doc.go +++ b/health/doc.go @@ -17,14 +17,14 @@ // // To install health, just import it in your application: // -// import "github.com/distribution/distribution/v3/health" +// import "github.com/docker/distribution/health" // // You can also (optionally) import "health/api" that will add two convenience // endpoints: "/debug/health/down" and "/debug/health/up". These endpoints add // "manual" checks that allow the service to quickly be brought in/out of // rotation. // -// import _ "github.com/distribution/distribution/v3/health/api" +// import _ "github.com/docker/distribution/health/api" // // # curl localhost:5001/debug/health // {} @@ -105,7 +105,7 @@ // You can also use the predefined Checkers that come included with the health // package. First, import the checks: // -// import "github.com/distribution/distribution/v3/health/checks +// import "github.com/docker/distribution/health/checks // // After that you can make use of any of the provided checks. An example of // using a `FileChecker` to take the application out of rotation if a certain diff --git a/health/health.go b/health/health.go index 06961f3530..f13ca90d26 100644 --- a/health/health.go +++ b/health/health.go @@ -7,8 +7,8 @@ import ( "sync" "time" - "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/registry/api/errcode" + "github.com/docker/distribution/context" + "github.com/docker/distribution/registry/api/errcode" ) // A Registry is a collection of checks. Most applications will use the global diff --git a/manifest/manifestlist/manifestlist.go b/manifest/manifestlist/manifestlist.go index 25ffbe525e..97e16cdcef 100644 --- a/manifest/manifestlist/manifestlist.go +++ b/manifest/manifestlist/manifestlist.go @@ -5,8 +5,8 @@ import ( "errors" "fmt" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/manifest" + "github.com/docker/distribution" + "github.com/docker/distribution/manifest" "github.com/opencontainers/go-digest" v1 "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/manifest/manifestlist/manifestlist_test.go b/manifest/manifestlist/manifestlist_test.go index f52485ed92..5af071889a 100644 --- a/manifest/manifestlist/manifestlist_test.go +++ b/manifest/manifestlist/manifestlist_test.go @@ -6,8 +6,8 @@ import ( "reflect" "testing" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/manifest/schema2" + "github.com/docker/distribution" + "github.com/docker/distribution/manifest/schema2" v1 "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/manifest/ocischema/builder.go b/manifest/ocischema/builder.go index 7d99c184f3..b89bf5b714 100644 --- a/manifest/ocischema/builder.go +++ b/manifest/ocischema/builder.go @@ -4,8 +4,8 @@ import ( "context" "errors" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/manifest" + "github.com/docker/distribution" + "github.com/docker/distribution/manifest" "github.com/opencontainers/go-digest" v1 "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/manifest/ocischema/builder_test.go b/manifest/ocischema/builder_test.go index b147111cbb..c1eae337bc 100644 --- a/manifest/ocischema/builder_test.go +++ b/manifest/ocischema/builder_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - "github.com/distribution/distribution/v3" + "github.com/docker/distribution" "github.com/opencontainers/go-digest" v1 "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/manifest/ocischema/index.go b/manifest/ocischema/index.go index 3ae824f404..224eafa44a 100644 --- a/manifest/ocischema/index.go +++ b/manifest/ocischema/index.go @@ -5,8 +5,8 @@ import ( "errors" "fmt" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/manifest" + "github.com/docker/distribution" + "github.com/docker/distribution/manifest" "github.com/opencontainers/go-digest" v1 "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/manifest/ocischema/index_test.go b/manifest/ocischema/index_test.go index cb07bb17aa..960ccc1d52 100644 --- a/manifest/ocischema/index_test.go +++ b/manifest/ocischema/index_test.go @@ -6,8 +6,8 @@ import ( "reflect" "testing" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/manifest/schema2" + "github.com/docker/distribution" + "github.com/docker/distribution/manifest/schema2" v1 "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/manifest/ocischema/manifest.go b/manifest/ocischema/manifest.go index 973cd64ae4..aaaa5e5057 100644 --- a/manifest/ocischema/manifest.go +++ b/manifest/ocischema/manifest.go @@ -5,8 +5,8 @@ import ( "errors" "fmt" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/manifest" + "github.com/docker/distribution" + "github.com/docker/distribution/manifest" "github.com/opencontainers/go-digest" v1 "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/manifest/ocischema/manifest_test.go b/manifest/ocischema/manifest_test.go index 7cde85a318..45c4fe8b5c 100644 --- a/manifest/ocischema/manifest_test.go +++ b/manifest/ocischema/manifest_test.go @@ -6,9 +6,9 @@ import ( "reflect" "testing" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/manifest" - "github.com/distribution/distribution/v3/manifest/manifestlist" + "github.com/docker/distribution" + "github.com/docker/distribution/manifest" + "github.com/docker/distribution/manifest/manifestlist" v1 "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/manifest/schema1/config_builder.go b/manifest/schema1/config_builder.go index 77fdfee996..0c4e56f3d1 100644 --- a/manifest/schema1/config_builder.go +++ b/manifest/schema1/config_builder.go @@ -8,9 +8,9 @@ import ( "fmt" "time" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/manifest" - "github.com/distribution/distribution/v3/reference" + "github.com/docker/distribution" + "github.com/docker/distribution/manifest" + "github.com/docker/distribution/reference" "github.com/docker/libtrust" "github.com/opencontainers/go-digest" ) diff --git a/manifest/schema1/config_builder_test.go b/manifest/schema1/config_builder_test.go index 32b7c1f573..0c611cd89f 100644 --- a/manifest/schema1/config_builder_test.go +++ b/manifest/schema1/config_builder_test.go @@ -8,9 +8,9 @@ import ( "reflect" "testing" - "github.com/distribution/distribution/v3" - dcontext "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/reference" + "github.com/docker/distribution" + dcontext "github.com/docker/distribution/context" + "github.com/docker/distribution/reference" "github.com/docker/libtrust" "github.com/opencontainers/go-digest" ) diff --git a/manifest/schema1/manifest.go b/manifest/schema1/manifest.go index 4faee15d80..de4df7a17e 100644 --- a/manifest/schema1/manifest.go +++ b/manifest/schema1/manifest.go @@ -10,8 +10,8 @@ import ( "encoding/json" "fmt" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/manifest" + "github.com/docker/distribution" + "github.com/docker/distribution/manifest" "github.com/docker/libtrust" "github.com/opencontainers/go-digest" ) diff --git a/manifest/schema1/reference_builder.go b/manifest/schema1/reference_builder.go index 13713b5270..642792dc6e 100644 --- a/manifest/schema1/reference_builder.go +++ b/manifest/schema1/reference_builder.go @@ -5,9 +5,9 @@ import ( "errors" "fmt" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/manifest" - "github.com/distribution/distribution/v3/reference" + "github.com/docker/distribution" + "github.com/docker/distribution/manifest" + "github.com/docker/distribution/reference" "github.com/docker/libtrust" "github.com/opencontainers/go-digest" ) diff --git a/manifest/schema1/reference_builder_test.go b/manifest/schema1/reference_builder_test.go index 31fde6468e..9eaa666c9e 100644 --- a/manifest/schema1/reference_builder_test.go +++ b/manifest/schema1/reference_builder_test.go @@ -3,9 +3,9 @@ package schema1 import ( "testing" - "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/manifest" - "github.com/distribution/distribution/v3/reference" + "github.com/docker/distribution/context" + "github.com/docker/distribution/manifest" + "github.com/docker/distribution/reference" "github.com/docker/libtrust" "github.com/opencontainers/go-digest" ) diff --git a/manifest/schema2/builder.go b/manifest/schema2/builder.go index 585741d03c..1af3a99db8 100644 --- a/manifest/schema2/builder.go +++ b/manifest/schema2/builder.go @@ -3,7 +3,7 @@ package schema2 import ( "context" - "github.com/distribution/distribution/v3" + "github.com/docker/distribution" ) // builder is a type for constructing manifests. diff --git a/manifest/schema2/builder_test.go b/manifest/schema2/builder_test.go index 039246a36e..c835275906 100644 --- a/manifest/schema2/builder_test.go +++ b/manifest/schema2/builder_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - "github.com/distribution/distribution/v3" + "github.com/docker/distribution" "github.com/opencontainers/go-digest" ) diff --git a/manifest/schema2/manifest.go b/manifest/schema2/manifest.go index 89bf63c966..40cca8a91b 100644 --- a/manifest/schema2/manifest.go +++ b/manifest/schema2/manifest.go @@ -5,8 +5,8 @@ import ( "errors" "fmt" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/manifest" + "github.com/docker/distribution" + "github.com/docker/distribution/manifest" "github.com/opencontainers/go-digest" ) diff --git a/manifest/schema2/manifest_test.go b/manifest/schema2/manifest_test.go index 23d69f0324..de78fd7e48 100644 --- a/manifest/schema2/manifest_test.go +++ b/manifest/schema2/manifest_test.go @@ -6,8 +6,8 @@ import ( "reflect" "testing" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/manifest" + "github.com/docker/distribution" + "github.com/docker/distribution/manifest" ) const expectedManifestSerialization = `{ diff --git a/notifications/bridge.go b/notifications/bridge.go index ff5a7980ce..ae6fd1222c 100644 --- a/notifications/bridge.go +++ b/notifications/bridge.go @@ -4,10 +4,10 @@ import ( "net/http" "time" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/reference" - "github.com/distribution/distribution/v3/uuid" + "github.com/docker/distribution" + "github.com/docker/distribution/context" + "github.com/docker/distribution/reference" + "github.com/docker/distribution/uuid" events "github.com/docker/go-events" "github.com/opencontainers/go-digest" ) diff --git a/notifications/bridge_test.go b/notifications/bridge_test.go index e147fccb3c..04e4a5c99f 100644 --- a/notifications/bridge_test.go +++ b/notifications/bridge_test.go @@ -3,12 +3,12 @@ package notifications import ( "testing" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/manifest" - "github.com/distribution/distribution/v3/manifest/schema2" - "github.com/distribution/distribution/v3/reference" - v2 "github.com/distribution/distribution/v3/registry/api/v2" - "github.com/distribution/distribution/v3/uuid" + "github.com/docker/distribution" + "github.com/docker/distribution/manifest" + "github.com/docker/distribution/manifest/schema2" + "github.com/docker/distribution/reference" + v2 "github.com/docker/distribution/registry/api/v2" + "github.com/docker/distribution/uuid" events "github.com/docker/go-events" "github.com/opencontainers/go-digest" v1 "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/notifications/endpoint.go b/notifications/endpoint.go index f67e8cfe70..da6b9622c0 100644 --- a/notifications/endpoint.go +++ b/notifications/endpoint.go @@ -4,7 +4,7 @@ import ( "net/http" "time" - "github.com/distribution/distribution/v3/configuration" + "github.com/docker/distribution/configuration" events "github.com/docker/go-events" ) diff --git a/notifications/event.go b/notifications/event.go index dc794ba248..f9fb8d6d8b 100644 --- a/notifications/event.go +++ b/notifications/event.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/distribution/distribution/v3" + "github.com/docker/distribution" events "github.com/docker/go-events" ) diff --git a/notifications/event_test.go b/notifications/event_test.go index c82d0643bd..6f4ef74a91 100644 --- a/notifications/event_test.go +++ b/notifications/event_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/distribution/distribution/v3/manifest/schema2" + "github.com/docker/distribution/manifest/schema2" ) // TestEventJSONFormat provides silly test to detect if the event format or diff --git a/notifications/http_test.go b/notifications/http_test.go index 8cc07efa03..ed42403041 100644 --- a/notifications/http_test.go +++ b/notifications/http_test.go @@ -13,7 +13,7 @@ import ( "strings" "testing" - "github.com/distribution/distribution/v3/manifest/schema2" + "github.com/docker/distribution/manifest/schema2" events "github.com/docker/go-events" ) diff --git a/notifications/listener.go b/notifications/listener.go index 57857e18c1..28993f35b7 100644 --- a/notifications/listener.go +++ b/notifications/listener.go @@ -5,10 +5,10 @@ import ( "io" "net/http" - "github.com/distribution/distribution/v3" + "github.com/docker/distribution" - dcontext "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/reference" + dcontext "github.com/docker/distribution/context" + "github.com/docker/distribution/reference" "github.com/opencontainers/go-digest" ) diff --git a/notifications/listener_test.go b/notifications/listener_test.go index 8d0c18a49b..1f336f0af5 100644 --- a/notifications/listener_test.go +++ b/notifications/listener_test.go @@ -5,14 +5,14 @@ import ( "reflect" "testing" - "github.com/distribution/distribution/v3" - dcontext "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/manifest/schema2" - "github.com/distribution/distribution/v3/reference" - "github.com/distribution/distribution/v3/registry/storage" - "github.com/distribution/distribution/v3/registry/storage/cache/memory" - "github.com/distribution/distribution/v3/registry/storage/driver/inmemory" - "github.com/distribution/distribution/v3/testutil" + "github.com/docker/distribution" + dcontext "github.com/docker/distribution/context" + "github.com/docker/distribution/manifest/schema2" + "github.com/docker/distribution/reference" + "github.com/docker/distribution/registry/storage" + "github.com/docker/distribution/registry/storage/cache/memory" + "github.com/docker/distribution/registry/storage/driver/inmemory" + "github.com/docker/distribution/testutil" "github.com/opencontainers/go-digest" ) diff --git a/notifications/metrics.go b/notifications/metrics.go index c520f332b6..d9432f0af0 100644 --- a/notifications/metrics.go +++ b/notifications/metrics.go @@ -6,7 +6,7 @@ import ( "net/http" "sync" - prometheus "github.com/distribution/distribution/v3/metrics" + prometheus "github.com/docker/distribution/metrics" events "github.com/docker/go-events" "github.com/docker/go-metrics" ) diff --git a/registry.go b/registry.go index 658f2df082..6c32109894 100644 --- a/registry.go +++ b/registry.go @@ -3,7 +3,7 @@ package distribution import ( "context" - "github.com/distribution/distribution/v3/reference" + "github.com/docker/distribution/reference" ) // Scope defines the set of items that match a namespace. diff --git a/registry/api/v2/descriptors.go b/registry/api/v2/descriptors.go index 9d1cfdb8ea..12ac2b547c 100644 --- a/registry/api/v2/descriptors.go +++ b/registry/api/v2/descriptors.go @@ -4,8 +4,8 @@ import ( "net/http" "regexp" - "github.com/distribution/distribution/v3/reference" - "github.com/distribution/distribution/v3/registry/api/errcode" + "github.com/docker/distribution/reference" + "github.com/docker/distribution/registry/api/errcode" "github.com/opencontainers/go-digest" ) diff --git a/registry/api/v2/errors.go b/registry/api/v2/errors.go index dcbabfca01..11af1e0588 100644 --- a/registry/api/v2/errors.go +++ b/registry/api/v2/errors.go @@ -3,7 +3,7 @@ package v2 import ( "net/http" - "github.com/distribution/distribution/v3/registry/api/errcode" + "github.com/docker/distribution/registry/api/errcode" ) const errGroup = "registry.api.v2" diff --git a/registry/api/v2/urls.go b/registry/api/v2/urls.go index f4aa90954b..0baa101236 100644 --- a/registry/api/v2/urls.go +++ b/registry/api/v2/urls.go @@ -6,7 +6,7 @@ import ( "net/url" "strings" - "github.com/distribution/distribution/v3/reference" + "github.com/docker/distribution/reference" "github.com/gorilla/mux" ) diff --git a/registry/api/v2/urls_test.go b/registry/api/v2/urls_test.go index 0ccf35182c..3e1aed00bc 100644 --- a/registry/api/v2/urls_test.go +++ b/registry/api/v2/urls_test.go @@ -7,7 +7,7 @@ import ( "reflect" "testing" - "github.com/distribution/distribution/v3/reference" + "github.com/docker/distribution/reference" ) type urlBuilderTestCase struct { diff --git a/registry/auth/htpasswd/access.go b/registry/auth/htpasswd/access.go index 8d8a041982..fd36cf5cca 100644 --- a/registry/auth/htpasswd/access.go +++ b/registry/auth/htpasswd/access.go @@ -18,8 +18,8 @@ import ( "golang.org/x/crypto/bcrypt" - dcontext "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/registry/auth" + dcontext "github.com/docker/distribution/context" + "github.com/docker/distribution/registry/auth" ) type accessController struct { diff --git a/registry/auth/htpasswd/access_test.go b/registry/auth/htpasswd/access_test.go index 25947757a8..6867f244e6 100644 --- a/registry/auth/htpasswd/access_test.go +++ b/registry/auth/htpasswd/access_test.go @@ -8,8 +8,8 @@ import ( "os" "testing" - "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/registry/auth" + "github.com/docker/distribution/context" + "github.com/docker/distribution/registry/auth" ) func TestBasicAccessController(t *testing.T) { diff --git a/registry/auth/htpasswd/htpasswd.go b/registry/auth/htpasswd/htpasswd.go index 56f31b6ee4..8320516097 100644 --- a/registry/auth/htpasswd/htpasswd.go +++ b/registry/auth/htpasswd/htpasswd.go @@ -6,7 +6,7 @@ import ( "io" "strings" - "github.com/distribution/distribution/v3/registry/auth" + "github.com/docker/distribution/registry/auth" "golang.org/x/crypto/bcrypt" ) diff --git a/registry/auth/silly/access.go b/registry/auth/silly/access.go index b09373f3fd..38cadcf8a9 100644 --- a/registry/auth/silly/access.go +++ b/registry/auth/silly/access.go @@ -13,8 +13,8 @@ import ( "net/http" "strings" - dcontext "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/registry/auth" + dcontext "github.com/docker/distribution/context" + "github.com/docker/distribution/registry/auth" ) // accessController provides a simple implementation of auth.AccessController diff --git a/registry/auth/silly/access_test.go b/registry/auth/silly/access_test.go index 482fb2f7af..668935f882 100644 --- a/registry/auth/silly/access_test.go +++ b/registry/auth/silly/access_test.go @@ -5,8 +5,8 @@ import ( "net/http/httptest" "testing" - "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/registry/auth" + "github.com/docker/distribution/context" + "github.com/docker/distribution/registry/auth" ) func TestSillyAccessController(t *testing.T) { diff --git a/registry/auth/token/accesscontroller.go b/registry/auth/token/accesscontroller.go index 26a18a9794..d250efffd7 100644 --- a/registry/auth/token/accesscontroller.go +++ b/registry/auth/token/accesscontroller.go @@ -12,8 +12,8 @@ import ( "os" "strings" - dcontext "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/registry/auth" + dcontext "github.com/docker/distribution/context" + "github.com/docker/distribution/registry/auth" "github.com/docker/libtrust" ) diff --git a/registry/auth/token/token.go b/registry/auth/token/token.go index dfd1569b2a..e4f2e83c52 100644 --- a/registry/auth/token/token.go +++ b/registry/auth/token/token.go @@ -13,7 +13,7 @@ import ( "github.com/docker/libtrust" log "github.com/sirupsen/logrus" - "github.com/distribution/distribution/v3/registry/auth" + "github.com/docker/distribution/registry/auth" ) const ( diff --git a/registry/auth/token/token_test.go b/registry/auth/token/token_test.go index 8d322ae1b3..be2214dcfb 100644 --- a/registry/auth/token/token_test.go +++ b/registry/auth/token/token_test.go @@ -14,8 +14,8 @@ import ( "testing" "time" - "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/registry/auth" + "github.com/docker/distribution/context" + "github.com/docker/distribution/registry/auth" "github.com/docker/libtrust" ) diff --git a/registry/client/auth/session.go b/registry/client/auth/session.go index fe2128316b..7b997d11a2 100644 --- a/registry/client/auth/session.go +++ b/registry/client/auth/session.go @@ -11,9 +11,9 @@ import ( "sync" "time" - "github.com/distribution/distribution/v3/registry/client" - "github.com/distribution/distribution/v3/registry/client/auth/challenge" - "github.com/distribution/distribution/v3/registry/client/transport" + "github.com/docker/distribution/registry/client" + "github.com/docker/distribution/registry/client/auth/challenge" + "github.com/docker/distribution/registry/client/transport" ) var ( diff --git a/registry/client/auth/session_test.go b/registry/client/auth/session_test.go index 3d81544d44..03c824aa9e 100644 --- a/registry/client/auth/session_test.go +++ b/registry/client/auth/session_test.go @@ -9,9 +9,9 @@ import ( "testing" "time" - "github.com/distribution/distribution/v3/registry/client/auth/challenge" - "github.com/distribution/distribution/v3/registry/client/transport" - "github.com/distribution/distribution/v3/testutil" + "github.com/docker/distribution/registry/client/auth/challenge" + "github.com/docker/distribution/registry/client/transport" + "github.com/docker/distribution/testutil" ) // An implementation of clock for providing fake time data. diff --git a/registry/client/blob_writer.go b/registry/client/blob_writer.go index e76341de0a..131f73e8ff 100644 --- a/registry/client/blob_writer.go +++ b/registry/client/blob_writer.go @@ -8,7 +8,7 @@ import ( "net/http" "time" - "github.com/distribution/distribution/v3" + "github.com/docker/distribution" ) type httpBlobUpload struct { diff --git a/registry/client/blob_writer_test.go b/registry/client/blob_writer_test.go index 0eb0b39b46..b4104d8a9f 100644 --- a/registry/client/blob_writer_test.go +++ b/registry/client/blob_writer_test.go @@ -7,10 +7,10 @@ import ( "net/http" "testing" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/registry/api/errcode" - v2 "github.com/distribution/distribution/v3/registry/api/v2" - "github.com/distribution/distribution/v3/testutil" + "github.com/docker/distribution" + "github.com/docker/distribution/registry/api/errcode" + v2 "github.com/docker/distribution/registry/api/v2" + "github.com/docker/distribution/testutil" ) // Test implements distribution.BlobWriter diff --git a/registry/client/errors.go b/registry/client/errors.go index 8394ee0c20..a85edd80af 100644 --- a/registry/client/errors.go +++ b/registry/client/errors.go @@ -7,8 +7,8 @@ import ( "io" "net/http" - "github.com/distribution/distribution/v3/registry/api/errcode" - "github.com/distribution/distribution/v3/registry/client/auth/challenge" + "github.com/docker/distribution/registry/api/errcode" + "github.com/docker/distribution/registry/client/auth/challenge" ) // ErrNoErrorsInBody is returned when an HTTP response body parses to an empty diff --git a/registry/client/repository.go b/registry/client/repository.go index 31fc2e9237..2e86625700 100644 --- a/registry/client/repository.go +++ b/registry/client/repository.go @@ -14,12 +14,12 @@ import ( "strings" "time" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/reference" - v2 "github.com/distribution/distribution/v3/registry/api/v2" - "github.com/distribution/distribution/v3/registry/client/transport" - "github.com/distribution/distribution/v3/registry/storage/cache" - "github.com/distribution/distribution/v3/registry/storage/cache/memory" + "github.com/docker/distribution" + "github.com/docker/distribution/reference" + v2 "github.com/docker/distribution/registry/api/v2" + "github.com/docker/distribution/registry/client/transport" + "github.com/docker/distribution/registry/storage/cache" + "github.com/docker/distribution/registry/storage/cache/memory" "github.com/opencontainers/go-digest" ) diff --git a/registry/client/repository_test.go b/registry/client/repository_test.go index 7681bf8697..6aa5d750de 100644 --- a/registry/client/repository_test.go +++ b/registry/client/repository_test.go @@ -16,15 +16,15 @@ import ( "testing" "time" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/manifest" - "github.com/distribution/distribution/v3/manifest/schema1" //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. - "github.com/distribution/distribution/v3/reference" - "github.com/distribution/distribution/v3/registry/api/errcode" - v2 "github.com/distribution/distribution/v3/registry/api/v2" - "github.com/distribution/distribution/v3/testutil" - "github.com/distribution/distribution/v3/uuid" + "github.com/docker/distribution" + "github.com/docker/distribution/context" + "github.com/docker/distribution/manifest" + "github.com/docker/distribution/manifest/schema1" //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. + "github.com/docker/distribution/reference" + "github.com/docker/distribution/registry/api/errcode" + v2 "github.com/docker/distribution/registry/api/v2" + "github.com/docker/distribution/testutil" + "github.com/docker/distribution/uuid" "github.com/docker/libtrust" "github.com/opencontainers/go-digest" ) @@ -917,18 +917,18 @@ func TestBlobMount(t *testing.T) { } } -func newRandomSchemaV1Manifest(name reference.Named, tag string, blobCount int) (*schema1.SignedManifest, digest.Digest, []byte) { //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. - blobs := make([]schema1.FSLayer, blobCount) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. - history := make([]schema1.History, blobCount) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. +func newRandomSchemaV1Manifest(name reference.Named, tag string, blobCount int) (*schema1.SignedManifest, digest.Digest, []byte) { //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. + blobs := make([]schema1.FSLayer, blobCount) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. + history := make([]schema1.History, blobCount) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. for i := 0; i < blobCount; i++ { dgst, blob := newRandomBlob((i % 5) * 16) - blobs[i] = schema1.FSLayer{BlobSum: dgst} //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. - history[i] = schema1.History{V1Compatibility: fmt.Sprintf("{\"Hex\": \"%x\"}", blob)} //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + blobs[i] = schema1.FSLayer{BlobSum: dgst} //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. + history[i] = schema1.History{V1Compatibility: fmt.Sprintf("{\"Hex\": \"%x\"}", blob)} //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. } - m := schema1.Manifest{ //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + m := schema1.Manifest{ //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. Name: name.String(), Tag: tag, Architecture: "x86", @@ -944,7 +944,7 @@ func newRandomSchemaV1Manifest(name reference.Named, tag string, blobCount int) panic(err) } - sm, err := schema1.Sign(&m, pk) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + sm, err := schema1.Sign(&m, pk) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if err != nil { panic(err) } @@ -970,7 +970,7 @@ func addTestManifestWithEtag(repo reference.Named, reference string, content []b Headers: http.Header(map[string][]string{ "Content-Length": {"0"}, "Last-Modified": {time.Now().Add(-1 * time.Second).Format(time.ANSIC)}, - "Content-Type": {schema1.MediaTypeSignedManifest}, //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + "Content-Type": {schema1.MediaTypeSignedManifest}, //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. }), } } else { @@ -980,7 +980,7 @@ func addTestManifestWithEtag(repo reference.Named, reference string, content []b Headers: http.Header(map[string][]string{ "Content-Length": {fmt.Sprint(len(content))}, "Last-Modified": {time.Now().Add(-1 * time.Second).Format(time.ANSIC)}, - "Content-Type": {schema1.MediaTypeSignedManifest}, //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + "Content-Type": {schema1.MediaTypeSignedManifest}, //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. }), } } @@ -988,9 +988,9 @@ func addTestManifestWithEtag(repo reference.Named, reference string, content []b } func contentDigestString(mediatype string, content []byte) string { - if mediatype == schema1.MediaTypeSignedManifest { //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + if mediatype == schema1.MediaTypeSignedManifest { //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. m, _, _ := distribution.UnmarshalManifest(mediatype, content) - content = m.(*schema1.SignedManifest).Canonical //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + content = m.(*schema1.SignedManifest).Canonical //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. } return digest.Canonical.FromBytes(content).String() } @@ -1061,7 +1061,7 @@ func addTestManifestWithoutDigestHeader(repo reference.Named, reference string, }) } -func checkEqualManifest(m1, m2 *schema1.SignedManifest) error { //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. +func checkEqualManifest(m1, m2 *schema1.SignedManifest) error { //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if m1.Name != m2.Name { return fmt.Errorf("name does not match %q != %q", m1.Name, m2.Name) } @@ -1092,12 +1092,12 @@ func TestV1ManifestFetch(t *testing.T) { repo, _ := reference.WithName("test.example.com/repo") m1, dgst, _ := newRandomSchemaV1Manifest(repo, "latest", 6) var m testutil.RequestResponseMap - _, pl, err := m1.Payload() //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + _, pl, err := m1.Payload() //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if err != nil { t.Fatal(err) } - addTestManifest(repo, dgst.String(), schema1.MediaTypeSignedManifest, pl, &m) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. - addTestManifest(repo, "latest", schema1.MediaTypeSignedManifest, pl, &m) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + addTestManifest(repo, dgst.String(), schema1.MediaTypeSignedManifest, pl, &m) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. + addTestManifest(repo, "latest", schema1.MediaTypeSignedManifest, pl, &m) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. addTestManifest(repo, "badcontenttype", "text/html", pl, &m) e, c := testServer(m) @@ -1124,7 +1124,7 @@ func TestV1ManifestFetch(t *testing.T) { if err != nil { t.Fatal(err) } - v1manifest, ok := manifest.(*schema1.SignedManifest) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + v1manifest, ok := manifest.(*schema1.SignedManifest) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if !ok { t.Fatalf("Unexpected manifest type from Get: %T", manifest) } @@ -1138,7 +1138,7 @@ func TestV1ManifestFetch(t *testing.T) { if err != nil { t.Fatal(err) } - v1manifest, ok = manifest.(*schema1.SignedManifest) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + v1manifest, ok = manifest.(*schema1.SignedManifest) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if !ok { t.Fatalf("Unexpected manifest type from Get: %T", manifest) } @@ -1155,7 +1155,7 @@ func TestV1ManifestFetch(t *testing.T) { if err != nil { t.Fatal(err) } - v1manifest, ok = manifest.(*schema1.SignedManifest) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + v1manifest, ok = manifest.(*schema1.SignedManifest) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if !ok { t.Fatalf("Unexpected manifest type from Get: %T", manifest) } @@ -1298,7 +1298,7 @@ func TestManifestPut(t *testing.T) { repo, _ := reference.WithName("test.example.com/repo/delete") m1, dgst, _ := newRandomSchemaV1Manifest(repo, "other", 6) - _, payload, err := m1.Payload() //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + _, payload, err := m1.Payload() //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if err != nil { t.Fatal(err) } @@ -1506,11 +1506,11 @@ func TestObtainsManifestForTagWithoutHeaders(t *testing.T) { var m testutil.RequestResponseMap m1, dgst, _ := newRandomSchemaV1Manifest(repo, "latest", 6) - _, pl, err := m1.Payload() //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + _, pl, err := m1.Payload() //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if err != nil { t.Fatal(err) } - addTestManifestWithoutDigestHeader(repo, "1.0.0", schema1.MediaTypeSignedManifest, pl, &m) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + addTestManifestWithoutDigestHeader(repo, "1.0.0", schema1.MediaTypeSignedManifest, pl, &m) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. e, c := testServer(m) defer c() diff --git a/registry/handlers/api_test.go b/registry/handlers/api_test.go index 5fd1790c14..4558633d76 100644 --- a/registry/handlers/api_test.go +++ b/registry/handlers/api_test.go @@ -19,19 +19,19 @@ import ( "strings" "testing" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/configuration" - "github.com/distribution/distribution/v3/manifest" - "github.com/distribution/distribution/v3/manifest/manifestlist" - "github.com/distribution/distribution/v3/manifest/schema1" //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. - "github.com/distribution/distribution/v3/manifest/schema2" - "github.com/distribution/distribution/v3/reference" - "github.com/distribution/distribution/v3/registry/api/errcode" - v2 "github.com/distribution/distribution/v3/registry/api/v2" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" - "github.com/distribution/distribution/v3/registry/storage/driver/factory" - _ "github.com/distribution/distribution/v3/registry/storage/driver/inmemory" - "github.com/distribution/distribution/v3/testutil" + "github.com/docker/distribution" + "github.com/docker/distribution/configuration" + "github.com/docker/distribution/manifest" + "github.com/docker/distribution/manifest/manifestlist" + "github.com/docker/distribution/manifest/schema1" //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. + "github.com/docker/distribution/manifest/schema2" + "github.com/docker/distribution/reference" + "github.com/docker/distribution/registry/api/errcode" + v2 "github.com/docker/distribution/registry/api/v2" + storagedriver "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/factory" + _ "github.com/docker/distribution/registry/storage/driver/inmemory" + "github.com/docker/distribution/testutil" "github.com/docker/libtrust" "github.com/gorilla/handlers" "github.com/opencontainers/go-digest" @@ -1531,13 +1531,13 @@ func testManifestAPISchema1(t *testing.T, env *testEnv, imageName reference.Name // -------------------------------- // Attempt to push unsigned manifest with missing layers - unsignedManifest := &schema1.Manifest{ //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + unsignedManifest := &schema1.Manifest{ //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. Versioned: manifest.Versioned{ SchemaVersion: 1, }, Name: imageName.Name(), Tag: tag, - FSLayers: []schema1.FSLayer{ //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + FSLayers: []schema1.FSLayer{ //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. { BlobSum: "asdf", }, @@ -1545,7 +1545,7 @@ func testManifestAPISchema1(t *testing.T, env *testEnv, imageName reference.Name BlobSum: "qwer", }, }, - History: []schema1.History{ //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + History: []schema1.History{ //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. { V1Compatibility: "", }, @@ -1569,7 +1569,7 @@ func testManifestAPISchema1(t *testing.T, env *testEnv, imageName reference.Name } // sign the manifest and still get some interesting errors. - sm, err := schema1.Sign(unsignedManifest, env.pk) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + sm, err := schema1.Sign(unsignedManifest, env.pk) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if err != nil { t.Fatalf("error signing manifest: %v", err) } @@ -1611,7 +1611,7 @@ func testManifestAPISchema1(t *testing.T, env *testEnv, imageName reference.Name // ------------------- // Push the signed manifest with all layers pushed. - signedManifest, err := schema1.Sign(unsignedManifest, env.pk) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + signedManifest, err := schema1.Sign(unsignedManifest, env.pk) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if err != nil { t.Fatalf("unexpected error signing manifest: %v", err) } @@ -1654,7 +1654,7 @@ func testManifestAPISchema1(t *testing.T, env *testEnv, imageName reference.Name "ETag": []string{fmt.Sprintf(`"%s"`, dgst)}, }) - var fetchedManifest schema1.SignedManifest //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + var fetchedManifest schema1.SignedManifest //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. dec := json.NewDecoder(resp.Body) if err := dec.Decode(&fetchedManifest); err != nil { @@ -1677,7 +1677,7 @@ func testManifestAPISchema1(t *testing.T, env *testEnv, imageName reference.Name "ETag": []string{fmt.Sprintf(`"%s"`, dgst)}, }) - var fetchedManifestByDigest schema1.SignedManifest //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + var fetchedManifestByDigest schema1.SignedManifest //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. dec = json.NewDecoder(resp.Body) if err := dec.Decode(&fetchedManifestByDigest); err != nil { t.Fatalf("error decoding fetched manifest: %v", err) @@ -1688,7 +1688,7 @@ func testManifestAPISchema1(t *testing.T, env *testEnv, imageName reference.Name } // check signature was roundtripped - signatures, err := fetchedManifestByDigest.Signatures() //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + signatures, err := fetchedManifestByDigest.Signatures() //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if err != nil { t.Fatal(err) } @@ -1698,7 +1698,7 @@ func testManifestAPISchema1(t *testing.T, env *testEnv, imageName reference.Name } // Re-sign, push and pull the same digest - sm2, err := schema1.Sign(&fetchedManifestByDigest.Manifest, env.pk) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + sm2, err := schema1.Sign(&fetchedManifestByDigest.Manifest, env.pk) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if err != nil { t.Fatal(err) } @@ -1706,7 +1706,7 @@ func testManifestAPISchema1(t *testing.T, env *testEnv, imageName reference.Name // Re-push with a few different Content-Types. The official schema1 // content type should work, as should application/json with/without a // charset. - resp = putManifest(t, "re-putting signed manifest", manifestDigestURL, schema1.MediaTypeSignedManifest, sm2) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + resp = putManifest(t, "re-putting signed manifest", manifestDigestURL, schema1.MediaTypeSignedManifest, sm2) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. checkResponse(t, "re-putting signed manifest", resp, http.StatusCreated) resp = putManifest(t, "re-putting signed manifest", manifestDigestURL, "application/json", sm2) checkResponse(t, "re-putting signed manifest", resp, http.StatusCreated) @@ -1729,7 +1729,7 @@ func testManifestAPISchema1(t *testing.T, env *testEnv, imageName reference.Name } // check only 1 signature is returned - signatures, err = fetchedManifestByDigest.Signatures() //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + signatures, err = fetchedManifestByDigest.Signatures() //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if err != nil { t.Fatal(err) } @@ -1795,10 +1795,10 @@ func testManifestAPISchema1(t *testing.T, env *testEnv, imageName reference.Name // Attempt to put a manifest with mismatching FSLayer and History array cardinalities - unsignedManifest.History = append(unsignedManifest.History, schema1.History{ //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + unsignedManifest.History = append(unsignedManifest.History, schema1.History{ //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. V1Compatibility: "", }) - invalidSigned, err := schema1.Sign(unsignedManifest, env.pk) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + invalidSigned, err := schema1.Sign(unsignedManifest, env.pk) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if err != nil { t.Fatalf("error signing manifest") } @@ -2116,12 +2116,12 @@ func testManifestAPISchema2(t *testing.T, env *testEnv, imageName reference.Name checkResponse(t, "fetching uploaded manifest as schema1", resp, http.StatusOK) - m, desc, err := distribution.UnmarshalManifest(schema1.MediaTypeManifest, manifestBytes) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + m, desc, err := distribution.UnmarshalManifest(schema1.MediaTypeManifest, manifestBytes) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if err != nil { t.Fatalf("unexpected error unmarshalling manifest: %v", err) } - fetchedSchema1Manifest, ok := m.(*schema1.SignedManifest) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + fetchedSchema1Manifest, ok := m.(*schema1.SignedManifest) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if !ok { t.Fatalf("expecting schema1 manifest") } @@ -2246,7 +2246,7 @@ func testManifestAPIManifestList(t *testing.T, env *testEnv, args manifestArgs) t.Fatalf("Error constructing request: %s", err) } // multiple headers in mixed list format to ensure we parse correctly server-side - req.Header.Set("Accept", fmt.Sprintf(` %s ; q=0.8 , %s ; q=0.5 `, manifestlist.MediaTypeManifestList, schema1.MediaTypeSignedManifest)) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + req.Header.Set("Accept", fmt.Sprintf(` %s ; q=0.8 , %s ; q=0.5 `, manifestlist.MediaTypeManifestList, schema1.MediaTypeSignedManifest)) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. req.Header.Add("Accept", schema2.MediaTypeManifest) resp, err = http.DefaultClient.Do(req) if err != nil { @@ -2350,12 +2350,12 @@ func testManifestAPIManifestList(t *testing.T, env *testEnv, args manifestArgs) checkResponse(t, "fetching uploaded manifest list as schema1", resp, http.StatusOK) - m, desc, err := distribution.UnmarshalManifest(schema1.MediaTypeManifest, manifestBytes) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + m, desc, err := distribution.UnmarshalManifest(schema1.MediaTypeManifest, manifestBytes) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if err != nil { t.Fatalf("unexpected error unmarshalling manifest: %v", err) } - fetchedSchema1Manifest, ok := m.(*schema1.SignedManifest) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + fetchedSchema1Manifest, ok := m.(*schema1.SignedManifest) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if !ok { t.Fatalf("expecting schema1 manifest") } @@ -2556,7 +2556,7 @@ func newTestEnvMirror(t *testing.T, deleteEnabled bool) *testEnv { MaxEntries: 5, }, } - config.Compatibility.Schema1.Enabled = true //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + config.Compatibility.Schema1.Enabled = true //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. return newTestEnvWithConfig(t, &config) } @@ -2575,7 +2575,7 @@ func newTestEnv(t *testing.T, deleteEnabled bool) *testEnv { }, } - config.Compatibility.Schema1.Enabled = true //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + config.Compatibility.Schema1.Enabled = true //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. config.HTTP.Headers = headerConfig return newTestEnvWithConfig(t, &config) @@ -2615,8 +2615,8 @@ func putManifest(t *testing.T, msg, url, contentType string, v interface{}) *htt var body []byte switch m := v.(type) { - case *schema1.SignedManifest: //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. - _, pl, err := m.Payload() //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + case *schema1.SignedManifest: //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. + _, pl, err := m.Payload() //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if err != nil { t.Fatalf("error getting payload: %v", err) } @@ -2968,18 +2968,18 @@ func createRepository(env *testEnv, t *testing.T, imageName string, tag string) t.Fatalf("unable to parse reference: %v", err) } - unsignedManifest := &schema1.Manifest{ //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + unsignedManifest := &schema1.Manifest{ //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. Versioned: manifest.Versioned{ SchemaVersion: 1, }, Name: imageName, Tag: tag, - FSLayers: []schema1.FSLayer{ //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + FSLayers: []schema1.FSLayer{ //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. { BlobSum: "asdf", }, }, - History: []schema1.History{ //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + History: []schema1.History{ //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. { V1Compatibility: "", }, @@ -3001,7 +3001,7 @@ func createRepository(env *testEnv, t *testing.T, imageName string, tag string) pushLayer(t, env.builder, imageNameRef, dgst, uploadURLBase, rs) } - signedManifest, err := schema1.Sign(unsignedManifest, env.pk) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + signedManifest, err := schema1.Sign(unsignedManifest, env.pk) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if err != nil { t.Fatalf("unexpected error signing manifest: %v", err) } @@ -3042,17 +3042,17 @@ func TestRegistryAsCacheMutationAPIs(t *testing.T) { } // Manifest upload - m := &schema1.Manifest{ //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + m := &schema1.Manifest{ //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. Versioned: manifest.Versioned{ SchemaVersion: 1, }, Name: imageName.Name(), Tag: tag, - FSLayers: []schema1.FSLayer{}, //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. - History: []schema1.History{}, //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + FSLayers: []schema1.FSLayer{}, //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. + History: []schema1.History{}, //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. } - sm, err := schema1.Sign(m, env.pk) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + sm, err := schema1.Sign(m, env.pk) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if err != nil { t.Fatalf("error signing manifest: %v", err) } @@ -3094,7 +3094,7 @@ func TestProxyManifestGetByTag(t *testing.T) { }}, }, } - truthConfig.Compatibility.Schema1.Enabled = true //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + truthConfig.Compatibility.Schema1.Enabled = true //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. truthConfig.HTTP.Headers = headerConfig imageName, _ := reference.WithName("foo/bar") @@ -3113,7 +3113,7 @@ func TestProxyManifestGetByTag(t *testing.T) { RemoteURL: truthEnv.server.URL, }, } - proxyConfig.Compatibility.Schema1.Enabled = true //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + proxyConfig.Compatibility.Schema1.Enabled = true //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. proxyConfig.HTTP.Headers = headerConfig proxyEnv := newTestEnvWithConfig(t, &proxyConfig) diff --git a/registry/handlers/app.go b/registry/handlers/app.go index d4c1fbf449..8d3fae9b2d 100644 --- a/registry/handlers/app.go +++ b/registry/handlers/app.go @@ -20,7 +20,7 @@ import ( events "github.com/docker/go-events" "github.com/docker/go-metrics" "github.com/docker/libtrust" - "github.com/garyburd/redigo/redis" + "github.com/gomodule/redigo/redis" "github.com/gorilla/mux" "github.com/sirupsen/logrus" diff --git a/registry/handlers/app_test.go b/registry/handlers/app_test.go index 408d76b912..54a3013d6d 100644 --- a/registry/handlers/app_test.go +++ b/registry/handlers/app_test.go @@ -8,15 +8,15 @@ import ( "reflect" "testing" - "github.com/distribution/distribution/v3/configuration" - "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/registry/api/errcode" - v2 "github.com/distribution/distribution/v3/registry/api/v2" - "github.com/distribution/distribution/v3/registry/auth" - _ "github.com/distribution/distribution/v3/registry/auth/silly" - "github.com/distribution/distribution/v3/registry/storage" - memorycache "github.com/distribution/distribution/v3/registry/storage/cache/memory" - "github.com/distribution/distribution/v3/registry/storage/driver/inmemory" + "github.com/docker/distribution/configuration" + "github.com/docker/distribution/context" + "github.com/docker/distribution/registry/api/errcode" + v2 "github.com/docker/distribution/registry/api/v2" + "github.com/docker/distribution/registry/auth" + _ "github.com/docker/distribution/registry/auth/silly" + "github.com/docker/distribution/registry/storage" + memorycache "github.com/docker/distribution/registry/storage/cache/memory" + "github.com/docker/distribution/registry/storage/driver/inmemory" ) // TestAppDispatcher builds an application with a test dispatcher and ensures diff --git a/registry/handlers/catalog.go b/registry/handlers/catalog.go index 0e63387895..92ebac66e4 100644 --- a/registry/handlers/catalog.go +++ b/registry/handlers/catalog.go @@ -8,9 +8,9 @@ import ( "net/url" "strconv" - "github.com/distribution/distribution/v3/registry/api/errcode" - v2 "github.com/distribution/distribution/v3/registry/api/v2" - "github.com/distribution/distribution/v3/registry/storage/driver" + "github.com/docker/distribution/registry/api/errcode" + v2 "github.com/docker/distribution/registry/api/v2" + "github.com/docker/distribution/registry/storage/driver" "github.com/gorilla/handlers" ) diff --git a/registry/handlers/context.go b/registry/handlers/context.go index cac97a04c3..b1b7a13d32 100644 --- a/registry/handlers/context.go +++ b/registry/handlers/context.go @@ -5,11 +5,11 @@ import ( "fmt" "net/http" - "github.com/distribution/distribution/v3" - dcontext "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/registry/api/errcode" - v2 "github.com/distribution/distribution/v3/registry/api/v2" - "github.com/distribution/distribution/v3/registry/auth" + "github.com/docker/distribution" + dcontext "github.com/docker/distribution/context" + "github.com/docker/distribution/registry/api/errcode" + v2 "github.com/docker/distribution/registry/api/v2" + "github.com/docker/distribution/registry/auth" "github.com/opencontainers/go-digest" ) diff --git a/registry/handlers/health_test.go b/registry/handlers/health_test.go index e0d61555ab..ead6598493 100644 --- a/registry/handlers/health_test.go +++ b/registry/handlers/health_test.go @@ -8,9 +8,9 @@ import ( "testing" "time" - "github.com/distribution/distribution/v3/configuration" - "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/health" + "github.com/docker/distribution/configuration" + "github.com/docker/distribution/context" + "github.com/docker/distribution/health" ) func TestFileHealthCheck(t *testing.T) { diff --git a/registry/handlers/manifests.go b/registry/handlers/manifests.go index c7d094d69c..b2e778daed 100644 --- a/registry/handlers/manifests.go +++ b/registry/handlers/manifests.go @@ -7,7 +7,7 @@ import ( "net/http" "strings" - "github.com/distribution/distribution/v3/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver" "github.com/gorilla/handlers" "github.com/opencontainers/go-digest" v1 "github.com/opencontainers/image-spec/specs-go/v1" @@ -282,7 +282,7 @@ func (imh *manifestHandler) convertSchema2Manifest(schema2Manifest *schema2.Dese } } - builder := schema1.NewConfigManifestBuilder(imh.Repository.Blobs(imh), imh.Context.App.trustKey, ref, configJSON) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + builder := schema1.NewConfigManifestBuilder(imh.Repository.Blobs(imh), imh.Context.App.trustKey, ref, configJSON) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. for _, d := range schema2Manifest.Layers { if err := builder.AppendReference(d); err != nil { imh.Errors = append(imh.Errors, v2.ErrorCodeManifestInvalid.WithDetail(err)) @@ -294,7 +294,7 @@ func (imh *manifestHandler) convertSchema2Manifest(schema2Manifest *schema2.Dese imh.Errors = append(imh.Errors, v2.ErrorCodeManifestInvalid.WithDetail(err)) return nil, err } - imh.Digest = digest.FromBytes(manifest.(*schema1.SignedManifest).Canonical) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + imh.Digest = digest.FromBytes(manifest.(*schema1.SignedManifest).Canonical) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. return manifest, nil } @@ -445,7 +445,7 @@ func (imh *manifestHandler) applyResourcePolicy(manifest distribution.Manifest) var class string switch m := manifest.(type) { - case *schema1.SignedManifest: //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + case *schema1.SignedManifest: //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. class = imageClass case *schema2.DeserializedManifest: switch m.Config.MediaType { diff --git a/registry/middleware/registry/middleware.go b/registry/middleware/registry/middleware.go index 16552a3192..2c2f3d1bc1 100644 --- a/registry/middleware/registry/middleware.go +++ b/registry/middleware/registry/middleware.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/registry/storage" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" + "github.com/docker/distribution" + "github.com/docker/distribution/registry/storage" + storagedriver "github.com/docker/distribution/registry/storage/driver" ) // InitFunc is the type of a RegistryMiddleware factory function and is diff --git a/registry/middleware/repository/middleware.go b/registry/middleware/repository/middleware.go index 8c1cc8ef77..f1554b7099 100644 --- a/registry/middleware/repository/middleware.go +++ b/registry/middleware/repository/middleware.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/distribution/distribution/v3" + "github.com/docker/distribution" ) // InitFunc is the type of a RepositoryMiddleware factory function and is diff --git a/registry/proxy/proxyauth.go b/registry/proxy/proxyauth.go index 07d80b48ad..09a0973e6d 100644 --- a/registry/proxy/proxyauth.go +++ b/registry/proxy/proxyauth.go @@ -5,9 +5,9 @@ import ( "net/url" "strings" - "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/registry/client/auth" - "github.com/distribution/distribution/v3/registry/client/auth/challenge" + "github.com/docker/distribution/context" + "github.com/docker/distribution/registry/client/auth" + "github.com/docker/distribution/registry/client/auth/challenge" ) const challengeHeader = "Docker-Distribution-Api-Version" diff --git a/registry/proxy/proxyblobstore.go b/registry/proxy/proxyblobstore.go index a03b723760..dc3d1b62bb 100644 --- a/registry/proxy/proxyblobstore.go +++ b/registry/proxy/proxyblobstore.go @@ -10,10 +10,10 @@ import ( "github.com/opencontainers/go-digest" - "github.com/distribution/distribution/v3" - dcontext "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/reference" - "github.com/distribution/distribution/v3/registry/proxy/scheduler" + "github.com/docker/distribution" + dcontext "github.com/docker/distribution/context" + "github.com/docker/distribution/reference" + "github.com/docker/distribution/registry/proxy/scheduler" ) type proxyBlobStore struct { diff --git a/registry/proxy/proxyblobstore_test.go b/registry/proxy/proxyblobstore_test.go index 1531ba38d3..ed8b980de1 100644 --- a/registry/proxy/proxyblobstore_test.go +++ b/registry/proxy/proxyblobstore_test.go @@ -10,13 +10,13 @@ import ( "testing" "time" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/reference" - "github.com/distribution/distribution/v3/registry/proxy/scheduler" - "github.com/distribution/distribution/v3/registry/storage" - "github.com/distribution/distribution/v3/registry/storage/cache/memory" - "github.com/distribution/distribution/v3/registry/storage/driver/filesystem" - "github.com/distribution/distribution/v3/registry/storage/driver/inmemory" + "github.com/docker/distribution" + "github.com/docker/distribution/reference" + "github.com/docker/distribution/registry/proxy/scheduler" + "github.com/docker/distribution/registry/storage" + "github.com/docker/distribution/registry/storage/cache/memory" + "github.com/docker/distribution/registry/storage/driver/filesystem" + "github.com/docker/distribution/registry/storage/driver/inmemory" "github.com/opencontainers/go-digest" ) diff --git a/registry/proxy/proxymanifeststore.go b/registry/proxy/proxymanifeststore.go index 5673e69bb3..9ff73fe107 100644 --- a/registry/proxy/proxymanifeststore.go +++ b/registry/proxy/proxymanifeststore.go @@ -6,10 +6,10 @@ import ( "github.com/opencontainers/go-digest" - "github.com/distribution/distribution/v3" - dcontext "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/reference" - "github.com/distribution/distribution/v3/registry/proxy/scheduler" + "github.com/docker/distribution" + dcontext "github.com/docker/distribution/context" + "github.com/docker/distribution/reference" + "github.com/docker/distribution/registry/proxy/scheduler" ) type proxyManifestStore struct { diff --git a/registry/proxy/proxymanifeststore_test.go b/registry/proxy/proxymanifeststore_test.go index bd1c7ad9a6..cd2d55b442 100644 --- a/registry/proxy/proxymanifeststore_test.go +++ b/registry/proxy/proxymanifeststore_test.go @@ -6,16 +6,16 @@ import ( "sync" "testing" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/manifest/schema2" - "github.com/distribution/distribution/v3/reference" - "github.com/distribution/distribution/v3/registry/client/auth" - "github.com/distribution/distribution/v3/registry/client/auth/challenge" - "github.com/distribution/distribution/v3/registry/proxy/scheduler" - "github.com/distribution/distribution/v3/registry/storage" - "github.com/distribution/distribution/v3/registry/storage/cache/memory" - "github.com/distribution/distribution/v3/registry/storage/driver/inmemory" - "github.com/distribution/distribution/v3/testutil" + "github.com/docker/distribution" + "github.com/docker/distribution/manifest/schema2" + "github.com/docker/distribution/reference" + "github.com/docker/distribution/registry/client/auth" + "github.com/docker/distribution/registry/client/auth/challenge" + "github.com/docker/distribution/registry/proxy/scheduler" + "github.com/docker/distribution/registry/storage" + "github.com/docker/distribution/registry/storage/cache/memory" + "github.com/docker/distribution/registry/storage/driver/inmemory" + "github.com/docker/distribution/testutil" "github.com/opencontainers/go-digest" ) diff --git a/registry/proxy/proxyregistry.go b/registry/proxy/proxyregistry.go index b67ba1a20e..b62f7b212e 100644 --- a/registry/proxy/proxyregistry.go +++ b/registry/proxy/proxyregistry.go @@ -8,17 +8,17 @@ import ( "sync" "time" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/configuration" - dcontext "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/reference" - "github.com/distribution/distribution/v3/registry/client" - "github.com/distribution/distribution/v3/registry/client/auth" - "github.com/distribution/distribution/v3/registry/client/auth/challenge" - "github.com/distribution/distribution/v3/registry/client/transport" - "github.com/distribution/distribution/v3/registry/proxy/scheduler" - "github.com/distribution/distribution/v3/registry/storage" - "github.com/distribution/distribution/v3/registry/storage/driver" + "github.com/docker/distribution" + "github.com/docker/distribution/configuration" + dcontext "github.com/docker/distribution/context" + "github.com/docker/distribution/reference" + "github.com/docker/distribution/registry/client" + "github.com/docker/distribution/registry/client/auth" + "github.com/docker/distribution/registry/client/auth/challenge" + "github.com/docker/distribution/registry/client/transport" + "github.com/docker/distribution/registry/proxy/scheduler" + "github.com/docker/distribution/registry/storage" + "github.com/docker/distribution/registry/storage/driver" ) var repositoryTTL = 24 * 7 * time.Hour diff --git a/registry/proxy/proxytagservice.go b/registry/proxy/proxytagservice.go index 6bc08dba32..6a9256395f 100644 --- a/registry/proxy/proxytagservice.go +++ b/registry/proxy/proxytagservice.go @@ -3,7 +3,7 @@ package proxy import ( "context" - "github.com/distribution/distribution/v3" + "github.com/docker/distribution" ) // proxyTagService supports local and remote lookup of tags. diff --git a/registry/proxy/proxytagservice_test.go b/registry/proxy/proxytagservice_test.go index 61e1585273..c1e103e1d2 100644 --- a/registry/proxy/proxytagservice_test.go +++ b/registry/proxy/proxytagservice_test.go @@ -7,7 +7,7 @@ import ( "sync" "testing" - "github.com/distribution/distribution/v3" + "github.com/docker/distribution" ) type mockTagStore struct { diff --git a/registry/proxy/scheduler/scheduler.go b/registry/proxy/scheduler/scheduler.go index 8e5f4160c9..f3c1caa036 100644 --- a/registry/proxy/scheduler/scheduler.go +++ b/registry/proxy/scheduler/scheduler.go @@ -7,9 +7,9 @@ import ( "sync" "time" - dcontext "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/reference" - "github.com/distribution/distribution/v3/registry/storage/driver" + dcontext "github.com/docker/distribution/context" + "github.com/docker/distribution/reference" + "github.com/docker/distribution/registry/storage/driver" ) // onTTLExpiryFunc is called when a repository's TTL expires diff --git a/registry/proxy/scheduler/scheduler_test.go b/registry/proxy/scheduler/scheduler_test.go index c1324ff8ae..6e90fc394d 100644 --- a/registry/proxy/scheduler/scheduler_test.go +++ b/registry/proxy/scheduler/scheduler_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/reference" - "github.com/distribution/distribution/v3/registry/storage/driver/inmemory" + "github.com/docker/distribution/context" + "github.com/docker/distribution/reference" + "github.com/docker/distribution/registry/storage/driver/inmemory" ) func testRefs(t *testing.T) (reference.Reference, reference.Reference, reference.Reference) { diff --git a/registry/registry.go b/registry/registry.go index 5eab4a7102..f81134def0 100644 --- a/registry/registry.go +++ b/registry/registry.go @@ -23,13 +23,13 @@ import ( "golang.org/x/crypto/acme" "golang.org/x/crypto/acme/autocert" - "github.com/distribution/distribution/v3/configuration" - dcontext "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/health" - "github.com/distribution/distribution/v3/registry/handlers" - "github.com/distribution/distribution/v3/registry/listener" - "github.com/distribution/distribution/v3/uuid" - "github.com/distribution/distribution/v3/version" + "github.com/docker/distribution/configuration" + dcontext "github.com/docker/distribution/context" + "github.com/docker/distribution/health" + "github.com/docker/distribution/registry/handlers" + "github.com/docker/distribution/registry/listener" + "github.com/docker/distribution/uuid" + "github.com/docker/distribution/version" ) // a map of TLS cipher suite names to constants in https://golang.org/pkg/crypto/tls/#pkg-constants diff --git a/registry/registry_test.go b/registry/registry_test.go index 5a7210ff52..98617e496c 100644 --- a/registry/registry_test.go +++ b/registry/registry_test.go @@ -24,9 +24,9 @@ import ( "testing" "time" - "github.com/distribution/distribution/v3/configuration" - dcontext "github.com/distribution/distribution/v3/context" - _ "github.com/distribution/distribution/v3/registry/storage/driver/inmemory" + "github.com/docker/distribution/configuration" + dcontext "github.com/docker/distribution/context" + _ "github.com/docker/distribution/registry/storage/driver/inmemory" "github.com/sirupsen/logrus" "gopkg.in/yaml.v2" ) diff --git a/registry/root.go b/registry/root.go index 49d109466c..4e8d98275b 100644 --- a/registry/root.go +++ b/registry/root.go @@ -4,10 +4,10 @@ import ( "fmt" "os" - dcontext "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/registry/storage" - "github.com/distribution/distribution/v3/registry/storage/driver/factory" - "github.com/distribution/distribution/v3/version" + dcontext "github.com/docker/distribution/context" + "github.com/docker/distribution/registry/storage" + "github.com/docker/distribution/registry/storage/driver/factory" + "github.com/docker/distribution/version" "github.com/docker/libtrust" "github.com/spf13/cobra" ) diff --git a/registry/storage/blob_test.go b/registry/storage/blob_test.go index 0115825519..01a875e08d 100644 --- a/registry/storage/blob_test.go +++ b/registry/storage/blob_test.go @@ -10,11 +10,11 @@ import ( "reflect" "testing" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/reference" - "github.com/distribution/distribution/v3/registry/storage/cache/memory" - "github.com/distribution/distribution/v3/registry/storage/driver/inmemory" - "github.com/distribution/distribution/v3/testutil" + "github.com/docker/distribution" + "github.com/docker/distribution/reference" + "github.com/docker/distribution/registry/storage/cache/memory" + "github.com/docker/distribution/registry/storage/driver/inmemory" + "github.com/docker/distribution/testutil" "github.com/opencontainers/go-digest" ) diff --git a/registry/storage/blobserver.go b/registry/storage/blobserver.go index 6392e3554e..57d4f907bb 100644 --- a/registry/storage/blobserver.go +++ b/registry/storage/blobserver.go @@ -6,8 +6,8 @@ import ( "net/http" "time" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/registry/storage/driver" + "github.com/docker/distribution" + "github.com/docker/distribution/registry/storage/driver" "github.com/opencontainers/go-digest" ) diff --git a/registry/storage/blobstore.go b/registry/storage/blobstore.go index b5daf32ee4..0bc1c2248e 100644 --- a/registry/storage/blobstore.go +++ b/registry/storage/blobstore.go @@ -5,9 +5,9 @@ import ( "io" "path" - "github.com/distribution/distribution/v3" - dcontext "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/registry/storage/driver" + "github.com/docker/distribution" + dcontext "github.com/docker/distribution/context" + "github.com/docker/distribution/registry/storage/driver" "github.com/opencontainers/go-digest" ) diff --git a/registry/storage/blobwriter.go b/registry/storage/blobwriter.go index 48bd2a8cae..4033ea4679 100644 --- a/registry/storage/blobwriter.go +++ b/registry/storage/blobwriter.go @@ -8,9 +8,9 @@ import ( "path" "time" - "github.com/distribution/distribution/v3" - dcontext "github.com/distribution/distribution/v3/context" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" + "github.com/docker/distribution" + dcontext "github.com/docker/distribution/context" + storagedriver "github.com/docker/distribution/registry/storage/driver" "github.com/opencontainers/go-digest" "github.com/sirupsen/logrus" ) diff --git a/registry/storage/blobwriter_nonresumable.go b/registry/storage/blobwriter_nonresumable.go index a7df9a22a3..38267cf605 100644 --- a/registry/storage/blobwriter_nonresumable.go +++ b/registry/storage/blobwriter_nonresumable.go @@ -4,7 +4,7 @@ package storage import ( - "github.com/distribution/distribution/v3/context" + "github.com/docker/distribution/context" ) // resumeHashAt is a noop when resumable digest support is disabled. diff --git a/registry/storage/blobwriter_resumable.go b/registry/storage/blobwriter_resumable.go index 5c55d54035..bd8b0f0425 100644 --- a/registry/storage/blobwriter_resumable.go +++ b/registry/storage/blobwriter_resumable.go @@ -11,7 +11,7 @@ import ( "path" "strconv" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" + storagedriver "github.com/docker/distribution/registry/storage/driver" "github.com/sirupsen/logrus" ) diff --git a/registry/storage/cache/cache.go b/registry/storage/cache/cache.go index 0aa9dd4a80..10a3909197 100644 --- a/registry/storage/cache/cache.go +++ b/registry/storage/cache/cache.go @@ -5,7 +5,7 @@ package cache import ( "fmt" - "github.com/distribution/distribution/v3" + "github.com/docker/distribution" ) // BlobDescriptorCacheProvider provides repository scoped diff --git a/registry/storage/cache/cache_test.go b/registry/storage/cache/cache_test.go index f7e65be557..2e7f055662 100644 --- a/registry/storage/cache/cache_test.go +++ b/registry/storage/cache/cache_test.go @@ -5,7 +5,7 @@ import ( "errors" "testing" - "github.com/distribution/distribution/v3" + "github.com/docker/distribution" digest "github.com/opencontainers/go-digest" ) diff --git a/registry/storage/cache/cachecheck/suite.go b/registry/storage/cache/cachecheck/suite.go index 8047bb4c08..eca6d00d4e 100644 --- a/registry/storage/cache/cachecheck/suite.go +++ b/registry/storage/cache/cachecheck/suite.go @@ -5,8 +5,8 @@ import ( "reflect" "testing" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/registry/storage/cache" + "github.com/docker/distribution" + "github.com/docker/distribution/registry/storage/cache" "github.com/opencontainers/go-digest" ) diff --git a/registry/storage/cache/cachedblobdescriptorstore.go b/registry/storage/cache/cachedblobdescriptorstore.go index b4dc828cc0..b57f4bd324 100644 --- a/registry/storage/cache/cachedblobdescriptorstore.go +++ b/registry/storage/cache/cachedblobdescriptorstore.go @@ -3,9 +3,9 @@ package cache import ( "context" - "github.com/distribution/distribution/v3" - dcontext "github.com/distribution/distribution/v3/context" - prometheus "github.com/distribution/distribution/v3/metrics" + "github.com/docker/distribution" + dcontext "github.com/docker/distribution/context" + prometheus "github.com/docker/distribution/metrics" "github.com/opencontainers/go-digest" ) diff --git a/registry/storage/cache/memory/memory.go b/registry/storage/cache/memory/memory.go index 6413468eee..322dde5290 100644 --- a/registry/storage/cache/memory/memory.go +++ b/registry/storage/cache/memory/memory.go @@ -4,9 +4,9 @@ import ( "context" "math" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/reference" - "github.com/distribution/distribution/v3/registry/storage/cache" + "github.com/docker/distribution" + "github.com/docker/distribution/reference" + "github.com/docker/distribution/registry/storage/cache" lru "github.com/hashicorp/golang-lru" "github.com/opencontainers/go-digest" ) diff --git a/registry/storage/cache/memory/memory_test.go b/registry/storage/cache/memory/memory_test.go index 3abbdfeae4..08721104df 100644 --- a/registry/storage/cache/memory/memory_test.go +++ b/registry/storage/cache/memory/memory_test.go @@ -3,7 +3,7 @@ package memory import ( "testing" - "github.com/distribution/distribution/v3/registry/storage/cache/cachecheck" + "github.com/docker/distribution/registry/storage/cache/cachecheck" ) // TestInMemoryBlobInfoCache checks the in memory implementation is working diff --git a/registry/storage/cache/metrics/prom.go b/registry/storage/cache/metrics/prom.go index 5401e12f08..7b50e93fa7 100644 --- a/registry/storage/cache/metrics/prom.go +++ b/registry/storage/cache/metrics/prom.go @@ -4,9 +4,9 @@ import ( "context" "time" - "github.com/distribution/distribution/v3" - prometheus "github.com/distribution/distribution/v3/metrics" - "github.com/distribution/distribution/v3/registry/storage/cache" + "github.com/docker/distribution" + prometheus "github.com/docker/distribution/metrics" + "github.com/docker/distribution/registry/storage/cache" "github.com/docker/go-metrics" "github.com/opencontainers/go-digest" ) diff --git a/registry/storage/cache/redis/redis.go b/registry/storage/cache/redis/redis.go index a4b3173746..5f84249bb6 100644 --- a/registry/storage/cache/redis/redis.go +++ b/registry/storage/cache/redis/redis.go @@ -4,10 +4,10 @@ import ( "context" "fmt" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/reference" - "github.com/distribution/distribution/v3/registry/storage/cache" - "github.com/distribution/distribution/v3/registry/storage/cache/metrics" + "github.com/docker/distribution" + "github.com/docker/distribution/reference" + "github.com/docker/distribution/registry/storage/cache" + "github.com/docker/distribution/registry/storage/cache/metrics" "github.com/gomodule/redigo/redis" "github.com/opencontainers/go-digest" ) diff --git a/registry/storage/cache/redis/redis_test.go b/registry/storage/cache/redis/redis_test.go index b69b9cc2ee..5f163a7479 100644 --- a/registry/storage/cache/redis/redis_test.go +++ b/registry/storage/cache/redis/redis_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/distribution/distribution/v3/registry/storage/cache/cachecheck" + "github.com/docker/distribution/registry/storage/cache/cachecheck" "github.com/gomodule/redigo/redis" ) diff --git a/registry/storage/catalog.go b/registry/storage/catalog.go index 55500694dc..a903fb393c 100644 --- a/registry/storage/catalog.go +++ b/registry/storage/catalog.go @@ -7,8 +7,8 @@ import ( "path" "strings" - "github.com/distribution/distribution/v3/reference" - "github.com/distribution/distribution/v3/registry/storage/driver" + "github.com/docker/distribution/reference" + "github.com/docker/distribution/registry/storage/driver" ) // Returns a list, or partial list, of repositories in the registry. diff --git a/registry/storage/catalog_test.go b/registry/storage/catalog_test.go index 14ba4e8334..024a6b2334 100644 --- a/registry/storage/catalog_test.go +++ b/registry/storage/catalog_test.go @@ -7,12 +7,12 @@ import ( "math/rand" "testing" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/reference" - "github.com/distribution/distribution/v3/registry/storage/cache/memory" - "github.com/distribution/distribution/v3/registry/storage/driver" - "github.com/distribution/distribution/v3/registry/storage/driver/inmemory" - "github.com/distribution/distribution/v3/testutil" + "github.com/docker/distribution" + "github.com/docker/distribution/reference" + "github.com/docker/distribution/registry/storage/cache/memory" + "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/inmemory" + "github.com/docker/distribution/testutil" "github.com/opencontainers/go-digest" ) @@ -93,7 +93,7 @@ func makeRepo(ctx context.Context, t *testing.T, name string, reg distribution.N return } - manifest, err := testutil.MakeSchema1Manifest(getKeys(layers)) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + manifest, err := testutil.MakeSchema1Manifest(getKeys(layers)) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if err != nil { t.Fatal(err) } diff --git a/registry/storage/driver/azure/azure.go b/registry/storage/driver/azure/azure.go index f2cb110187..8f6f8251bc 100644 --- a/registry/storage/driver/azure/azure.go +++ b/registry/storage/driver/azure/azure.go @@ -11,9 +11,9 @@ import ( "strings" "time" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" - "github.com/distribution/distribution/v3/registry/storage/driver/base" - "github.com/distribution/distribution/v3/registry/storage/driver/factory" + storagedriver "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/base" + "github.com/docker/distribution/registry/storage/driver/factory" "github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming" "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/blob" diff --git a/registry/storage/driver/azure/azure_test.go b/registry/storage/driver/azure/azure_test.go index c0d4d2e642..dbe796eaed 100644 --- a/registry/storage/driver/azure/azure_test.go +++ b/registry/storage/driver/azure/azure_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" - "github.com/distribution/distribution/v3/registry/storage/driver/testsuites" + storagedriver "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/testsuites" "gopkg.in/check.v1" ) diff --git a/registry/storage/driver/base/base.go b/registry/storage/driver/base/base.go index 30a455122e..e2f4483019 100644 --- a/registry/storage/driver/base/base.go +++ b/registry/storage/driver/base/base.go @@ -42,9 +42,9 @@ import ( "io" "time" - dcontext "github.com/distribution/distribution/v3/context" - prometheus "github.com/distribution/distribution/v3/metrics" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" + dcontext "github.com/docker/distribution/context" + prometheus "github.com/docker/distribution/metrics" + storagedriver "github.com/docker/distribution/registry/storage/driver" "github.com/docker/go-metrics" ) diff --git a/registry/storage/driver/base/regulator.go b/registry/storage/driver/base/regulator.go index 09a258e353..df6e503857 100644 --- a/registry/storage/driver/base/regulator.go +++ b/registry/storage/driver/base/regulator.go @@ -8,7 +8,7 @@ import ( "strconv" "sync" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" + storagedriver "github.com/docker/distribution/registry/storage/driver" ) type regulator struct { diff --git a/registry/storage/driver/factory/factory.go b/registry/storage/driver/factory/factory.go index 3a4b57ce5c..a9c04ec593 100644 --- a/registry/storage/driver/factory/factory.go +++ b/registry/storage/driver/factory/factory.go @@ -3,7 +3,7 @@ package factory import ( "fmt" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" + storagedriver "github.com/docker/distribution/registry/storage/driver" ) // driverFactories stores an internal mapping between storage driver names and their respective @@ -16,7 +16,7 @@ var driverFactories = make(map[string]StorageDriverFactory) // func (below) in their init() funcs, and as such they should be imported anonymously before use. // See below for an example of how to register and get a StorageDriver for S3 // -// import _ "github.com/distribution/distribution/v3/registry/storage/driver/s3-aws" +// import _ "github.com/docker/distribution/registry/storage/driver/s3-aws" // s3Driver, err = factory.Create("s3", storageParams) // // assuming no error, s3Driver is the StorageDriver that communicates with S3 according to storageParams type StorageDriverFactory interface { diff --git a/registry/storage/driver/filesystem/driver.go b/registry/storage/driver/filesystem/driver.go index de7ba09660..a142d81685 100644 --- a/registry/storage/driver/filesystem/driver.go +++ b/registry/storage/driver/filesystem/driver.go @@ -10,9 +10,9 @@ import ( "path" "time" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" - "github.com/distribution/distribution/v3/registry/storage/driver/base" - "github.com/distribution/distribution/v3/registry/storage/driver/factory" + storagedriver "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/base" + "github.com/docker/distribution/registry/storage/driver/factory" ) const ( diff --git a/registry/storage/driver/filesystem/driver_test.go b/registry/storage/driver/filesystem/driver_test.go index f492d34201..b30bfea929 100644 --- a/registry/storage/driver/filesystem/driver_test.go +++ b/registry/storage/driver/filesystem/driver_test.go @@ -5,8 +5,8 @@ import ( "reflect" "testing" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" - "github.com/distribution/distribution/v3/registry/storage/driver/testsuites" + storagedriver "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/testsuites" "gopkg.in/check.v1" ) diff --git a/registry/storage/driver/gcs/gcs.go b/registry/storage/driver/gcs/gcs.go index eb1d636b8d..d6e41772e7 100644 --- a/registry/storage/driver/gcs/gcs.go +++ b/registry/storage/driver/gcs/gcs.go @@ -33,9 +33,9 @@ import ( "time" "cloud.google.com/go/storage" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" - "github.com/distribution/distribution/v3/registry/storage/driver/base" - "github.com/distribution/distribution/v3/registry/storage/driver/factory" + storagedriver "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/base" + "github.com/docker/distribution/registry/storage/driver/factory" "github.com/sirupsen/logrus" "golang.org/x/oauth2" "golang.org/x/oauth2/google" diff --git a/registry/storage/driver/gcs/gcs_test.go b/registry/storage/driver/gcs/gcs_test.go index d9f0da3ec8..bbe0f9c2bf 100644 --- a/registry/storage/driver/gcs/gcs_test.go +++ b/registry/storage/driver/gcs/gcs_test.go @@ -9,9 +9,9 @@ import ( "testing" "cloud.google.com/go/storage" - dcontext "github.com/distribution/distribution/v3/context" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" - "github.com/distribution/distribution/v3/registry/storage/driver/testsuites" + dcontext "github.com/docker/distribution/context" + storagedriver "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/testsuites" "golang.org/x/oauth2" "golang.org/x/oauth2/google" "google.golang.org/api/googleapi" diff --git a/registry/storage/driver/inmemory/driver.go b/registry/storage/driver/inmemory/driver.go index 6370ca638d..ee8d67ce0a 100644 --- a/registry/storage/driver/inmemory/driver.go +++ b/registry/storage/driver/inmemory/driver.go @@ -7,9 +7,9 @@ import ( "sync" "time" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" - "github.com/distribution/distribution/v3/registry/storage/driver/base" - "github.com/distribution/distribution/v3/registry/storage/driver/factory" + storagedriver "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/base" + "github.com/docker/distribution/registry/storage/driver/factory" ) const driverName = "inmemory" diff --git a/registry/storage/driver/inmemory/driver_test.go b/registry/storage/driver/inmemory/driver_test.go index 64d6fafdba..dbc1916f95 100644 --- a/registry/storage/driver/inmemory/driver_test.go +++ b/registry/storage/driver/inmemory/driver_test.go @@ -3,8 +3,8 @@ package inmemory import ( "testing" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" - "github.com/distribution/distribution/v3/registry/storage/driver/testsuites" + storagedriver "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/testsuites" "gopkg.in/check.v1" ) diff --git a/registry/storage/driver/middleware/alicdn/middleware.go b/registry/storage/driver/middleware/alicdn/middleware.go index 033a9daf1f..07d3fa3dae 100755 --- a/registry/storage/driver/middleware/alicdn/middleware.go +++ b/registry/storage/driver/middleware/alicdn/middleware.go @@ -7,9 +7,9 @@ import ( "strings" "time" - dcontext "github.com/distribution/distribution/v3/context" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" - storagemiddleware "github.com/distribution/distribution/v3/registry/storage/driver/middleware" + dcontext "github.com/docker/distribution/context" + storagedriver "github.com/docker/distribution/registry/storage/driver" + storagemiddleware "github.com/docker/distribution/registry/storage/driver/middleware" "github.com/denverdino/aliyungo/cdn/auth" ) diff --git a/registry/storage/driver/middleware/cloudfront/middleware.go b/registry/storage/driver/middleware/cloudfront/middleware.go index 5c2c09955a..62d5a21f57 100644 --- a/registry/storage/driver/middleware/cloudfront/middleware.go +++ b/registry/storage/driver/middleware/cloudfront/middleware.go @@ -13,9 +13,9 @@ import ( "time" "github.com/aws/aws-sdk-go/service/cloudfront/sign" - dcontext "github.com/distribution/distribution/v3/context" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" - storagemiddleware "github.com/distribution/distribution/v3/registry/storage/driver/middleware" + dcontext "github.com/docker/distribution/context" + storagedriver "github.com/docker/distribution/registry/storage/driver" + storagemiddleware "github.com/docker/distribution/registry/storage/driver/middleware" ) // cloudFrontStorageMiddleware provides a simple implementation of layerHandler that diff --git a/registry/storage/driver/middleware/cloudfront/s3filter.go b/registry/storage/driver/middleware/cloudfront/s3filter.go index 1ff9829ee0..2927efc83e 100644 --- a/registry/storage/driver/middleware/cloudfront/s3filter.go +++ b/registry/storage/driver/middleware/cloudfront/s3filter.go @@ -11,7 +11,7 @@ import ( "sync" "time" - dcontext "github.com/distribution/distribution/v3/context" + dcontext "github.com/docker/distribution/context" ) const ( diff --git a/registry/storage/driver/middleware/cloudfront/s3filter_test.go b/registry/storage/driver/middleware/cloudfront/s3filter_test.go index 81ef6aa8af..a2cf22fa6f 100644 --- a/registry/storage/driver/middleware/cloudfront/s3filter_test.go +++ b/registry/storage/driver/middleware/cloudfront/s3filter_test.go @@ -12,7 +12,7 @@ import ( "testing" "time" - dcontext "github.com/distribution/distribution/v3/context" + dcontext "github.com/docker/distribution/context" ) // Rather than pull in all of testify diff --git a/registry/storage/driver/middleware/redirect/middleware.go b/registry/storage/driver/middleware/redirect/middleware.go index 9e1b303ea7..6b447d91ce 100644 --- a/registry/storage/driver/middleware/redirect/middleware.go +++ b/registry/storage/driver/middleware/redirect/middleware.go @@ -6,8 +6,8 @@ import ( "net/url" "path" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" - storagemiddleware "github.com/distribution/distribution/v3/registry/storage/driver/middleware" + storagedriver "github.com/docker/distribution/registry/storage/driver" + storagemiddleware "github.com/docker/distribution/registry/storage/driver/middleware" ) type redirectStorageMiddleware struct { diff --git a/registry/storage/driver/middleware/storagemiddleware.go b/registry/storage/driver/middleware/storagemiddleware.go index bde645dc51..7e40a8dd9d 100644 --- a/registry/storage/driver/middleware/storagemiddleware.go +++ b/registry/storage/driver/middleware/storagemiddleware.go @@ -3,7 +3,7 @@ package storagemiddleware import ( "fmt" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" + storagedriver "github.com/docker/distribution/registry/storage/driver" ) // InitFunc is the type of a StorageMiddleware factory function and is diff --git a/registry/storage/driver/oss/oss.go b/registry/storage/driver/oss/oss.go index aa3f0893c1..752e938dae 100644 --- a/registry/storage/driver/oss/oss.go +++ b/registry/storage/driver/oss/oss.go @@ -23,9 +23,9 @@ import ( "time" "github.com/denverdino/aliyungo/oss" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" - "github.com/distribution/distribution/v3/registry/storage/driver/base" - "github.com/distribution/distribution/v3/registry/storage/driver/factory" + storagedriver "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/base" + "github.com/docker/distribution/registry/storage/driver/factory" "github.com/sirupsen/logrus" ) diff --git a/registry/storage/driver/oss/oss_test.go b/registry/storage/driver/oss/oss_test.go index f1518424b3..d831027364 100644 --- a/registry/storage/driver/oss/oss_test.go +++ b/registry/storage/driver/oss/oss_test.go @@ -9,9 +9,9 @@ import ( "testing" alioss "github.com/denverdino/aliyungo/oss" - "github.com/distribution/distribution/v3/context" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" - "github.com/distribution/distribution/v3/registry/storage/driver/testsuites" + "github.com/docker/distribution/context" + storagedriver "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/testsuites" "gopkg.in/check.v1" ) diff --git a/registry/storage/driver/s3-aws/s3.go b/registry/storage/driver/s3-aws/s3.go index 50a0eea51e..cbd8a08fd4 100644 --- a/registry/storage/driver/s3-aws/s3.go +++ b/registry/storage/driver/s3-aws/s3.go @@ -36,10 +36,10 @@ import ( "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/s3" - dcontext "github.com/distribution/distribution/v3/context" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" - "github.com/distribution/distribution/v3/registry/storage/driver/base" - "github.com/distribution/distribution/v3/registry/storage/driver/factory" + dcontext "github.com/docker/distribution/context" + storagedriver "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/base" + "github.com/docker/distribution/registry/storage/driver/factory" ) const driverName = "s3aws" diff --git a/registry/storage/driver/s3-aws/s3_test.go b/registry/storage/driver/s3-aws/s3_test.go index 44f2642c8e..0ad29e3419 100644 --- a/registry/storage/driver/s3-aws/s3_test.go +++ b/registry/storage/driver/s3-aws/s3_test.go @@ -18,9 +18,9 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/s3" - "github.com/distribution/distribution/v3/context" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" - "github.com/distribution/distribution/v3/registry/storage/driver/testsuites" + "github.com/docker/distribution/context" + storagedriver "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/testsuites" ) // Hook up gocheck into the "go test" runner. diff --git a/registry/storage/driver/testsuites/testsuites.go b/registry/storage/driver/testsuites/testsuites.go index 9847bb3875..2856c4f44a 100644 --- a/registry/storage/driver/testsuites/testsuites.go +++ b/registry/storage/driver/testsuites/testsuites.go @@ -15,7 +15,7 @@ import ( "testing" "time" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" + storagedriver "github.com/docker/distribution/registry/storage/driver" "gopkg.in/check.v1" ) diff --git a/registry/storage/filereader.go b/registry/storage/filereader.go index b5004eb44b..388fff484e 100644 --- a/registry/storage/filereader.go +++ b/registry/storage/filereader.go @@ -7,7 +7,7 @@ import ( "fmt" "io" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" + storagedriver "github.com/docker/distribution/registry/storage/driver" ) // TODO(stevvooe): Set an optimal buffer size here. We'll have to diff --git a/registry/storage/filereader_test.go b/registry/storage/filereader_test.go index 51c88c36e6..da12d263c7 100644 --- a/registry/storage/filereader_test.go +++ b/registry/storage/filereader_test.go @@ -6,8 +6,8 @@ import ( mrand "math/rand" "testing" - "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/registry/storage/driver/inmemory" + "github.com/docker/distribution/context" + "github.com/docker/distribution/registry/storage/driver/inmemory" "github.com/opencontainers/go-digest" ) diff --git a/registry/storage/garbagecollect.go b/registry/storage/garbagecollect.go index 58551aff79..951df0b55d 100644 --- a/registry/storage/garbagecollect.go +++ b/registry/storage/garbagecollect.go @@ -4,10 +4,10 @@ import ( "context" "fmt" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/manifest/schema2" - "github.com/distribution/distribution/v3/reference" - "github.com/distribution/distribution/v3/registry/storage/driver" + "github.com/docker/distribution" + "github.com/docker/distribution/manifest/schema2" + "github.com/docker/distribution/reference" + "github.com/docker/distribution/registry/storage/driver" "github.com/opencontainers/go-digest" ) diff --git a/registry/storage/garbagecollect_test.go b/registry/storage/garbagecollect_test.go index bdbf9ab263..1119dec294 100644 --- a/registry/storage/garbagecollect_test.go +++ b/registry/storage/garbagecollect_test.go @@ -5,12 +5,12 @@ import ( "path" "testing" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/reference" - "github.com/distribution/distribution/v3/registry/storage/driver" - "github.com/distribution/distribution/v3/registry/storage/driver/inmemory" - "github.com/distribution/distribution/v3/testutil" + "github.com/docker/distribution" + "github.com/docker/distribution/context" + "github.com/docker/distribution/reference" + "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/inmemory" + "github.com/docker/distribution/testutil" "github.com/docker/libtrust" "github.com/opencontainers/go-digest" ) @@ -121,7 +121,7 @@ func uploadRandomSchema1Image(t *testing.T, repository distribution.Repository) digests = append(digests, digest) } - manifest, err := testutil.MakeSchema1Manifest(digests) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + manifest, err := testutil.MakeSchema1Manifest(digests) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if err != nil { t.Fatalf("%v", err) } @@ -232,12 +232,12 @@ func TestDeleteManifestIfTagNotFound(t *testing.T) { } // Construct manifests - manifest1, err := testutil.MakeSchema1Manifest(getKeys(randomLayers1)) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + manifest1, err := testutil.MakeSchema1Manifest(getKeys(randomLayers1)) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if err != nil { t.Fatalf("failed to make manifest: %v", err) } - manifest2, err := testutil.MakeSchema1Manifest(getKeys(randomLayers2)) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + manifest2, err := testutil.MakeSchema1Manifest(getKeys(randomLayers2)) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if err != nil { t.Fatalf("failed to make manifest: %v", err) } @@ -426,7 +426,7 @@ func TestDeletionWithSharedLayer(t *testing.T) { } // Construct manifests - manifest1, err := testutil.MakeSchema1Manifest(getKeys(randomLayers1)) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + manifest1, err := testutil.MakeSchema1Manifest(getKeys(randomLayers1)) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if err != nil { t.Fatalf("failed to make manifest: %v", err) } diff --git a/registry/storage/io.go b/registry/storage/io.go index a96296e551..466eea4173 100644 --- a/registry/storage/io.go +++ b/registry/storage/io.go @@ -5,7 +5,7 @@ import ( "errors" "io" - "github.com/distribution/distribution/v3/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver" ) const ( diff --git a/registry/storage/linkedblobstore.go b/registry/storage/linkedblobstore.go index 531969a290..aa807ee51c 100644 --- a/registry/storage/linkedblobstore.go +++ b/registry/storage/linkedblobstore.go @@ -8,11 +8,11 @@ import ( "path" "time" - "github.com/distribution/distribution/v3" - dcontext "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/reference" - "github.com/distribution/distribution/v3/registry/storage/driver" - "github.com/distribution/distribution/v3/uuid" + "github.com/docker/distribution" + dcontext "github.com/docker/distribution/context" + "github.com/docker/distribution/reference" + "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/uuid" "github.com/opencontainers/go-digest" ) diff --git a/registry/storage/linkedblobstore_test.go b/registry/storage/linkedblobstore_test.go index 57bb8eb776..c669b1b335 100644 --- a/registry/storage/linkedblobstore_test.go +++ b/registry/storage/linkedblobstore_test.go @@ -9,9 +9,9 @@ import ( "strconv" "testing" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/reference" - "github.com/distribution/distribution/v3/testutil" + "github.com/docker/distribution" + "github.com/docker/distribution/reference" + "github.com/docker/distribution/testutil" "github.com/opencontainers/go-digest" ) diff --git a/registry/storage/manifestlisthandler.go b/registry/storage/manifestlisthandler.go index 1fc7aac7a0..11adb9832c 100644 --- a/registry/storage/manifestlisthandler.go +++ b/registry/storage/manifestlisthandler.go @@ -4,10 +4,10 @@ import ( "context" "fmt" - "github.com/distribution/distribution/v3" - dcontext "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/manifest/manifestlist" - "github.com/distribution/distribution/v3/manifest/ocischema" + "github.com/docker/distribution" + dcontext "github.com/docker/distribution/context" + "github.com/docker/distribution/manifest/manifestlist" + "github.com/docker/distribution/manifest/ocischema" "github.com/opencontainers/go-digest" ) diff --git a/registry/storage/manifeststore.go b/registry/storage/manifeststore.go index 1d55a0801b..3a897ab197 100644 --- a/registry/storage/manifeststore.go +++ b/registry/storage/manifeststore.go @@ -5,13 +5,13 @@ import ( "encoding/json" "fmt" - "github.com/distribution/distribution/v3" - dcontext "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/manifest" - "github.com/distribution/distribution/v3/manifest/manifestlist" - "github.com/distribution/distribution/v3/manifest/ocischema" - "github.com/distribution/distribution/v3/manifest/schema1" //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. - "github.com/distribution/distribution/v3/manifest/schema2" + "github.com/docker/distribution" + dcontext "github.com/docker/distribution/context" + "github.com/docker/distribution/manifest" + "github.com/docker/distribution/manifest/manifestlist" + "github.com/docker/distribution/manifest/ocischema" + "github.com/docker/distribution/manifest/schema1" //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. + "github.com/docker/distribution/manifest/schema2" "github.com/opencontainers/go-digest" v1 "github.com/opencontainers/image-spec/specs-go/v1" ) @@ -133,7 +133,7 @@ func (ms *manifestStore) Put(ctx context.Context, manifest distribution.Manifest dcontext.GetLogger(ms.ctx).Debug("(*manifestStore).Put") switch manifest.(type) { - case *schema1.SignedManifest: //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + case *schema1.SignedManifest: //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. return ms.schema1Handler.Put(ctx, manifest, ms.skipDependencyVerification) case *schema2.DeserializedManifest: return ms.schema2Handler.Put(ctx, manifest, ms.skipDependencyVerification) diff --git a/registry/storage/manifeststore_test.go b/registry/storage/manifeststore_test.go index d40315a9fd..0479319409 100644 --- a/registry/storage/manifeststore_test.go +++ b/registry/storage/manifeststore_test.go @@ -8,15 +8,15 @@ import ( "reflect" "testing" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/manifest" - "github.com/distribution/distribution/v3/manifest/ocischema" - "github.com/distribution/distribution/v3/manifest/schema1" //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. - "github.com/distribution/distribution/v3/reference" - "github.com/distribution/distribution/v3/registry/storage/cache/memory" - "github.com/distribution/distribution/v3/registry/storage/driver" - "github.com/distribution/distribution/v3/registry/storage/driver/inmemory" - "github.com/distribution/distribution/v3/testutil" + "github.com/docker/distribution" + "github.com/docker/distribution/manifest" + "github.com/docker/distribution/manifest/ocischema" + "github.com/docker/distribution/manifest/schema1" //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. + "github.com/docker/distribution/reference" + "github.com/docker/distribution/registry/storage/cache/memory" + "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/inmemory" + "github.com/docker/distribution/testutil" "github.com/docker/libtrust" "github.com/opencontainers/go-digest" v1 "github.com/opencontainers/image-spec/specs-go/v1" @@ -79,7 +79,7 @@ func testManifestStorage(t *testing.T, schema1Enabled bool, options ...RegistryO t.Fatal(err) } - m := schema1.Manifest{ //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + m := schema1.Manifest{ //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. Versioned: manifest.Versioned{ SchemaVersion: 1, }, @@ -97,10 +97,10 @@ func testManifestStorage(t *testing.T, schema1Enabled bool, options ...RegistryO } testLayers[dgst] = rs - m.FSLayers = append(m.FSLayers, schema1.FSLayer{ //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + m.FSLayers = append(m.FSLayers, schema1.FSLayer{ //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. BlobSum: dgst, }) - m.History = append(m.History, schema1.History{ //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + m.History = append(m.History, schema1.History{ //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. V1Compatibility: "", }) @@ -111,7 +111,7 @@ func testManifestStorage(t *testing.T, schema1Enabled bool, options ...RegistryO t.Fatalf("unexpected error generating private key: %v", err) } - sm, merr := schema1.Sign(&m, pk) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + sm, merr := schema1.Sign(&m, pk) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if merr != nil { t.Fatalf("error signing manifest: %v", err) } @@ -180,7 +180,7 @@ func testManifestStorage(t *testing.T, schema1Enabled bool, options ...RegistryO t.Fatalf("unexpected error fetching manifest: %v", err) } - fetchedManifest, ok := fromStore.(*schema1.SignedManifest) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + fetchedManifest, ok := fromStore.(*schema1.SignedManifest) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if !ok { t.Fatalf("unexpected manifest type from signedstore") } @@ -189,7 +189,7 @@ func testManifestStorage(t *testing.T, schema1Enabled bool, options ...RegistryO t.Fatalf("fetched payload does not match original payload: %q != %q", fetchedManifest.Canonical, sm.Canonical) } - _, pl, err := fetchedManifest.Payload() //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + _, pl, err := fetchedManifest.Payload() //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if err != nil { t.Fatalf("error getting payload %#v", err) } @@ -222,7 +222,7 @@ func testManifestStorage(t *testing.T, schema1Enabled bool, options ...RegistryO t.Fatalf("unexpected error fetching manifest by digest: %v", err) } - byDigestManifest, ok := fetchedByDigest.(*schema1.SignedManifest) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + byDigestManifest, ok := fetchedByDigest.(*schema1.SignedManifest) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if !ok { t.Fatalf("unexpected manifest type from signedstore") } @@ -246,11 +246,11 @@ func testManifestStorage(t *testing.T, schema1Enabled bool, options ...RegistryO t.Fatalf("unexpected error generating private key: %v", err) } - sm2, err := schema1.Sign(&m, pk2) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + sm2, err := schema1.Sign(&m, pk2) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if err != nil { t.Fatalf("unexpected error signing manifest: %v", err) } - _, pl, err = sm2.Payload() //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + _, pl, err = sm2.Payload() //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if err != nil { t.Fatalf("error getting payload %#v", err) } @@ -278,16 +278,16 @@ func testManifestStorage(t *testing.T, schema1Enabled bool, options ...RegistryO t.Fatalf("unexpected error fetching manifest: %v", err) } - fetched, ok := fromStore.(*schema1.SignedManifest) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + fetched, ok := fromStore.(*schema1.SignedManifest) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if !ok { t.Fatalf("unexpected type from signed manifeststore : %T", fetched) } - if _, err := schema1.Verify(fetched); err != nil { //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + if _, err := schema1.Verify(fetched); err != nil { //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. t.Fatalf("unexpected error verifying manifest: %v", err) } - _, pl, err = fetched.Payload() //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + _, pl, err = fetched.Payload() //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if err != nil { t.Fatalf("error getting payload %#v", err) } diff --git a/registry/storage/ociindexhandler.go b/registry/storage/ociindexhandler.go index 01864f0618..9431e9774f 100644 --- a/registry/storage/ociindexhandler.go +++ b/registry/storage/ociindexhandler.go @@ -3,9 +3,9 @@ package storage import ( "context" - "github.com/distribution/distribution/v3" - dcontext "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/manifest/ocischema" + "github.com/docker/distribution" + dcontext "github.com/docker/distribution/context" + "github.com/docker/distribution/manifest/ocischema" "github.com/opencontainers/go-digest" ) diff --git a/registry/storage/ocimanifesthandler.go b/registry/storage/ocimanifesthandler.go index 97216d2a4a..24d786ac37 100644 --- a/registry/storage/ocimanifesthandler.go +++ b/registry/storage/ocimanifesthandler.go @@ -5,9 +5,9 @@ import ( "fmt" "net/url" - "github.com/distribution/distribution/v3" - dcontext "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/manifest/ocischema" + "github.com/docker/distribution" + dcontext "github.com/docker/distribution/context" + "github.com/docker/distribution/manifest/ocischema" "github.com/opencontainers/go-digest" v1 "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/registry/storage/ocimanifesthandler_test.go b/registry/storage/ocimanifesthandler_test.go index 5eab9b9f6e..a893cc195b 100644 --- a/registry/storage/ocimanifesthandler_test.go +++ b/registry/storage/ocimanifesthandler_test.go @@ -6,10 +6,10 @@ import ( "strings" "testing" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/manifest" - "github.com/distribution/distribution/v3/manifest/ocischema" - "github.com/distribution/distribution/v3/registry/storage/driver/inmemory" + "github.com/docker/distribution" + "github.com/docker/distribution/manifest" + "github.com/docker/distribution/manifest/ocischema" + "github.com/docker/distribution/registry/storage/driver/inmemory" "github.com/opencontainers/go-digest" v1 "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/registry/storage/purgeuploads.go b/registry/storage/purgeuploads.go index 0ebd80b040..c353ed71ed 100644 --- a/registry/storage/purgeuploads.go +++ b/registry/storage/purgeuploads.go @@ -6,8 +6,8 @@ import ( "strings" "time" - storageDriver "github.com/distribution/distribution/v3/registry/storage/driver" - "github.com/distribution/distribution/v3/uuid" + storageDriver "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/uuid" "github.com/sirupsen/logrus" ) diff --git a/registry/storage/purgeuploads_test.go b/registry/storage/purgeuploads_test.go index 4f66fdcead..d53b7cb6f4 100644 --- a/registry/storage/purgeuploads_test.go +++ b/registry/storage/purgeuploads_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - "github.com/distribution/distribution/v3/registry/storage/driver" - "github.com/distribution/distribution/v3/registry/storage/driver/inmemory" - "github.com/distribution/distribution/v3/uuid" + "github.com/docker/distribution/registry/storage/driver" + "github.com/docker/distribution/registry/storage/driver/inmemory" + "github.com/docker/distribution/uuid" ) func testUploadFS(t *testing.T, numUploads int, repoName string, startedAt time.Time) (driver.StorageDriver, context.Context) { diff --git a/registry/storage/registry.go b/registry/storage/registry.go index 7bf2448783..4990e30505 100644 --- a/registry/storage/registry.go +++ b/registry/storage/registry.go @@ -4,10 +4,10 @@ import ( "context" "regexp" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/reference" - "github.com/distribution/distribution/v3/registry/storage/cache" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" + "github.com/docker/distribution" + "github.com/docker/distribution/reference" + "github.com/docker/distribution/registry/storage/cache" + storagedriver "github.com/docker/distribution/registry/storage/driver" "github.com/docker/libtrust" ) diff --git a/registry/storage/schema2manifesthandler.go b/registry/storage/schema2manifesthandler.go index 7716289acd..d5501b9c3c 100644 --- a/registry/storage/schema2manifesthandler.go +++ b/registry/storage/schema2manifesthandler.go @@ -6,10 +6,10 @@ import ( "fmt" "net/url" - "github.com/distribution/distribution/v3" - dcontext "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/manifest/schema1" //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. - "github.com/distribution/distribution/v3/manifest/schema2" + "github.com/docker/distribution" + dcontext "github.com/docker/distribution/context" + "github.com/docker/distribution/manifest/schema1" //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. + "github.com/docker/distribution/manifest/schema2" "github.com/opencontainers/go-digest" ) @@ -110,7 +110,7 @@ func (ms *schema2ManifestHandler) verifyManifest(ctx context.Context, mnfst sche break } } - case schema2.MediaTypeManifest, schema1.MediaTypeManifest: //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + case schema2.MediaTypeManifest, schema1.MediaTypeManifest: //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. var exists bool exists, err = manifestService.Exists(ctx, descriptor.Digest) if err != nil || !exists { diff --git a/registry/storage/schema2manifesthandler_test.go b/registry/storage/schema2manifesthandler_test.go index 908f8c137a..af040c3f69 100644 --- a/registry/storage/schema2manifesthandler_test.go +++ b/registry/storage/schema2manifesthandler_test.go @@ -5,11 +5,11 @@ import ( "strings" "testing" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/manifest" - "github.com/distribution/distribution/v3/manifest/schema2" - "github.com/distribution/distribution/v3/registry/storage/driver/inmemory" + "github.com/docker/distribution" + "github.com/docker/distribution/context" + "github.com/docker/distribution/manifest" + "github.com/docker/distribution/manifest/schema2" + "github.com/docker/distribution/registry/storage/driver/inmemory" "github.com/opencontainers/go-digest" ) diff --git a/registry/storage/signedmanifesthandler.go b/registry/storage/signedmanifesthandler.go index edb32e07e3..07332e2559 100644 --- a/registry/storage/signedmanifesthandler.go +++ b/registry/storage/signedmanifesthandler.go @@ -5,10 +5,10 @@ import ( "encoding/json" "fmt" - "github.com/distribution/distribution/v3" - dcontext "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/manifest/schema1" //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. - "github.com/distribution/distribution/v3/reference" + "github.com/docker/distribution" + dcontext "github.com/docker/distribution/context" + "github.com/docker/distribution/manifest/schema1" //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. + "github.com/docker/distribution/reference" "github.com/docker/libtrust" "github.com/opencontainers/go-digest" ) @@ -49,7 +49,7 @@ func (ms *signedManifestHandler) Unmarshal(ctx context.Context, dgst digest.Dige return nil, err } - var sm schema1.SignedManifest //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + var sm schema1.SignedManifest //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if err := json.Unmarshal(raw, &sm); err != nil { return nil, err } @@ -59,7 +59,7 @@ func (ms *signedManifestHandler) Unmarshal(ctx context.Context, dgst digest.Dige func (ms *signedManifestHandler) Put(ctx context.Context, manifest distribution.Manifest, skipDependencyVerification bool) (digest.Digest, error) { dcontext.GetLogger(ms.ctx).Debug("(*signedManifestHandler).Put") - sm, ok := manifest.(*schema1.SignedManifest) //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + sm, ok := manifest.(*schema1.SignedManifest) //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. if !ok { return "", fmt.Errorf("non-schema1 manifest put to signedManifestHandler: %T", manifest) } @@ -68,7 +68,7 @@ func (ms *signedManifestHandler) Put(ctx context.Context, manifest distribution. return "", err } - mt := schema1.MediaTypeManifest //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + mt := schema1.MediaTypeManifest //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. payload := sm.Canonical revision, err := ms.blobStore.Put(ctx, mt, payload) @@ -84,7 +84,7 @@ func (ms *signedManifestHandler) Put(ctx context.Context, manifest distribution. // perspective of the registry. It ensures that the signature is valid for the // enclosed payload. As a policy, the registry only tries to store valid // content, leaving trust policies of that content up to consumers. -func (ms *signedManifestHandler) verifyManifest(ctx context.Context, mnfst schema1.SignedManifest, skipDependencyVerification bool) error { //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. +func (ms *signedManifestHandler) verifyManifest(ctx context.Context, mnfst schema1.SignedManifest, skipDependencyVerification bool) error { //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. var errs distribution.ErrManifestVerification if len(mnfst.Name) > reference.NameTotalLengthMax { @@ -108,7 +108,7 @@ func (ms *signedManifestHandler) verifyManifest(ctx context.Context, mnfst schem len(mnfst.History), len(mnfst.FSLayers))) } - if _, err := schema1.Verify(&mnfst); err != nil { //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + if _, err := schema1.Verify(&mnfst); err != nil { //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. switch err { case libtrust.ErrMissingSignatureKey, libtrust.ErrInvalidJSONContent, libtrust.ErrMissingSignatureKey: errs = append(errs, distribution.ErrManifestUnverified{}) @@ -122,7 +122,7 @@ func (ms *signedManifestHandler) verifyManifest(ctx context.Context, mnfst schem } if !skipDependencyVerification { - for _, fsLayer := range mnfst.References() { //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. + for _, fsLayer := range mnfst.References() { //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. _, err := ms.repository.Blobs(ctx).Stat(ctx, fsLayer.Digest) if err != nil { if err != distribution.ErrBlobUnknown { diff --git a/registry/storage/tagstore.go b/registry/storage/tagstore.go index bf6541f938..c0b64766d9 100644 --- a/registry/storage/tagstore.go +++ b/registry/storage/tagstore.go @@ -5,8 +5,8 @@ import ( "path" "sort" - "github.com/distribution/distribution/v3" - storagedriver "github.com/distribution/distribution/v3/registry/storage/driver" + "github.com/docker/distribution" + storagedriver "github.com/docker/distribution/registry/storage/driver" "github.com/opencontainers/go-digest" ) diff --git a/registry/storage/tagstore_test.go b/registry/storage/tagstore_test.go index 650416c10d..918ce177d2 100644 --- a/registry/storage/tagstore_test.go +++ b/registry/storage/tagstore_test.go @@ -5,11 +5,11 @@ import ( "reflect" "testing" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/manifest" - "github.com/distribution/distribution/v3/manifest/schema2" - "github.com/distribution/distribution/v3/reference" - "github.com/distribution/distribution/v3/registry/storage/driver/inmemory" + "github.com/docker/distribution" + "github.com/docker/distribution/manifest" + "github.com/docker/distribution/manifest/schema2" + "github.com/docker/distribution/reference" + "github.com/docker/distribution/registry/storage/driver/inmemory" digest "github.com/opencontainers/go-digest" ) diff --git a/registry/storage/v1unsupportedhandler.go b/registry/storage/v1unsupportedhandler.go index d6ed95fe99..677c7137c2 100644 --- a/registry/storage/v1unsupportedhandler.go +++ b/registry/storage/v1unsupportedhandler.go @@ -3,7 +3,7 @@ package storage import ( "context" - "github.com/distribution/distribution/v3" + "github.com/docker/distribution" digest "github.com/opencontainers/go-digest" ) diff --git a/registry/storage/vacuum.go b/registry/storage/vacuum.go index 3cf74a4786..74e581a2d4 100644 --- a/registry/storage/vacuum.go +++ b/registry/storage/vacuum.go @@ -4,8 +4,8 @@ import ( "context" "path" - dcontext "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/registry/storage/driver" + dcontext "github.com/docker/distribution/context" + "github.com/docker/distribution/registry/storage/driver" "github.com/opencontainers/go-digest" ) diff --git a/testutil/manifests.go b/testutil/manifests.go index 3a6a333b55..2fb8636a79 100644 --- a/testutil/manifests.go +++ b/testutil/manifests.go @@ -3,12 +3,12 @@ package testutil import ( "fmt" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/context" - "github.com/distribution/distribution/v3/manifest" - "github.com/distribution/distribution/v3/manifest/manifestlist" - "github.com/distribution/distribution/v3/manifest/schema1" //nolint:staticcheck // Ignore SA1019: "github.com/distribution/distribution/v3/manifest/schema1" is deprecated, as it's used for backward compatibility. - "github.com/distribution/distribution/v3/manifest/schema2" + "github.com/docker/distribution" + "github.com/docker/distribution/context" + "github.com/docker/distribution/manifest" + "github.com/docker/distribution/manifest/manifestlist" + "github.com/docker/distribution/manifest/schema1" //nolint:staticcheck // Ignore SA1019: "github.com/docker/distribution/manifest/schema1" is deprecated, as it's used for backward compatibility. + "github.com/docker/distribution/manifest/schema2" "github.com/docker/libtrust" "github.com/opencontainers/go-digest" ) diff --git a/testutil/push.go b/testutil/push.go index 17f2230e18..f7931768d7 100644 --- a/testutil/push.go +++ b/testutil/push.go @@ -5,7 +5,7 @@ import ( "fmt" "io" - "github.com/distribution/distribution/v3" + "github.com/docker/distribution" "github.com/opencontainers/go-digest" ) diff --git a/testutil/tarfile.go b/testutil/tarfile.go index e0782b7333..0bc5c8f941 100644 --- a/testutil/tarfile.go +++ b/testutil/tarfile.go @@ -8,8 +8,8 @@ import ( mrand "math/rand" "time" - "github.com/distribution/distribution/v3" - "github.com/distribution/distribution/v3/context" + "github.com/docker/distribution" + "github.com/docker/distribution/context" "github.com/opencontainers/go-digest" ) diff --git a/version/version.go b/version/version.go index 43c8690025..b21def4bc4 100644 --- a/version/version.go +++ b/version/version.go @@ -2,7 +2,7 @@ package version // Package is the overall, canonical project import path under which the // package was built. -var Package = "github.com/distribution/distribution/v3" +var Package = "github.com/docker/distribution" // Version indicates which version of the binary is running. This is set to // the latest release tag by hand, always suffixed by "+unknown". During