integration-cli: debug TestPushToCentralRegistryUnauthorized#45415
Conversation
|
Looks indeed related to a change that was rolled out to Docker Hub, which returns a different error that's not detected as "do not retry"; |
|
I'm not able to reproduce locally (on Linux); Also tried authenticating (but not a user that has access to that org); The change that was rolled out on Docker hub returns a Lines 152 to 186 in 79dd264 |
|
Okay; reproduced The issue is that;
To reproduce;
docker pull busybox
docker tag busybox test/busybox
docker push test/busybox
The push refers to repository [docker.io/test/busybox]
416052d13ad7: Retrying in 1 second
unknown: requesting higher privileges than access token allows And now the daemon will continue retrying to push (until the retry-limit is reached) |
|
Not sure where the |
|
We could probably add some debugging code to see what exactly happens, and why it doesn't use the HTTP status in this case. Some thoughts;
^^ if it's converted to a "registry error"; looking at the switch in |
|
The request that fails is the GET to The error doesn't follow the registry error format: but is and code which parses it doesn't handle 403 explicitly as a non-unknown error: Client side fix: distribution/distribution#3881 |
254a808 to
ec63a54
Compare
7c29cdf to
c2885d1
Compare
Seeing some test-failures, which could be due to changes on Docker Hub
=== Failed
=== FAIL: github.com/docker/docker/integration-cli TestDockerCLIPushSuite/TestPushToCentralRegistryUnauthorized (51.08s)
docker_cli_push_test.go:229: assertion failed: strings.Contains(out, "Retrying") is true
=== FAIL: github.com/docker/docker/integration-cli TestDockerCLIPushSuite (101.49s)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
c2885d1 to
8dbe0f4
Compare

Seeing some test-failures, which could be due to changes on Docker Hub
- What I did
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)