Bump SQL server JDK from Temurin 20 (EOL) to 21 LTS#1290
Conversation
c225166 to
c88a363
Compare
Temurin/OpenJDK 20 is a non-LTS release and no longer receives security updates. Move the SKDB SQL server Java toolchain to Temurin 21 LTS: - eclipse-temurin:20 → :21 in the server core and dev images - temurin-20-jdk → temurin-21-jdk (Adoptium apt) + JAVA_HOME in sql/Dockerfile - Gradle toolchain languageVersion 20 → 21 in the core and pg modules - CodeQL workflow's Kotlin analysis JDK 20 → 21 The Gradle wrapper (8.1.1) runs fine on JDK 21; verified locally by building the server-core and dev images and confirming temurin-21-jdk installs from the Adoptium noble repo at the expected JAVA_HOME path. The .sdkman sentinel version in sql/Dockerfile and sql/ts/tests/ service_common.mk is intentionally left at 20.0.2-tem: it is a build-time marker that lets the Makefile skip its SDKMAN install (the real JDK comes from apt), and it must match the already-published image, which the skdb-wasm CI job runs against. A comment now records this. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
JDK 20 → 21 breaking-change check: no impactShort answer: no, we're not affected. Details of what I checked: Scope. The only JVM code in scope is the Kotlin SQL server ( Known 20 → 21 source-incompatibilities — all checked, none present:
Toolchain. Kotlin 2.1.20 fully supports JDK 21. 20 → 21 is a single feature release whose headline changes (virtual threads, pattern matching, sequenced collections) are all additive. Empirical. The server 🤖 Generated with Claude Code |
Summary
Temurin/OpenJDK 20 is a non-LTS release that stopped receiving security updates in 2023. This moves the SKDB SQL-server Java toolchain to Temurin 21 LTS, a natural follow-on to the base-image modernization in #1261.
Changes (all version-string bumps, no logic changes):
eclipse-temurin:20→:21— servercoreanddevimagestemurin-20-jdk→temurin-21-jdk(Adoptium apt) +JAVA_HOMEinsql/DockerfilelanguageVersion20→21—coreandpgmodules20→21The Gradle wrapper stays at 8.1.1 — it runs fine on JDK 21 (verified), so no wrapper bump is needed.
Note on the SDKMAN sentinel
The
.sdkman/candidates/java/20.0.2-temmarker insql/Dockerfileandsql/ts/tests/service_common.mkis intentionally left at20.0.2-tem. It is a build-time sentinel that lets the Makefile skip its SDKMAN install (the real JDK comes from apt), and it must match the already-published image that theskdb-wasmCI job runs in. A comment now documents this so future JDK bumps don't touch it. (An earlier revision bumped it and turnedskdb-wasmred —sdk: command not found— because the published image still had the old sentinel dir.)Test plan
Verified locally (Docker, amd64):
server-coreimage builds oneclipse-temurin:21— Kotlin compiles, jars,checkpasses with wrapper 8.1.1devimageskgwstage builds oneclipse-temurin:21temurin-21-jdkinstalls from the Adoptium noble apt repo;JAVA_HOME=/usr/lib/jvm/temurin-21-jdk-amd64resolves;java -version→21.0.11 LTS