Skip to content

HIVE-29349: upgrade testcontainers to support docker desktop 29+#6580

Open
InvisibleProgrammer wants to merge 1 commit into
apache:masterfrom
InvisibleProgrammer:HIVE-29349
Open

HIVE-29349: upgrade testcontainers to support docker desktop 29+#6580
InvisibleProgrammer wants to merge 1 commit into
apache:masterfrom
InvisibleProgrammer:HIVE-29349

Conversation

@InvisibleProgrammer

Copy link
Copy Markdown
Contributor

The current version of docker testcontainers doesn't suppport docker versions from 29.

There were a previous attempt to fix the problem by doing a major upgrade: #6220
That attempt failed as it requires upgrades in the CI pipeline as well.

This change is only a minor upgrade change that means it can be done without touching Jenkins at all. And also, with that change, it is possible to run dockerized metastore tests with never docker versions.

What changes were proposed in this pull request?

Upgrade docker testcontainers from 1.21.3 to 1.21.4

Why are the changes needed?

To be able to run metastorecheckin tests with never docker versions.
Here is the current output with docker version 29.4.0:

[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.hadoop.hive.metastore.dbinstall.TestPostgres
[ERROR] Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.341 s <<< FAILURE! -- in org.apache.hadoop.hive.metastore.dbinstall.TestPostgres
[ERROR] org.apache.hadoop.hive.metastore.dbinstall.TestPostgres.upgrade -- Time elapsed: 0.328 s <<< ERROR!
java.lang.IllegalStateException: Could not find a valid Docker environment. Please see logs and check configuration
    at org.testcontainers.dockerclient.DockerClientProviderStrategy.lambda$getFirstValidStrategy$7(DockerClientProviderStrategy.java:274)
    at java.base/java.util.Optional.orElseThrow(Optional.java:403)
    at org.testcontainers.dockerclient.DockerClientProviderStrategy.getFirstValidStrategy(DockerClientProviderStrategy.java:265)
    at org.testcontainers.DockerClientFactory.getOrInitializeStrategy(DockerClientFactory.java:154)
    at org.testcontainers.DockerClientFactory.client(DockerClientFactory.java:196)
    at org.testcontainers.DockerClientFactory$1.getDockerClient(DockerClientFactory.java:108)
    at com.github.dockerjava.api.DockerClientDelegate.authConfig(DockerClientDelegate.java:109)
    at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:321)
    at org.apache.hadoop.hive.metastore.dbinstall.rules.Postgres.before(Postgres.java:39)[ERROR] org.apache.hadoop.hive.metastore.dbinstall.TestPostgres.install -- Time elapsed: 0.005 s <<< ERROR!
java.lang.IllegalStateException: Previous attempts to find a Docker environment failed. Will not retry. Please see logs and check configuration
    at org.testcontainers.dockerclient.DockerClientProviderStrategy.getFirstValidStrategy(DockerClientProviderStrategy.java:229)
    at org.testcontainers.DockerClientFactory.getOrInitializeStrategy(DockerClientFactory.java:154)
    at org.testcontainers.DockerClientFactory.client(DockerClientFactory.java:196)
    at org.testcontainers.DockerClientFactory$1.getDockerClient(DockerClientFactory.java:108)
    at com.github.dockerjava.api.DockerClientDelegate.authConfig(DockerClientDelegate.java:109)
    at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:321)
    at org.apache.hadoop.hive.metastore.dbinstall.rules.Postgres.before(Postgres.java:39)[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR]   TestPostgres.install » IllegalState Previous attempts to find a Docker environment failed. Will not retry. Please see logs and check configuration
[ERROR]   TestPostgres.upgrade » IllegalState Could not find a valid Docker environment. Please see logs and check configuration
[INFO]
[ERROR] Tests run: 2, Failures: 0, Errors: 2, Skipped: 0 

Does this PR introduce any user-facing change?

No

How was this patch tested?

mvn install -Dtest.groups= -Dtest=TestMysql

@InvisibleProgrammer

Copy link
Copy Markdown
Contributor Author

@okumin , I faced with the exact same issue as you before. Let's see if a minor upgrade is accepted.

@sonarqubecloud

sonarqubecloud Bot commented Jul 6, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants