Skip to content

Commit c496cf0

Browse files
authored
Upgrade github.com/docker/cli to v20.10.12 (#894)
* Upgrade github.com/docker/cli to v20.10.12 Signed-off-by: Jan Boehm <[email protected]> * Synchronize docker config loading This prevents data races during testing. The root cause are unsecured globals in the docker cli lib. Signed-off-by: Jan Boehm <[email protected]> * Mention upstream issue that fixes the data race Signed-off-by: Jan Boehm <[email protected]>
1 parent 5566e4b commit c496cf0

File tree

8 files changed

+146
-41
lines changed

8 files changed

+146
-41
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/containerd/containerd v1.4.11
1212
github.com/containerd/continuity v0.0.0-20200413184840-d3ef23f19fbb // indirect
1313
github.com/containerd/ttrpc v1.0.1 // indirect
14-
github.com/docker/cli v0.0.0-20200130152716-5d0cf8839492
14+
github.com/docker/cli v20.10.12+incompatible
1515
github.com/docker/distribution v2.7.1+incompatible
1616
github.com/docker/docker v1.4.2-0.20200203170920-46ec8731fbce
1717
github.com/docker/docker-credential-helpers v0.6.3 // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm
208208
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
209209
github.com/dhui/dktest v0.3.0/go.mod h1:cyzIUfGsBEbZ6BT7tnXqAShHSXCZhSNmFl70sZ7c1yc=
210210
github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
211-
github.com/docker/cli v0.0.0-20200130152716-5d0cf8839492 h1:FwssHbCDJD025h+BchanCwE1Q8fyMgqDr2mOQAWOLGw=
212-
github.com/docker/cli v0.0.0-20200130152716-5d0cf8839492/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
211+
github.com/docker/cli v20.10.12+incompatible h1:lZlz0uzG+GH+c0plStMUdF/qk3ppmgnswpR5EbqzVGA=
212+
github.com/docker/cli v20.10.12+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
213213
github.com/docker/distribution v0.0.0-20191216044856-a8371794149d h1:jC8tT/S0OGx2cswpeUTn4gOIea8P08lD3VFQT0cOZ50=
214214
github.com/docker/distribution v0.0.0-20191216044856-a8371794149d/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY=
215215
github.com/docker/docker v0.7.3-0.20190103212154-2b7e084dc98b/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=

pkg/image/containerdregistry/resolver.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"net/http"
88
"os"
99
"path/filepath"
10+
"sync"
1011
"time"
1112

1213
"github.com/adrg/xdg"
@@ -88,7 +89,15 @@ func credential(cfg *configfile.ConfigFile) func(string) (string, string, error)
8889
}
8990
}
9091

92+
// protects against a data race inside the docker CLI
93+
// TODO: upstream issue for 20.10.x is tracked here https://github.com/docker/cli/pull/3410
94+
// newer versions already contain the fix
95+
var configMutex sync.Mutex
96+
9197
func loadConfig(dir string) (*configfile.ConfigFile, error) {
98+
configMutex.Lock()
99+
defer configMutex.Unlock()
100+
92101
if dir == "" {
93102
dir = config.Dir()
94103
}

vendor/github.com/docker/cli/AUTHORS

Lines changed: 53 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)