Skip to content
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

Testcontainers downloads too much images #3310

Closed
iNikem opened this issue Oct 7, 2020 · 4 comments · Fixed by #3313
Closed

Testcontainers downloads too much images #3310

iNikem opened this issue Oct 7, 2020 · 4 comments · Fixed by #3313

Comments

@iNikem
Copy link
Contributor

iNikem commented Oct 7, 2020

I have the following code in my Spock test:

  def setupSpec() {
    collector = new GenericContainer<>("otel/opentelemetry-collector-dev")
      .dependsOn(backend)
      .withNetwork(network)
      .withNetworkAliases("collector")
      .withLogConsumer(new Slf4jLogConsumer(logger))
      .withCopyFileToContainer(MountableFile.forClasspathResource("/otel.yaml"), "/etc/otel.yaml")
      .withCommand("--config /etc/otel.yaml")
    collector.start()
  }

It used to work fine. Recently I upgraded testcontainers to version 1.15.0-rc2 and my GitHub action started to fail. It turns out that test has download ALL versions of otel/opentelemetry-collector-dev that are available. All 200+ of them.

I am able to reproduce this issue locally as well. I removed all local otel/opentelemetry-collector-dev images, ran the test and I already have 60 versions of them :) And test is still running.

@bsideup
Copy link
Member

bsideup commented Oct 7, 2020

@iNikem could you please share which version you used before 1.15.0-rc2? Perhaps you can find out which version introduced this (obviously faulty) behaviour?

@iNikem
Copy link
Contributor Author

iNikem commented Oct 7, 2020

1.14.3

@bsideup bsideup added this to the next milestone Oct 7, 2020
@rnorth
Copy link
Member

rnorth commented Oct 7, 2020

Ouch, sorry for this. I think I know what this is likely to be caused by, and will look into it ASAP.

As a workaround, if you want the latest image, please could you explicitly include :latest in the image name?

@iNikem
Copy link
Contributor Author

iNikem commented Oct 8, 2020

As a workaround, if you want the latest image, please could you explicitly include :latest in the image name?

Yes, it works nicely when adding :latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants