Sbaia commented on code in PR #678:
URL:
https://github.com/apache/doris-flink-connector/pull/678#discussion_r3681709656
##########
.github/workflows/build-connector.yml:
##########
@@ -115,4 +118,50 @@ jobs:
-pl flink-doris-connector-flink2 -am \
-Pflink2 \
-Dflink.version=2.2.0 \
- -Dflink.major.version=2.2
\ No newline at end of file
+ -Dflink.major.version=2.2
+
+ build-flink2-jdk21:
+ name: "Build Flink ${{ matrix.flink-major }} on JDK 21"
+ runs-on: ubuntu-latest
+ timeout-minutes: 30
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - flink-version: 2.0.0
+ flink-major: '2.0'
+ - flink-version: 2.1.0
+ flink-major: '2.1'
+ - flink-version: 2.2.0
+ flink-major: '2.2'
+ defaults:
+ run:
+ shell: bash
+ working-directory: flink-doris-connector
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Setup Java 21
+ uses: actions/setup-java@v4
+ with:
+ distribution: temurin
+ java-version: '21'
+ cache: maven
+
+ - name: Build Flink connector
+ run: |
+ mvn clean package \
+ -pl flink-doris-connector-flink2 -am \
+ -Pflink2 \
+ -Dflink.version=${{ matrix.flink-version }} \
+ -Dflink.major.version=${{ matrix.flink-major }}
+
+ - name: Verify Java 17 bytecode
+ run: |
+ javap -verbose \
+
flink-doris-connector-base/target/classes/org/apache/doris/flink/serialization/RowBatch.class
\
+ | grep -q 'major version: 61'
+ javap -verbose \
+
flink-doris-connector-flink2/target/classes/org/apache/doris/flink/table/DorisDynamicTableFactory.class
\
+ | grep -q 'major version: 61'
Review Comment:
JDK 21 is the JDK used to compile and run this CI job, while Java 17
intentionally remains the artifact bytecode target. The flink2 profile sets
maven.compiler.release=17, so javap should report class-file major version 61.
Verifying major version 65 would make the connector require Java 21 and break
Java 17 runtime compatibility. JDK 21 runtime compatibility is verified
separately by executing the build, IT, and E2E jobs on Java 21. I can rename
this step to "Verify Java 17-compatible bytecode" to make the distinction
clearer.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]