Skip to content

Migrate from docker/distribution to distribution/distribution #2118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/krane/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ require (
github.com/aws/smithy-go v1.22.3 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.16.3 // indirect
github.com/dimchansky/utfbom v1.1.1 // indirect
github.com/distribution/distribution v2.8.3+incompatible // indirect
github.com/docker/cli v28.2.2+incompatible // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker-credential-helpers v0.9.3 // indirect
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
github.com/google/go-cmp v0.7.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions cmd/krane/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ go 1.24

require (
github.com/containerd/stargz-snapshotter/estargz v0.16.3
github.com/distribution/distribution v2.8.3+incompatible
github.com/docker/cli v28.2.2+incompatible
github.com/docker/distribution v2.8.3+incompatible
github.com/docker/docker v28.2.2+incompatible
github.com/google/go-cmp v0.7.0
github.com/klauspost/compress v1.18.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/authn/k8schain/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ require (
github.com/containerd/stargz-snapshotter/estargz v0.16.3 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dimchansky/utfbom v1.1.1 // indirect
github.com/distribution/distribution v2.8.3+incompatible // indirect
github.com/docker/cli v28.2.2+incompatible // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker-credential-helpers v0.9.3 // indirect
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
github.com/fxamacker/cbor/v2 v2.8.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions pkg/authn/k8schain/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/name/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
)

const (
// TODO(dekkagaijin): use the docker/distribution regexes for validation.
// TODO(dekkagaijin): use the distribution/distribution regexes for validation.
tagChars = "abcdefghijklmnopqrstuvwxyz0123456789_-.ABCDEFGHIJKLMNOPQRSTUVWXYZ"
tagDelim = ":"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/v1/remote/transport/bearer.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"strings"
"sync"

authchallenge "github.com/docker/distribution/registry/client/auth/challenge"
authchallenge "github.com/distribution/distribution/registry/client/auth/challenge"

"github.com/google/go-containerregistry/internal/redact"
"github.com/google/go-containerregistry/pkg/authn"
Expand Down
8 changes: 4 additions & 4 deletions pkg/v1/remote/transport/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
)

// Error implements error to support the following error specification:
// https://github.com/docker/distribution/blob/master/docs/spec/api.md#errors
// https://github.com/distribution/distribution/blob/main/docs/content/spec/api.md#errors
type Error struct {
Errors []Diagnostic `json:"errors,omitempty"`
// The http status code returned.
Expand Down Expand Up @@ -111,7 +111,7 @@ func (d Diagnostic) String() string {
type ErrorCode string

// The set of error conditions a registry may return:
// https://github.com/docker/distribution/blob/master/docs/spec/api.md#errors-2
// https://github.com/distribution/distribution/blob/main/docs/content/spec/api.md#errors-2
const (
BlobUnknownErrorCode ErrorCode = "BLOB_UNKNOWN"
BlobUploadInvalidErrorCode ErrorCode = "BLOB_UPLOAD_INVALID"
Expand All @@ -131,7 +131,7 @@ const (
TooManyRequestsErrorCode ErrorCode = "TOOMANYREQUESTS"
UnknownErrorCode ErrorCode = "UNKNOWN"

// This isn't defined by either docker or OCI spec, but is defined by docker/distribution:
// This isn't defined by either docker or OCI spec, but is defined by distribution/distribution:
// https://github.com/distribution/distribution/blob/6a977a5a754baa213041443f841705888107362a/registry/api/errcode/register.go#L60
UnavailableErrorCode ErrorCode = "UNAVAILABLE"
)
Expand Down Expand Up @@ -170,7 +170,7 @@ func CheckError(resp *http.Response, codes ...int) error {
}

func makeError(resp *http.Response, body []byte) *Error {
// https://github.com/docker/distribution/blob/master/docs/spec/api.md#errors
// https://github.com/distribution/distribution/blob/main/docs/content/spec/api.md#errors
structuredError := &Error{}

// This can fail if e.g. the response body is not valid JSON. That's fine,
Expand Down
2 changes: 1 addition & 1 deletion pkg/v1/remote/transport/ping.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"strings"
"time"

authchallenge "github.com/docker/distribution/registry/client/auth/challenge"
authchallenge "github.com/distribution/distribution/registry/client/auth/challenge"
"github.com/google/go-containerregistry/pkg/logs"
"github.com/google/go-containerregistry/pkg/name"
)
Expand Down
4 changes: 3 additions & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ github.com/containerd/stargz-snapshotter/estargz/errorutil
# github.com/cpuguy83/go-md2man/v2 v2.0.7
## explicit; go 1.12
github.com/cpuguy83/go-md2man/v2/md2man
# github.com/distribution/distribution v2.8.3+incompatible
## explicit
github.com/distribution/distribution/registry/client/auth/challenge
# github.com/distribution/reference v0.6.0
## explicit; go 1.20
github.com/distribution/reference
Expand All @@ -35,7 +38,6 @@ github.com/docker/cli/cli/config/credentials
github.com/docker/cli/cli/config/types
# github.com/docker/distribution v2.8.3+incompatible
## explicit
github.com/docker/distribution/registry/client/auth/challenge
# github.com/docker/docker v28.2.2+incompatible
## explicit
github.com/docker/docker/api
Expand Down