-
-
Notifications
You must be signed in to change notification settings - Fork 512
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
[Regression]: no basic auth credentials when attempting to pull ryuk image #2892
Comments
It shouldn't be, I'm curious why it's trying to use a custom repo for the ryuk image. Could you share a reproduction test? |
Oh, sorry for not mentioning it, but that's expected, because of this CI variable:
For the reproduction test… I will try to have a look at that at some point, but since this is not an open source project, I suspect I will have a hard time with that. When running my test suite with EDIT: That worked. Let us keep this open I guess. That being said, I do not reproduce it locally, even when using the private repository. From all this I think it's fair to say:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Finished the bisection, it points to 6a947dc That commit touches
That sounds like it could be it. |
Thanks for doing that, a super basic test would be great. I suspect all it will need is a custom registry, no product specifics. |
Could you also see if you get any messages in the log file? Maybe |
Sorry, what log file? The log I get is already in my original message. |
If you can run it under the debugger, setting a breakpoint at the top of |
The line in the original report looks like a require error from a test. If you run the test in verbose mode it will enable logging which I suspect might add some additional context. |
I'm wondering if the registry you're using requires auth, even for ryuk and for some reason its not getting it. |
Yes, the registry I'm using requires auth. |
The code has this comment:
Your commit starts with
Is the "file" you are talking about |
If the call here fails https://github.com/testcontainers/testcontainers-go/blob/main/docker.go#L1390 it will log. |
The intent is it will just allow us to try the action even if the config file doesn't exist, just no auth will be provided, instead of hard failing. |
Looks like I'm already using verbose mode: |
If the call here fails, we won't get to the point where we attempt do perform a HEAD request though, right? |
yer it will, if you look it falls through no matter what. |
I'm trying to troubleshoot this further, and I added - env
- cat ~/.docker/config.json after the line where I perform a I see that I have I see that I also have what appears to be a valid {
"auths": {
"redacted.dkr.ecr.eu-west-3.amazonaws.com": {
"auth": "redacted"
}
}
} I do not reproduce the issue locally with |
I am tired, it's the wrong variable name. With Also, looking at other repositories in my company, it looks like people using testcontainers often unset this variable, without explaining why 🤦 |
Unsetting the variable worked. Sorry for wasting your time. |
Testcontainers version
0.34.0
Using the latest Testcontainers version?
Yes
Host OS
Linux
Host arch
arm
Go version
1.23
Docker version
Client: Docker Engine - Community Version: 27.3.1 API version: 1.44 (downgraded from 1.47) Go version: go1.22.7 Git commit: ce12230 Built: Fri Sep 20 11:41:19 2024 OS/Arch: linux/arm64 Context: default Server: Docker Engine - Community Engine: Version: 25.0.0 API version: 1.44 (minimum version 1.24) Go version: go1.21.6 Git commit: 615dfdf Built: Thu Jan 18 17:10:09 2024 OS/Arch: linux/arm64 Experimental: false containerd: Version: 1.6.27 GitCommit: a1496014c916f9e62104b33d1bb5bd03b0858e59 runc: Version: 1.1.11 GitCommit: v1.1.11-0-g4bccb38 docker-init: Version: 0.19.0 GitCommit: de40ad0
Docker info
What happened?
The test fails with an authentication error. It happens in a pipeline for a commit that only upgrades the
testcontainers-go
versionRelevant log output
postgresql_query_repository_test.go:145: generic container: create container: reaper: new reaper: run container: Error response from daemon: Head "https://redacted.dkr.ecr.eu-west-3.amazonaws.com/v2/public/testcontainers/ryuk/manifests/0.10.2": no basic auth credentials
Additional information
This runs before and prints
Login succeeded
:aws ecr get-login-password --region ${AWS_REGION} | docker login --username AWS --password-stdin ${DOCKER_REGISTRY}
The text was updated successfully, but these errors were encountered: