From 57b671c3aee45f7c7560b815f69b684d5b123d3a Mon Sep 17 00:00:00 2001 From: Bruce Bujon Date: Mon, 23 Nov 2026 09:22:14 +0100 Subject: [PATCH] Keep tip on JDK 27 now that CI images ship EA JDK 28 The ci-* builder images now provide JAVA_28_HOME (EA), so "tip" resolved to JDK 28 EA on master and in the merge queue. Exclude JDK 28 when resolving "tip" until it is GA. Co-Authored-By: Claude Opus 5.5 --- .gitlab/upload_ciapp.sh | 4 ++++ .../gradle/plugin/testJvmConstraints/TestJvmSpec.kt | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.gitlab/upload_ciapp.sh b/.gitlab/upload_ciapp.sh index cb9199b8625..bcbcf5d5466 100755 --- a/.gitlab/upload_ciapp.sh +++ b/.gitlab/upload_ciapp.sh @@ -16,6 +16,10 @@ if [ -n "$TEST_JVM" ]; then for var in $(compgen -v JAVA_ | grep -E '^JAVA_[0-9]+_HOME$'); do ver="${var#JAVA_}" ver="${ver%_HOME}" + # TODO(JDK-28-EA): remove after GA (tip will move to 28) + if [ "$ver" = "28" ]; then + continue + fi if [ "$ver" -gt "$MAX_VER" ] 2>/dev/null; then MAX_VER="$ver" fi diff --git a/buildSrc/src/main/kotlin/datadog/gradle/plugin/testJvmConstraints/TestJvmSpec.kt b/buildSrc/src/main/kotlin/datadog/gradle/plugin/testJvmConstraints/TestJvmSpec.kt index 0765acb988a..76c9f770e44 100644 --- a/buildSrc/src/main/kotlin/datadog/gradle/plugin/testJvmConstraints/TestJvmSpec.kt +++ b/buildSrc/src/main/kotlin/datadog/gradle/plugin/testJvmConstraints/TestJvmSpec.kt @@ -35,6 +35,16 @@ import java.nio.file.Paths class TestJvmSpec(val project: Project) { companion object { const val TEST_JVM = "testJvm" + + // TODO(JDK-28-EA): remove after GA (tip will move to 28) + internal fun resolveTipJavaVersion(javaVersions: List): String { + val tipJavaVersions = javaVersions.filterNot { it == 28 } + if (tipJavaVersions.isEmpty()) { + throw GradleException("No Java installations found for tip after excluding Java 28.") + } + + return tipJavaVersions.max().toString() + } } /** @@ -59,7 +69,7 @@ class TestJvmSpec(val project: Project) { throw GradleException("No Java installations found via toolchains or JAVA_X_HOME environment variables.") } - javaVersions.max().toString() + resolveTipJavaVersion(javaVersions) // TODO(JDK-28-EA): revert back to "javaVersions.max().toString()" after GA } else -> testJvm