Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-8778

Debezium[MySql|MariaDB]ConnectorResourceIT user wrong argument when building connect image

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 3.1.0.CR1
    • 3.1.0.Beta1
    • test-infrastructure
    • None
    • False
    • None
    • False

      Debezium[MySql|MariaDB]ConnectorResourceIT fail with

      2025-03-12 10:08:30,015 ERROR  ||||  COPY failed: file not found in build context or excluded by .dockerignore: stat debezium-connector-mysql-3.1.0-SNAPSHOT-plugin.tar.gz: file does not exist   [tc.quay.io/debezium/connect-rest-test:3.0.8.Final-redhat-00003]
      

      in

      java.lang.IllegalStateException: java.util.concurrent.ExecutionException: org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageName=<resolving>, imagePullPolicy=DefaultPullPolicy(), imageNameSubstitutor=org.testcontainers.utility.ImageNameSubstitutor$LogWrappedImageNameSubstitutor@2d3c1668)
              at io.debezium.testing.testcontainers.util.MoreStartables.deepStartSync(MoreStartables.java:35)
              at io.debezium.testing.testcontainers.testhelper.TestInfrastructureHelper.startContainers(TestInfrastructureHelper.java:175)
              at io.debezium.connector.mysql.rest.DebeziumMySqlConnectorResourceIT.start(DebeziumMySqlConnectorResourceIT.java:45)
              at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
              at java.base/java.lang.reflect.Method.invoke(Method.java:580)
              at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
              at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
              at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:61)
              at org.junit.internal.runners.statements.RunBefores.invokeMethod(RunBefores.java:33)
              at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
              at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
              at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
              at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
              at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
              at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
              at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
              at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
              at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
              at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
              at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
              at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
              at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
              at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
              at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
              at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:316)
              at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:240)
              at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:214)
              at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:155)
              at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
              at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
              at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
              at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
      Caused by: java.util.concurrent.ExecutionException: org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageName=<resolving>, imagePullPolicy=DefaultPullPolicy(), imageNameSubstitutor=org.testcontainers.utility.ImageNameSubstitutor$LogWrappedImageNameSubstitutor@2d3c1668)
              at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
              at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)
              at io.debezium.testing.testcontainers.util.MoreStartables.deepStartSync(MoreStartables.java:32)
              ... 31 more
      Caused by: org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageName=<resolving>, imagePullPolicy=DefaultPullPolicy(), imageNameSubstitutor=org.testcontainers.utility.ImageNameSubstitutor$LogWrappedImageNameSubstitutor@2d3c1668)
              at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:1421)
              at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:359)
              at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:334)
              at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:787)
              at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
              at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
              at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
              at java.base/java.lang.Thread.run(Thread.java:1583)
      Caused by: com.github.dockerjava.api.exception.DockerClientException: Could not build image: COPY failed: file not found in build context or excluded by .dockerignore: stat debezium-connector-mysql-3.1.0-SNAPSHOT-plugin.tar.gz: file does not exist
              at com.github.dockerjava.api.command.BuildImageResultCallback.getImageId(BuildImageResultCallback.java:78)
              at com.github.dockerjava.api.command.BuildImageResultCallback.awaitImageId(BuildImageResultCallback.java:50)
              at org.testcontainers.images.builder.ImageFromDockerfile.resolve(ImageFromDockerfile.java:159)
              at org.testcontainers.images.builder.ImageFromDockerfile.resolve(ImageFromDockerfile.java:40)
              at org.testcontainers.utility.LazyFuture.getResolvedValue(LazyFuture.java:19)
              at org.testcontainers.utility.LazyFuture.get(LazyFuture.java:41)
              at org.testcontainers.shaded.com.google.common.util.concurrent.Futures$1.get(Futures.java:536)
              at org.testcontainers.images.RemoteDockerImage.getImageName(RemoteDockerImage.java:130)
              at org.testcontainers.images.RemoteDockerImage.resolve(RemoteDockerImage.java:67)
              at org.testcontainers.images.RemoteDockerImage.resolve(RemoteDockerImage.java:28)
              at org.testcontainers.utility.LazyFuture.getResolvedValue(LazyFuture.java:19)
              at org.testcontainers.utility.LazyFuture.get(LazyFuture.java:41)
              at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:1419)
              ... 7 more
      

      We pass correct value to DEBEZIUM_VERSION build argument (3.0.8.Final-redhat-00003 in this case), but it's not used in the dockerfile, probably because it's overwritten in the base image to different value (3.1.0-SNAPSHOT in this case).

              vjuranek@redhat.com Vojtech Juranek
              vjuranek@redhat.com Vojtech Juranek
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: