From 770e66e7bb52ff829320906f86a07e9d580d8b6c Mon Sep 17 00:00:00 2001 From: "Mateusz \"Serafin\" Gajewski" Date: Thu, 19 Sep 2024 11:26:25 +0200 Subject: [PATCH] Test JDK 24-ea beta 20 --- .github/actions/setup/action.yml | 2 +- .github/workflows/ci.yml | 5 ++--- .mvn/rrf/groupId-asm.txt | 1 + core/jdk/current | 2 +- core/jdk/temurin/jdk-23+37/arm64 | 1 - core/jdk/temurin/jdk-23+37/ppc64le | 1 - .../{jdk-23+37 => jdk-24+20-ea-beta}/amd64 | 2 +- core/jdk/temurin/jdk-24+20-ea-beta/arm64 | 1 + core/jdk/temurin/jdk-24+20-ea-beta/ppc64le | 1 + .../io/trino/server/TrinoSystemRequirements.java | 2 +- core/trino-server-rpm/src/main/rpm/preinstall | 16 ++++++---------- .../test/java/io/trino/server/rpm/ServerIT.java | 4 ++-- pom.xml | 4 ++-- 13 files changed, 19 insertions(+), 23 deletions(-) create mode 100644 .mvn/rrf/groupId-asm.txt delete mode 100644 core/jdk/temurin/jdk-23+37/arm64 delete mode 100644 core/jdk/temurin/jdk-23+37/ppc64le rename core/jdk/temurin/{jdk-23+37 => jdk-24+20-ea-beta}/amd64 (50%) create mode 100644 core/jdk/temurin/jdk-24+20-ea-beta/arm64 create mode 100644 core/jdk/temurin/jdk-24+20-ea-beta/ppc64le diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index fdd65a9ded66..7d73f751ef76 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -3,7 +3,7 @@ description: "Verify checked out commits and setup Java" inputs: java-version: description: "Java version to setup" - default: 23 + default: 24-ea cache: description: "Cache Maven repo (true/false/restore)" default: restore diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f92c551677d3..81ab9edcfbb1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,8 +57,7 @@ jobs: fail-fast: false matrix: include: - - { java-version: 23, cache: 'true', cleanup-node: true } - - { java-version: 24-ea, cache: 'restore', cleanup-node: true } + - { java-version: 24-ea, cache: 'true', cleanup-node: true } timeout-minutes: 45 steps: - uses: actions/checkout@v4 @@ -515,7 +514,7 @@ jobs: with: cache: restore cleanup-node: ${{ format('{0}', matrix.modules == 'plugin/trino-singlestore' || matrix.modules == 'plugin/trino-exasol') }} - java-version: ${{ matrix.jdk != '' && matrix.jdk || '23' }} + java-version: ${{ matrix.jdk != '' && matrix.jdk || '24-ea' }} - name: Maven Install run: | export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" diff --git a/.mvn/rrf/groupId-asm.txt b/.mvn/rrf/groupId-asm.txt new file mode 100644 index 000000000000..b050dd49ac0d --- /dev/null +++ b/.mvn/rrf/groupId-asm.txt @@ -0,0 +1 @@ +org.ow2.asm diff --git a/core/jdk/current b/core/jdk/current index cd5d9ebc723f..1d5a428fae2c 100644 --- a/core/jdk/current +++ b/core/jdk/current @@ -1 +1 @@ -temurin/jdk-23+37 +temurin/jdk-24+20-ea-beta diff --git a/core/jdk/temurin/jdk-23+37/arm64 b/core/jdk/temurin/jdk-23+37/arm64 deleted file mode 100644 index 5ac35f006416..000000000000 --- a/core/jdk/temurin/jdk-23+37/arm64 +++ /dev/null @@ -1 +0,0 @@ -distributionUrl=https://api.adoptium.net/v3/binary/version/jdk-23+37/linux/aarch64/jdk/hotspot/normal/eclipse?project=jdk diff --git a/core/jdk/temurin/jdk-23+37/ppc64le b/core/jdk/temurin/jdk-23+37/ppc64le deleted file mode 100644 index 88c78963b9be..000000000000 --- a/core/jdk/temurin/jdk-23+37/ppc64le +++ /dev/null @@ -1 +0,0 @@ -distributionUrl=https://api.adoptium.net/v3/binary/version/jdk-23+37/linux/ppc64le/jdk/hotspot/normal/eclipse?project=jdk diff --git a/core/jdk/temurin/jdk-23+37/amd64 b/core/jdk/temurin/jdk-24+20-ea-beta/amd64 similarity index 50% rename from core/jdk/temurin/jdk-23+37/amd64 rename to core/jdk/temurin/jdk-24+20-ea-beta/amd64 index bd8bf4388756..0711d43d70a5 100644 --- a/core/jdk/temurin/jdk-23+37/amd64 +++ b/core/jdk/temurin/jdk-24+20-ea-beta/amd64 @@ -1 +1 @@ -distributionUrl=https://api.adoptium.net/v3/binary/version/jdk-23+37/linux/x64/jdk/hotspot/normal/eclipse?project=jdk +distributionUrl=https://api.adoptium.net/v3/binary/version/jdk-24+20-ea-beta/linux/x64/jdk/hotspot/normal/eclipse?project=jdk diff --git a/core/jdk/temurin/jdk-24+20-ea-beta/arm64 b/core/jdk/temurin/jdk-24+20-ea-beta/arm64 new file mode 100644 index 000000000000..3d8f27694716 --- /dev/null +++ b/core/jdk/temurin/jdk-24+20-ea-beta/arm64 @@ -0,0 +1 @@ +distributionUrl=https://api.adoptium.net/v3/binary/version/jdk-24+20-ea-beta/linux/aarch64/jdk/hotspot/normal/eclipse?project=jdk diff --git a/core/jdk/temurin/jdk-24+20-ea-beta/ppc64le b/core/jdk/temurin/jdk-24+20-ea-beta/ppc64le new file mode 100644 index 000000000000..94c45e7e03cb --- /dev/null +++ b/core/jdk/temurin/jdk-24+20-ea-beta/ppc64le @@ -0,0 +1 @@ +distributionUrl=https://api.adoptium.net/v3/binary/version/jdk-24+20-ea-beta/linux/ppc64le/jdk/hotspot/normal/eclipse?project=jdk diff --git a/core/trino-main/src/main/java/io/trino/server/TrinoSystemRequirements.java b/core/trino-main/src/main/java/io/trino/server/TrinoSystemRequirements.java index 2a8c2a2d65c1..01aab9a2e34c 100644 --- a/core/trino-main/src/main/java/io/trino/server/TrinoSystemRequirements.java +++ b/core/trino-main/src/main/java/io/trino/server/TrinoSystemRequirements.java @@ -107,7 +107,7 @@ else if ("Mac OS X".equals(osName)) { private static void verifyJavaVersion() { - Version required = Version.parse("22.0.1"); + Version required = Version.parse("24-beta+20-ea"); if (Runtime.version().compareTo(required) < 0) { failRequirement("Trino requires Java %s at minimum (found %s)", required, Runtime.version()); diff --git a/core/trino-server-rpm/src/main/rpm/preinstall b/core/trino-server-rpm/src/main/rpm/preinstall index c2168e954d53..a9ed0e35916f 100644 --- a/core/trino-server-rpm/src/main/rpm/preinstall +++ b/core/trino-server-rpm/src/main/rpm/preinstall @@ -22,7 +22,7 @@ check_if_correct_java_version() { # candidate for JAVA_HOME). JAVA_VERSION=$(java_version "$1") JAVA_MAJOR=$(echo "$JAVA_VERSION" | cut -d'-' -f1 | cut -d'.' -f1) - if [ "$JAVA_MAJOR" -ge "22" ]; then + if [ "$JAVA_MAJOR" -ge "24" ]; then echo "$1" >/tmp/trino-rpm-install-java-home return 0 else @@ -34,14 +34,10 @@ check_if_correct_java_version() { if ! check_if_correct_java_version "$JAVA_HOME"; then java_found=false for candidate in \ - /usr/lib/jvm/java-22-* \ - /usr/lib/jvm/zulu-22 \ - /usr/lib/jvm/temurin-22 \ - /usr/lib/jvm/temurin-22-* \ - /usr/lib/jvm/java-23-* \ - /usr/lib/jvm/zulu-23 \ - /usr/lib/jvm/temurin-23 \ - /usr/lib/jvm/temurin-23-* \ + /usr/lib/jvm/java-24-* \ + /usr/lib/jvm/zulu-24 \ + /usr/lib/jvm/temurin-24 \ + /usr/lib/jvm/temurin-24-* \ /usr/lib/jvm/default-java \ /usr/java/default \ / \ @@ -61,7 +57,7 @@ if [ "$java_found" = false ]; then +======================================================================+ | Error: Required Java version could not be found | +----------------------------------------------------------------------+ -| JDK 22 or 23 was not detected. | +| JDK 24 was not detected. | | Recommended JDK distribution is Eclipse Temurin. | | Installation guide: https://adoptium.net/installation/linux/ | | | diff --git a/core/trino-server-rpm/src/test/java/io/trino/server/rpm/ServerIT.java b/core/trino-server-rpm/src/test/java/io/trino/server/rpm/ServerIT.java index 5ce0fbde305f..4950e490f615 100644 --- a/core/trino-server-rpm/src/test/java/io/trino/server/rpm/ServerIT.java +++ b/core/trino-server-rpm/src/test/java/io/trino/server/rpm/ServerIT.java @@ -75,8 +75,8 @@ public void testInstallUninstall() throws Exception { // Release names as in the https://api.adoptium.net/q/swagger-ui/#/Release%20Info/getReleaseNames - testInstall("jdk-23+37", "/usr/lib/jvm/temurin-23", "23"); - testUninstall("jdk-23+37", "/usr/lib/jvm/temurin-23"); + testInstall("jdk-24+20-ea-beta", "/usr/lib/jvm/temurin-24", "24"); + testUninstall("jdk-24+20-ea-beta", "/usr/lib/jvm/temurin-24"); } private void testInstall(String temurinReleaseName, String javaHome, String expectedJavaVersion) diff --git a/pom.xml b/pom.xml index bb7476ae8e61..ab88691ebe5c 100644 --- a/pom.xml +++ b/pom.xml @@ -144,7 +144,7 @@ - 22 + 24 2024-10-16T21:09:18Z @@ -153,7 +153,7 @@ true true true - 22.0.0 + 24 syntax,reference,html,-missing 8 clean verify -DskipTests