-
-
Notifications
You must be signed in to change notification settings - Fork 523
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
[Bug]: ReaperImage
pull doesn't use RegistryCred
for ContainerRequest
#645
Comments
ReaperImage
pull doesn't use RegistryCred
for ContainerRequest
@mdelapenya Looks like the reaper image pull process doesn't return an error if it can't pull the image from a container registry. Disabling it, and attempting to pulling a valid docker image with invalid credentials results in an error
There is no panic/error returned on an unsuccessful ReaperImage pull. That's just a side effect of the bigger problem which is that the reaper image pull doesn't use the provided |
HI @cyberbeast I have to admit that the public API exposing the reaper image at the container request level is something we must deprecate. At we explain in #549, this should be done just once, per test execution. In the meantime, we have to deal with the current implementation and indeed, it's possible to define a custom reaper image per container. I'm currently working on a fix, which adds a functional option to pass the registry credential to the |
Hi @mdelapenya, thanks for taking a look at this. Appreciate the input on this. Yes, I think that the reaper feature could utilize a lifecycle that looks similar to the process of launching regular containers. That being said though, additionally I think we could also add better error handling around what happens if the reaper is unable to start up. From a user's point of view, maybe a user might want to continue running their tests (and the test-container spins up) or maybe a user wants execution to panic and/or halt if the reaper can't start up. Currently, if the reaper is unable to spin up (in my case it's because the location of my |
Indeed. At the same time the reaper abstraction is an opinionated way in the Testcontainers ecosystem to remove resources created by them. In our docs we advice against disabling it i.e., and at the same time we should include a warning on replacing our reaper. From that, I'd like to ask you about the motivation of having a custom reaper in a private registry. Is it doing different tasks than the public one? |
@mdelapenya So in my use case I am not using a custom reaper. I am using the standard
|
Testcontainers version
0.16.0
Using the latest Testcontainers version?
Yes
Host OS
Macos
Host arch
x86
Go version
1.19
Docker version
Docker info
What happened?
I am using a private repository hosted on AWS ECR. I have the reaper image available in this private repository. I use the
aws-sdk-go-v2
to obtain theRegistryCred
which I pass to mytestcontainers.ContainerRequest{}
struct that I use to spin up a test container.If I specify the reaper image in the
ReaperImage
field, I get the following error when starting upimplying that the
RegistryCred
is not being used for pulling the reaper image.I've verified that my
RegistryCred
is okay because if I specify the same image...ryuk:0.3.4
in theImage
field,testcontainers
is able to pull the image correctly using the appropriate credentials, thus suggesting that theRegistryCred
is being used forImage
pulls but not forReaperImage
pulls.Relevant log output
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: