From 65f06801b805aba94d77b26dc9f3adf89130eef1 Mon Sep 17 00:00:00 2001 From: Vladimir Sitnikov Date: Thu, 5 Nov 2026 09:00:29 +0300 Subject: [PATCH] ci: install GA Oracle JDK with actions/setup-java, not oracle-actions oracle-actions/setup-java downloads a GA release only from https://download.oracle.com/java//latest/. Oracle removes a release from /latest/ once its free (NFTC) updates end, and the job then fails in "Set up Java" with a checksum error before the build starts. That happened to JDK 17 and 21, and f410a043ee responded by limiting Oracle jobs to Java 25 and later; the next removal would need the same edit. The actions/setup-java step that runs next already installs Oracle JDK for these jobs (Java 21 for Gradle included): it tries /latest/ and falls back to /archive/jdk-_..., which Oracle keeps. Run oracle-actions/setup-java only for the EA build from jdk.java.net, and allow Oracle jobs for Java 17 and later again. A release whose free updates have ended is tested with its first GA build from the archive, such as 21.0.0, not with its last update. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/matrix.mjs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/matrix.mjs b/.github/workflows/matrix.mjs index 4e4aa8b5739..30acfef7fae 100644 --- a/.github/workflows/matrix.mjs +++ b/.github/workflows/matrix.mjs @@ -92,9 +92,10 @@ matrix.exclude({os: 'macos-latest', java_distribution: {value: 'oracle'}}) // Ignore builds with JAVA EA for now, see https://github.com/apache/jmeter/issues/6114 matrix.exclude({java_version: eaJava}) matrix.imply({java_version: eaJava}, {java_distribution: {value: 'oracle'}}) -// oracle.com only serves "latest" builds for JDK 25 and later: JDK 17 and 21 are no longer -// available under the no-fee license, so download.oracle.com/java/21/latest returns 404 -matrix.imply({java_distribution: {value: 'oracle'}}, {java_version: v => v === eaJava || v >= 25}); +// download.oracle.com serves Oracle JDK 17 and later. When the free updates for a release end, Oracle removes it from +// /latest/, and actions/setup-java falls back to /archive/jdk-, the first GA build of the release (17.0.0, +// 21.0.0), so this line needs no update. +matrix.imply({java_distribution: {value: 'oracle'}}, {java_version: v => v === eaJava || v >= 17}); // TODO: Semeru does not ship Java 21 builds yet matrix.exclude({java_distribution: {value: 'semeru'}, java_version: '21'}); @@ -144,8 +145,11 @@ include.forEach(v => { const {value: javaDistribution, vendor: javaVendor} = v.java_distribution; v.java_distribution = javaDistribution; v.java_vendor = javaVendor; - if (v.java_distribution === 'oracle') { - v.oracle_java_website = v.java_version === eaJava ? 'jdk.java.net' : 'oracle.com'; + // oracle-actions/setup-java is used for the EA build only. With the default version: latest it downloads a GA + // release from /latest/ alone and fails once Oracle removes the release from there, so GA Oracle JDK comes from + // actions/setup-java instead. + if (v.java_version === eaJava) { + v.oracle_java_website = 'jdk.java.net'; } v.non_ea_java_version = v.java_version === eaJava ? '' : v.java_version; if (v.java_distribution !== 'semeru' && random() > 0.5) {