From 3d508c470976b116c5d7f4613ef4c5212a476024 Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Mon, 30 Oct 2023 09:15:17 -0400 Subject: [PATCH] Update bundled JDK to JDK-21.0.1 (#10576) Signed-off-by: Andriy Redko (cherry picked from commit 0d7d1e9db7ace8f6e90ab98ade88d719efaf37e1) Signed-off-by: Andriy Redko --- .../gradle/test/DistroTestPlugin.java | 4 +-- buildSrc/version.properties | 2 +- distribution/src/config/jvm.options | 2 +- libs/core/build.gradle | 27 ++++++++++++------- server/build.gradle | 13 ++++++++- 5 files changed, 33 insertions(+), 15 deletions(-) diff --git a/buildSrc/src/main/java/org/opensearch/gradle/test/DistroTestPlugin.java b/buildSrc/src/main/java/org/opensearch/gradle/test/DistroTestPlugin.java index a420c8b63b02c..1ad7e056b6ae6 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/test/DistroTestPlugin.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/test/DistroTestPlugin.java @@ -77,9 +77,9 @@ import java.util.stream.Stream; public class DistroTestPlugin implements Plugin { - private static final String SYSTEM_JDK_VERSION = "11.0.20+8"; + private static final String SYSTEM_JDK_VERSION = "17.0.9+9"; private static final String SYSTEM_JDK_VENDOR = "adoptium"; - private static final String GRADLE_JDK_VERSION = "17.0.8+7"; + private static final String GRADLE_JDK_VERSION = "17.0.9+9"; private static final String GRADLE_JDK_VENDOR = "adoptium"; // all distributions used by distro tests. this is temporary until tests are per distribution diff --git a/buildSrc/version.properties b/buildSrc/version.properties index d9266c6008c98..38f6d6af08ca1 100644 --- a/buildSrc/version.properties +++ b/buildSrc/version.properties @@ -2,7 +2,7 @@ opensearch = 2.12.0 lucene = 9.8.0 bundled_jdk_vendor = adoptium -bundled_jdk = 17.0.8+7 +bundled_jdk = 21.0.1+12 # optional dependencies spatial4j = 0.7 diff --git a/distribution/src/config/jvm.options b/distribution/src/config/jvm.options index 952110c6c0289..1a0abcbaf9c88 100644 --- a/distribution/src/config/jvm.options +++ b/distribution/src/config/jvm.options @@ -81,7 +81,7 @@ ${error.file} # JDK 20+ Incubating Vector Module for SIMD optimizations; # disabling may reduce performance on vector optimized lucene -20:--add-modules=jdk.incubator.vector +20-:--add-modules=jdk.incubator.vector # HDFS ForkJoinPool.common() support by SecurityManager -Djava.util.concurrent.ForkJoinPool.common.threadFactory=org.opensearch.secure_sm.SecuredForkJoinWorkerThreadFactory diff --git a/libs/core/build.gradle b/libs/core/build.gradle index 1ab2073759788..46b6f4471731f 100644 --- a/libs/core/build.gradle +++ b/libs/core/build.gradle @@ -104,16 +104,23 @@ tasks.named('forbiddenApisMain').configure { tasks.named("thirdPartyAudit").configure { ignoreMissingClasses( // from log4j - 'org.osgi.framework.Bundle', - 'org.osgi.framework.BundleActivator', - 'org.osgi.framework.BundleContext', - 'org.osgi.framework.BundleEvent', - 'org.osgi.framework.FrameworkUtil', - 'org.osgi.framework.ServiceReference', - 'org.osgi.framework.ServiceRegistration', - 'org.osgi.framework.SynchronousBundleListener', - 'org.osgi.framework.wiring.BundleWire', - 'org.osgi.framework.wiring.BundleWiring' + *[ + 'org.osgi.framework.Bundle', + 'org.osgi.framework.BundleActivator', + 'org.osgi.framework.BundleContext', + 'org.osgi.framework.BundleEvent', + 'org.osgi.framework.SynchronousBundleListener', + 'org.osgi.framework.wiring.BundleWire', + 'org.osgi.framework.wiring.BundleWiring', + ] + (BuildParams.runtimeJavaVersion < JavaVersion.VERSION_20) ? [] : [ + 'jdk.incubator.vector.ByteVector', + 'jdk.incubator.vector.FloatVector', + 'jdk.incubator.vector.IntVector', + 'jdk.incubator.vector.ShortVector', + 'jdk.incubator.vector.Vector', + 'jdk.incubator.vector.VectorOperators', + 'jdk.incubator.vector.VectorSpecies' + ] ) } diff --git a/server/build.gradle b/server/build.gradle index 1c2fe50834ca2..192729888c4a8 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -257,6 +257,7 @@ tasks.named("processResources").configure { tasks.named("thirdPartyAudit").configure { ignoreMissingClasses( + *[ // from com.fasterxml.jackson.dataformat.yaml.YAMLMapper (jackson-dataformat-yaml) 'com.fasterxml.jackson.databind.ObjectMapper', @@ -385,7 +386,17 @@ tasks.named("thirdPartyAudit").configure { 'org.slf4j.Logger', 'org.slf4j.LoggerFactory', 'reactor.blockhound.BlockHound$Builder', - 'reactor.blockhound.integration.BlockHoundIntegration' + 'reactor.blockhound.integration.BlockHoundIntegration', + 'com.google.common.geometry.S2LatLng' + ] + (BuildParams.runtimeJavaVersion < JavaVersion.VERSION_20) ? [] : [ + 'jdk.incubator.vector.ByteVector', + 'jdk.incubator.vector.FloatVector', + 'jdk.incubator.vector.IntVector', + 'jdk.incubator.vector.ShortVector', + 'jdk.incubator.vector.Vector', + 'jdk.incubator.vector.VectorOperators', + 'jdk.incubator.vector.VectorSpecies' + ] ) ignoreViolations( 'com.google.protobuf.MessageSchema',