Skip to content

Bump SQL server JDK from Temurin 20 (EOL) to 21 LTS#1290

Merged
mbouaziz merged 1 commit into
SkipLabs:mainfrom
mbouaziz:temurin-21-lts
Jul 8, 2026
Merged

Bump SQL server JDK from Temurin 20 (EOL) to 21 LTS#1290
mbouaziz merged 1 commit into
SkipLabs:mainfrom
mbouaziz:temurin-21-lts

Conversation

@mbouaziz

@mbouaziz mbouaziz commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

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 — server core and dev images
  • temurin-20-jdktemurin-21-jdk (Adoptium apt) + JAVA_HOME in sql/Dockerfile
  • Gradle toolchain languageVersion 2021core and pg modules
  • CodeQL workflow's Kotlin-analysis JDK 2021

The 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-tem marker in sql/Dockerfile and sql/ts/tests/service_common.mk is intentionally left at 20.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 the skdb-wasm CI job runs in. A comment now documents this so future JDK bumps don't touch it. (An earlier revision bumped it and turned skdb-wasm red — sdk: command not found — because the published image still had the old sentinel dir.)

Test plan

Verified locally (Docker, amd64):

  • server-core image builds on eclipse-temurin:21 — Kotlin compiles, jars, check passes with wrapper 8.1.1
  • dev image skgw stage builds on eclipse-temurin:21
  • temurin-21-jdk installs from the Adoptium noble apt repo; JAVA_HOME=/usr/lib/jvm/temurin-21-jdk-amd64 resolves; java -version21.0.11 LTS
  • CI green

@mbouaziz mbouaziz force-pushed the temurin-21-lts branch 2 times, most recently from c225166 to c88a363 Compare July 8, 2026 15:35
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>
@mbouaziz mbouaziz merged commit 6faf821 into SkipLabs:main Jul 8, 2026
5 checks passed
@mbouaziz mbouaziz deleted the temurin-21-lts branch July 8, 2026 16:04
@mbouaziz

mbouaziz commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

JDK 20 → 21 breaking-change check: no impact

Short answer: no, we're not affected. Details of what I checked:

Scope. The only JVM code in scope is the Kotlin SQL server (sql/server/{core,dev,pg}) — 11 .kt files, 0 .java. The SKDB engine itself is Skiplang (compiled by skargo, JDK-independent), so it's untouched by the JDK version. Build and run both happen on eclipse-temurin:21, and the jars aren't distributed to run on older JVMs, so there's no bytecode target-level concern either.

Known 20 → 21 source-incompatibilities — all checked, none present:

  • SequencedCollection (JEP 431) — the headline Kotlin-on-21 gotcha: JDK 21 added removeFirst()/removeLast()/getFirst()/getLast()/addFirst()/addLast() to List/Deque, which can clash with Kotlin stdlib's existing removeFirst/removeLast extensions. Grep for any of these on collections: no usages.
  • Removed / deprecated-for-removal APIs (Thread.stop/suspend/resume, SecurityManager, finalize(), Runtime.exec(String)): none used.

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 core and dev images compile cleanly on JDK 21 (the only warning is a pre-existing, JDK-independent Kotlin/Java interop note in Mux.kt about a property named uri shadowing a Java field), and all CI is green including skdb and skdb-wasm.

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants