From 58b2970d22880242e59930d8a063d2ef52f5f723 Mon Sep 17 00:00:00 2001 From: Yunfeng Zhou Date: Thu, 10 Jul 2025 16:36:26 +0800 Subject: [PATCH 1/4] [flink] Compile paimon-flink-cdc in Flink 2.x installing process --- paimon-flink/paimon-flink1-common/pom.xml | 2 +- paimon-flink/pom.xml | 2 ++ pom.xml | 2 -- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/paimon-flink/paimon-flink1-common/pom.xml b/paimon-flink/paimon-flink1-common/pom.xml index 9de633593556..ed9242965431 100644 --- a/paimon-flink/paimon-flink1-common/pom.xml +++ b/paimon-flink/paimon-flink1-common/pom.xml @@ -33,7 +33,7 @@ under the License. Paimon : Flink 1.x : Common - ${paimon-flink-common.flink.version} + 1.20.1 diff --git a/paimon-flink/pom.xml b/paimon-flink/pom.xml index 43ec0590d95c..6e665ad7b357 100644 --- a/paimon-flink/pom.xml +++ b/paimon-flink/pom.xml @@ -34,8 +34,10 @@ under the License. pom + paimon-flink1-common paimon-flink-common paimon-flink-action + paimon-flink-cdc diff --git a/pom.xml b/pom.xml index 68e84ca64521..c1aa7e0a1962 100644 --- a/pom.xml +++ b/pom.xml @@ -423,14 +423,12 @@ under the License. 1.20.1 - paimon-flink/paimon-flink1-common paimon-flink/paimon-flink-1.15 paimon-flink/paimon-flink-1.16 paimon-flink/paimon-flink-1.17 paimon-flink/paimon-flink-1.18 paimon-flink/paimon-flink-1.19 paimon-flink/paimon-flink-1.20 - paimon-flink/paimon-flink-cdc true From e7cf78bca0fba3a64bb9eef35281254a2957eca2 Mon Sep 17 00:00:00 2001 From: Yunfeng Zhou Date: Fri, 11 Jul 2025 14:59:04 +0800 Subject: [PATCH 2/4] [flink] Fix race condition in testConsumersTable --- .../test/java/org/apache/paimon/flink/CatalogTableITCase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/CatalogTableITCase.java b/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/CatalogTableITCase.java index 46baaa3eef7f..989446c0595c 100644 --- a/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/CatalogTableITCase.java +++ b/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/CatalogTableITCase.java @@ -955,9 +955,9 @@ public void testConsumersTable() throws Exception { BlockingIterator.of( streamSqlIter( "SELECT * FROM T /*+ OPTIONS('consumer-id'='my1','consumer.expiration-time'='3h') */")); + assertThat(iterator.collect(2)).containsExactlyInAnyOrder(Row.of(1, 2), Row.of(3, 4)); batchSql("INSERT INTO T VALUES (5, 6), (7, 8)"); - assertThat(iterator.collect(2)).containsExactlyInAnyOrder(Row.of(1, 2), Row.of(3, 4)); List result; do { From e126f5a10bb9789e5fbd0910d24f8c682dc2acd8 Mon Sep 17 00:00:00 2001 From: Yunfeng Zhou Date: Thu, 10 Jul 2025 17:54:03 +0800 Subject: [PATCH 3/4] Revert "[ci] Remove unstable Flink 2.0 test" This reverts commit a6d2e8376cfb93accfbb2112048edefeb48bc77e. --- .../workflows/utitcase-flink-2.x-jdk11.yml | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/utitcase-flink-2.x-jdk11.yml diff --git a/.github/workflows/utitcase-flink-2.x-jdk11.yml b/.github/workflows/utitcase-flink-2.x-jdk11.yml new file mode 100644 index 000000000000..8008011c7f2f --- /dev/null +++ b/.github/workflows/utitcase-flink-2.x-jdk11.yml @@ -0,0 +1,62 @@ +################################################################################ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +################################################################################ + +name: UTCase and ITCase Flink 2.x on JDK 11 + +on: + push: + pull_request: + paths-ignore: + - 'docs/**' + - '**/*.md' + +env: + JDK_VERSION: 11 + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 60 + + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Set up JDK ${{ env.JDK_VERSION }} + uses: actions/setup-java@v4 + with: + java-version: ${{ env.JDK_VERSION }} + distribution: 'temurin' + + - name: Build Flink + run: | + mvn -T 2C -B clean install -DskipTests -Pflink2,spark3 + + - name: Test Flink + run: | + # run tests with random timezone to find out timezone related bugs + . .github/workflows/utils.sh + jvm_timezone=$(random_timezone) + echo "JVM timezone is set to $jvm_timezone" + test_modules="" + for suffix in 2.0 common; do + test_modules+="org.apache.paimon:paimon-flink-${suffix}," + done + test_modules="${test_modules%,}" + mvn -T 2C -B test verify -Pflink2,spark3 -pl "${test_modules}" -Duser.timezone=$jvm_timezone + env: + MAVEN_OPTS: -Xmx4096m \ No newline at end of file From d2cc57bec406ad16825b40b28be6e51b2e834d2e Mon Sep 17 00:00:00 2001 From: Yunfeng Zhou Date: Fri, 11 Jul 2025 16:29:56 +0800 Subject: [PATCH 4/4] [flink] Increase Flink 2.0 workflow timeout --- .github/workflows/utitcase-flink-2.x-jdk11.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/utitcase-flink-2.x-jdk11.yml b/.github/workflows/utitcase-flink-2.x-jdk11.yml index 8008011c7f2f..75999430b30c 100644 --- a/.github/workflows/utitcase-flink-2.x-jdk11.yml +++ b/.github/workflows/utitcase-flink-2.x-jdk11.yml @@ -31,7 +31,7 @@ env: jobs: build: runs-on: ubuntu-latest - timeout-minutes: 60 + timeout-minutes: 120 steps: - name: Checkout code