Skip to content

[ci] Fix docker environment related test failure#4275

Merged
lvyanquan merged 3 commits intoapache:masterfrom
yuxiqian:hotfix/fix-docker-client
Feb 27, 2026
Merged

[ci] Fix docker environment related test failure#4275
lvyanquan merged 3 commits intoapache:masterfrom
yuxiqian:hotfix/fix-docker-client

Conversation

@yuxiqian
Copy link
Copy Markdown
Member

@yuxiqian yuxiqian commented Feb 13, 2026

This PR:

@yuxiqian yuxiqian force-pushed the hotfix/fix-docker-client branch 3 times, most recently from 5a914f6 to ae37570 Compare February 13, 2026 09:23
@yuxiqian yuxiqian changed the title [ci] Bump TestContainers version to 2.0.3 to fix CI failure [ci] Specify Docker API version explicitly as a workaround of testcontainers/testcontainers-java#11212 Feb 13, 2026
@rolnico
Copy link
Copy Markdown

rolnico commented Feb 13, 2026

The testcontainers v1.21.4 seems to contain the fix too, if you prefer to avoid the workaround

@yuxiqian
Copy link
Copy Markdown
Member Author

The testcontainers v1.21.4 seems to contain the fix too, if you prefer to avoid the workaround

Great! Thanks for reminding :)

@ruanwenjun
Copy link
Copy Markdown
Member

The testcontainers v1.21.4 seems to contain the fix too, if you prefer to avoid the workaround

+1, upgrade testcontainers to 1.21.4 can solve these problem.

@yuxiqian yuxiqian force-pushed the hotfix/fix-docker-client branch 2 times, most recently from 7111211 to 3527f54 Compare February 26, 2026 06:08
@yuxiqian yuxiqian changed the title [ci] Specify Docker API version explicitly as a workaround of testcontainers/testcontainers-java#11212 [ci] Bump testcontainers version to 1.21.4 Feb 26, 2026
@yuxiqian yuxiqian changed the title [ci] Bump testcontainers version to 1.21.4 [ci] Fix docker environment related test cases Feb 26, 2026
@yuxiqian yuxiqian changed the title [ci] Fix docker environment related test cases [ci] Fix docker environment related test failure Feb 26, 2026
@lvyanquan lvyanquan requested a review from Copilot February 27, 2026 07:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes Docker environment-related test failures by upgrading testcontainers-java and adjusting CI infrastructure to work around OpenJDK issues.

Changes:

  • Upgraded testcontainers-java from 1.18.3 to 1.21.4 to include patch for issue #11212
  • Replaced testcontainers shaded Guava imports with Flink's shaded Guava (guava31) in test files to avoid dependency conflicts
  • Added testcontainers exclusions to all modules using flink-test-utils or flink-connector-test-utils dependencies
  • Pinned GitHub Actions Ubuntu runner to 22.04 as workaround for JDK-8348566 and JDK-8349988

Reviewed changes

Copilot reviewed 31 out of 31 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pom.xml Bumped testcontainers.version property from 1.18.3 to 1.21.4
flink-cdc-runtime/src/test/java/org/apache/flink/cdc/runtime/operators/transform/PreTransformOperatorTest.java Changed ImmutableMap import from testcontainers shaded to flink shaded guava31
flink-cdc-runtime/src/test/java/org/apache/flink/cdc/runtime/operators/transform/PostTransformOperatorTest.java Changed ImmutableMap import from testcontainers shaded to flink shaded guava31
flink-cdc-runtime/src/test/java/org/apache/flink/cdc/runtime/operators/schema/common/SchemaManagerTest.java Changed ImmutableMap import from testcontainers shaded to flink shaded guava31
flink-cdc-runtime/pom.xml Added testcontainers exclusion for flink-test-utils-junit dependency
flink-cdc-pipeline-model/pom.xml Added testcontainers exclusion for flink-test-utils-junit dependency
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-vitess-cdc/pom.xml Added testcontainers exclusion for flink-test-utils dependency
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-tidb-cdc/pom.xml Added testcontainers exclusions for flink-test-utils and flink-connector-test-utils dependencies
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-test-util/pom.xml Added testcontainers exclusion for flink-test-utils dependency
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-sqlserver-cdc/pom.xml Added testcontainers exclusions for flink-test-utils and flink-connector-test-utils dependencies
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-postgres-cdc/pom.xml Added testcontainers exclusions for flink-test-utils and flink-connector-test-utils dependencies
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-oracle-cdc/pom.xml Added testcontainers exclusions for flink-test-utils and flink-connector-test-utils dependencies
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/pom.xml Added testcontainers exclusions for flink-test-utils and flink-connector-test-utils dependencies
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mongodb-cdc/pom.xml Added testcontainers exclusions for flink-test-utils and flink-connector-test-utils dependencies
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-debezium/pom.xml Added testcontainers exclusion for flink-test-utils dependency
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-db2-cdc/pom.xml Added testcontainers exclusions for flink-test-utils-junit and flink-test-utils dependencies
flink-cdc-connect/flink-cdc-source-connectors/flink-cdc-base/pom.xml Added testcontainers exclusions for flink-test-utils and flink-connector-test-utils dependencies
flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-starrocks/pom.xml Added testcontainers exclusions for flink-test-utils-junit and flink-test-utils dependencies
flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-postgres/pom.xml Added testcontainers exclusions for flink-test-utils and flink-connector-test-utils dependencies
flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-oracle/pom.xml Added testcontainers exclusions for flink-test-utils and flink-connector-test-utils dependencies
flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-oceanbase/pom.xml Added testcontainers exclusion for flink-test-utils dependency
flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-mysql/pom.xml Added testcontainers exclusions for flink-test-utils and flink-connector-test-utils dependencies
flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-kafka/pom.xml Added testcontainers exclusion for flink-test-utils dependency
flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-iceberg/pom.xml Added testcontainers exclusions for flink-test-utils and flink-test-utils-junit dependencies
flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-fluss/pom.xml Added testcontainers exclusion for flink-test-utils dependency
flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-elasticsearch/pom.xml Added testcontainers exclusions for flink-test-utils and flink-connector-test-utils dependencies
flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-doris/pom.xml Added testcontainers exclusions for flink-test-utils-junit and flink-test-utils dependencies
flink-cdc-composer/src/test/java/org/apache/flink/cdc/composer/flink/FlinkPipelineComposerLenientITCase.java Changed ImmutableMap import from testcontainers shaded to flink shaded guava31
flink-cdc-composer/src/test/java/org/apache/flink/cdc/composer/flink/FlinkPipelineComposerITCase.java Changed ImmutableMap import from testcontainers shaded to flink shaded guava31
flink-cdc-composer/pom.xml Added testcontainers exclusion for flink-test-utils dependency
.github/workflows/flink_cdc_base.yml Pinned Ubuntu runner to version 22.04 as workaround for JDK-8348566 and JDK-8349988

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lvyanquan
Copy link
Copy Markdown
Contributor

It seems the test case org.apache.flink.cdc.connectors.mongodb.source.MongoDBParallelSourceExampleTest will reliably fail given these modifications (after three retry attempts).

@yuxiqian
Copy link
Copy Markdown
Member Author

It seems the test case org.apache.flink.cdc.connectors.mongodb.source.MongoDBParallelSourceExampleTest will reliably fail given these modifications (after three retry attempts).

Fixed. It seems there's a redundant waitFor condition (only set after the container started) that caused this problem.

# flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mongodb-cdc/src/test/java/org/apache/flink/cdc/connectors/mongodb/utils/MongoDBContainer.java
                throw new IllegalStateException(
                        "Execute mongo command failed " + execResult.getStderr());
            }
-           this.waitingFor(Wait.forLogMessage("Flink test user created.\\s", 1));
        } catch (Exception e) {
            throw new RuntimeException(e);
        }

As execInContainer is synchronous, this condition should be unnecessary.

Copy link
Copy Markdown
Contributor

@lvyanquan lvyanquan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@lvyanquan lvyanquan merged commit c155638 into apache:master Feb 27, 2026
15 checks passed
ThorneANN pushed a commit to ThorneANN/flink-cdc that referenced this pull request Mar 6, 2026
suhwan-cheon pushed a commit to suhwan-cheon/flink-cdc that referenced this pull request Mar 9, 2026
ThorneANN pushed a commit to ThorneANN/flink-cdc that referenced this pull request Mar 19, 2026
Mrart pushed a commit to Mrart/flink-cdc that referenced this pull request Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment