[build] CI build test on Java 17 and 21 (#203 Phase 3)#3477
Open
vasiliy-mikhailov wants to merge 1 commit into
Open
[build] CI build test on Java 17 and 21 (#203 Phase 3)#3477vasiliy-mikhailov wants to merge 1 commit into
vasiliy-mikhailov wants to merge 1 commit into
Conversation
Signed-off-by: Vasiliy Mikhailov <vasiliy.mikhailov@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Phase 3 of #203: CI build-test coverage for Java 17 and Java 21 (default and release stay Java 11; no
target.java.versionis changed). As @wuchong noted when closing #114, building on 17/21 largely works already — this PR adds the missing CI coverage from the Phase-3 checklist, plus the two test-level fixes that running the suite on 17/21 surfaces.Changes
pom.xml: add--add-exports=java.rmi/sun.rmi.registry=ALL-UNNAMEDto the existingextraJavaTestArgsblock —JMXServer$JmxRegistryextends the JDK-internalsun.rmi.registry.RegistryImpl, which JDK 17+ strong encapsulation rejects (IllegalAccessError: superclass access check failed; JDK 8/11 only warn). Without it the wholefluss-serversuite errors on 17/21. Harmless on 8/11 thanks to the existing-XX:+IgnoreUnrecognizedVMOptions.fluss-lake/fluss-lake-hudi/pom.xml: addorg.apache.hadoop:hadoop-client-runtimeat test scope — Hudi's Flink bundle references hadoop-client-api shaded classes (org.apache.hadoop.shaded.com.ctc.wstx.*); without the runtime jarHudiLakeCatalogTestcan fail withNoClassDefFoundErrordepending on which StAX provider wins. Verified green on 11 and 21 with the dependency.ci.yaml: addcompile-on-jdk17/compile-on-jdk21(compile-only, mirroringcompile-on-jdk8) so every PR proves the build on 17/21 cheaply.nightly.yaml: add fullbuild-on-jdk17/build-on-jdk21test runs viaci-template.Spotless
The 17/21 jobs pass
-Dspotless.check.skip=true, following the precedent #204 established for the Java 8 leg: google-java-format 1.15.0 cannot run on JDK 21 (JCTree$JCImport.getQualifiedIdentifierNoSuchMethodError), and gjf versions that support 21 require a Java 17 runtime — no gjf version spans 11 and 21, so the format check stays on the default-JDK jobs until Phase 4.A linkage hazard worth a maintainer decision (not changed here)
The build uses
maven.compiler.source/target, notrelease. Compiling on JDK 17/21 therefore links against newer JDK APIs even with target 11 — we reproduced jars built on 21 crashing on a Java 11 runtime withNoSuchMethodError: java.nio.MappedByteBuffer.duplicate()(covariant override added in JDK 13). If artifacts may ever be built on 17/21,maven.compiler.release=11is the fix; we left it out because it interacts with thejava8profile (javac 8 has no--release) and deserves your preferred treatment.Verification (local, Temurin 11/17/21)
mvn -T 1C clean install -DskipTests: green on 11, 17 (both pristine) and 21 (with the spotless skip).mvn teston 17 and 21: identical outcomes to the Java 11 baseline run, withfluss-server(1048 tests) green on all three after the--add-exportsfix, andHudiLakeCatalogTestgreen on 11/21 after the dependency fix.fluss-fs-hdfsfails test discovery identically on 11/17/21 under a plainmvn test(it needs the staged-Ptest-*invocation);fluss-spark-ut's 2-minute lake-sync waits time out under our shared-load environment — the added nightly jobs on clean runners are the right adjudicator for it.