Skip to content

Commit 4923470

Browse files
committed
replace reference/docker for github.com/distribution/reference v0.5.0
The reference/docker package was a fork of github.com/distribution/distribution, which could not easily be used as a direct dependency, as it brought many other dependencies with it. The "reference' package has now moved to a separate repository, which means we can replace the local fork, and use the upstream implementation again. The new module was extracted from the distribution repository at commit: distribution/distribution@b9b1940 Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent f9608c0 commit 4923470

44 files changed

Lines changed: 1241 additions & 2438 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ require (
2525
github.com/containernetworking/plugins v1.3.0
2626
github.com/coreos/go-systemd/v22 v22.5.0
2727
github.com/davecgh/go-spew v1.1.1
28+
github.com/distribution/reference v0.5.0
2829
github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c
2930
github.com/docker/go-metrics v0.0.1
3031
github.com/docker/go-units v0.5.0

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,8 @@ github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8l
355355
github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
356356
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
357357
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
358+
github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0=
359+
github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
358360
github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
359361
github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
360362
github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY=

images/archive/reference.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"strings"
2222

2323
"github.com/containerd/containerd/reference"
24-
distref "github.com/containerd/containerd/reference/docker"
24+
distref "github.com/distribution/reference"
2525
"github.com/opencontainers/go-digest"
2626
)
2727

integration/client/go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ require (
3131
github.com/containerd/fifo v1.1.0 // indirect
3232
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
3333
github.com/davecgh/go-spew v1.1.1 // indirect
34+
github.com/distribution/reference v0.5.0 // indirect
3435
github.com/docker/go-units v0.5.0 // indirect
3536
github.com/fsnotify/fsnotify v1.6.0 // indirect
3637
github.com/go-logr/logr v1.2.4 // indirect

integration/client/go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,8 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUn
961961
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
962962
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
963963
github.com/distribution/distribution/v3 v3.0.0-20220526142353-ffbd94cbe269/go.mod h1:28YO/VJk9/64+sTGNuYaBjWxrXTPrj0C0XmgTIOjxX4=
964+
github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0=
965+
github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
964966
github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
965967
github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
966968
github.com/docker/cli v20.10.17+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=

pkg/cri/sbserver/images/image_pull.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ import (
4747
criconfig "github.com/containerd/containerd/pkg/cri/config"
4848
crilabels "github.com/containerd/containerd/pkg/cri/labels"
4949
snpkg "github.com/containerd/containerd/pkg/snapshotters"
50-
distribution "github.com/containerd/containerd/reference/docker"
5150
"github.com/containerd/containerd/remotes/docker"
5251
"github.com/containerd/containerd/remotes/docker/config"
5352
"github.com/containerd/containerd/tracing"
53+
distribution "github.com/distribution/reference"
5454
)
5555

5656
// For image management:

pkg/cri/sbserver/images/image_pull_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"fmt"
2323
"testing"
2424

25-
"github.com/containerd/containerd/reference/docker"
25+
docker "github.com/distribution/reference"
2626
"github.com/opencontainers/go-digest"
2727
"github.com/stretchr/testify/assert"
2828
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"

pkg/cri/sbserver/images/image_status.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ import (
2626
"github.com/containerd/containerd/errdefs"
2727
"github.com/containerd/containerd/log"
2828
imagestore "github.com/containerd/containerd/pkg/cri/store/image"
29-
"github.com/containerd/containerd/reference/docker"
3029
"github.com/containerd/containerd/tracing"
30+
docker "github.com/distribution/reference"
3131

3232
imagespec "github.com/opencontainers/image-spec/specs-go/v1"
3333
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"

pkg/cri/sbserver/images/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
imagestore "github.com/containerd/containerd/pkg/cri/store/image"
2828
snapshotstore "github.com/containerd/containerd/pkg/cri/store/snapshot"
2929
"github.com/containerd/containerd/pkg/kmutex"
30-
"github.com/containerd/containerd/reference/docker"
30+
docker "github.com/distribution/reference"
3131
imagedigest "github.com/opencontainers/go-digest"
3232
"github.com/sirupsen/logrus"
3333
)

pkg/cri/sbserver/podsandbox/helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
criconfig "github.com/containerd/containerd/pkg/cri/config"
3232
imagestore "github.com/containerd/containerd/pkg/cri/store/image"
3333
ctrdutil "github.com/containerd/containerd/pkg/cri/util"
34-
"github.com/containerd/containerd/reference/docker"
34+
docker "github.com/distribution/reference"
3535
runtimespec "github.com/opencontainers/runtime-spec/specs-go"
3636
"github.com/sirupsen/logrus"
3737

0 commit comments

Comments
 (0)