diff --git a/docker/Jenkinsfile-build-docker b/docker/Jenkinsfile-build-docker index c6ae3654059f..4b989760879a 100644 --- a/docker/Jenkinsfile-build-docker +++ b/docker/Jenkinsfile-build-docker @@ -19,8 +19,8 @@ properties([ IMAGE_NAME_PREFIX = 'harbor.h2o.ai/opsh2oai/h2o-3' -JDK_VERSIONS = ['8', '10', '11', '12', '13', '14', '15', '16', '17'] -JDK_VERSIONS_PY_R = ['8', '11', '17'] // stable, last-supported, latest +JDK_VERSIONS = ['8', '10', '11', '12', '13', '14', '15', '16', '17', '21'] +JDK_VERSIONS_PY_R = ['8', '17', '21'] // stable, last-supported, latest PYTHON_VERSIONS = ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11'] R_VERSION = ['3.3.3', '3.4.1', '3.5.3', '3.6.2', '4.0.2'] @@ -60,6 +60,7 @@ ansiColor('xterm') { sh "s3cmd get s3://artifacts.h2o.ai/releases/oracle/jdk-15/x64-linux/jdk-15.0.2_linux-x64_bin.tar.gz" sh "s3cmd get s3://artifacts.h2o.ai/releases/oracle/jdk-16/x64-linux/jdk-16.0.2_linux-x64_bin.tar.gz" sh "s3cmd get s3://artifacts.h2o.ai/releases/oracle/jdk-17/x64-linux/jdk-17.0.0_linux-x64_bin.tar.gz" + sh "s3cmd get s3://artifacts.h2o.ai/releases/oracle/jdk-21/x64-linux/jdk-21.0.0_linux-x64_bin.tar.gz" } } stash name: 'docker-sources' @@ -75,7 +76,7 @@ ansiColor('xterm') { PYTHON_VERSIONS.each {version -> pythonImages += "dev-python-${version}" } - buildInParallel(pipelineContext, pythonImages) + //buildInParallel(pipelineContext, pythonImages) buildInParallel(pipelineContext, ['dev-r-base']) def componentImages = [] @@ -86,11 +87,15 @@ ansiColor('xterm') { componentImages += "dev-jdk-${version}" } componentImages += "dev-mojocompat" - buildInParallel(pipelineContext, componentImages) + //buildInParallel(pipelineContext, componentImages) - buildInParallel(pipelineContext, ["dev-build-base"]) - buildInParallel(pipelineContext, ["dev-build-hadoop"],) - buildInParallel(pipelineContext, ["dev-release"]) + //buildInParallel(pipelineContext, ["dev-build-base"]) + //buildInParallel(pipelineContext, ["dev-build-hadoop"],) + //buildInParallel(pipelineContext, ["dev-release"]) + + buildInParallel(pipelineContext, "dev-jdk-21") + buildInParallel(pipelineContext, "dev-r-3.5.3-jdk-21") + buildInParallel(pipelineContext, "python-3.6-jdk-21") def componentJdkImages = [] PYTHON_VERSIONS.each {version -> @@ -103,7 +108,7 @@ ansiColor('xterm') { componentJdkImages += "dev-r-${version}-jdk-${jdkVersion}" } } - buildInParallel(pipelineContext, componentJdkImages) + //buildInParallel(pipelineContext, componentJdkImages) } } diff --git a/docker/jenkins-images/Dockerfile-jdk-others b/docker/jenkins-images/Dockerfile-jdk-others index dcbe8af667ac..bea64576c221 100644 --- a/docker/jenkins-images/Dockerfile-jdk-others +++ b/docker/jenkins-images/Dockerfile-jdk-others @@ -15,7 +15,8 @@ RUN \ sync && \ if [ "${JAVA_VERSION}" = '8' ] || [ "${JAVA_VERSION}" = '10' ] || [ "${JAVA_VERSION}" = '11' ] || \ [ "${JAVA_VERSION}" = '12' ] || [ "${JAVA_VERSION}" = '13' ] || [ "${JAVA_VERSION}" = '14' ] || \ - [ "${JAVA_VERSION}" = '15' ] || [ "${JAVA_VERSION}" = '16' ] || [ "${JAVA_VERSION}" = '17' ]; then \ + [ "${JAVA_VERSION}" = '15' ] || [ "${JAVA_VERSION}" = '16' ] || [ "${JAVA_VERSION}" = '17' ] || \ + [ "${JAVA_VERSION}" = '21' ]; then \ /tmp/install_java_version_local ${JAVA_VERSION} /tmp/java-${JAVA_VERSION}-vars.sh; \ else \ /tmp/install_java_version ${JAVA_VERSION} /tmp/java-${JAVA_VERSION}-vars.sh; \ diff --git a/docker/scripts/java-21-vars.sh b/docker/scripts/java-21-vars.sh new file mode 100644 index 000000000000..fe5237f25fb1 --- /dev/null +++ b/docker/scripts/java-21-vars.sh @@ -0,0 +1,6 @@ +#! /bin/bash + +JAVA_INSTALL_VERSION_MAJOR='21' +JAVA_INSTALL_VERSION=0 +JAVA_INSTALL_PATH=/usr/opt/java-${JAVA_INSTALL_VERSION_MAJOR}-${JAVA_INSTALL_VERSION}/ +JDK_FILE=/tmp/jdk-21.0.0_linux-x64_bin.tar.gz diff --git a/h2o-assemblies/genmodel/build.gradle b/h2o-assemblies/genmodel/build.gradle index c34aa72c8ca5..053ca262170d 100644 --- a/h2o-assemblies/genmodel/build.gradle +++ b/h2o-assemblies/genmodel/build.gradle @@ -5,8 +5,8 @@ apply plugin: 'com.github.hierynomus.license' description = "H2O GenModel Assembly which is embedded into H2O.jar" // MOJO has to stay Java 1.7 compatible! -sourceCompatibility = 1.7 -targetCompatibility = 1.7 +sourceCompatibility = 1.8 +targetCompatibility = 1.8 // Dependencies dependencies { diff --git a/h2o-core/src/main/java/water/JavaVersionSupport.java b/h2o-core/src/main/java/water/JavaVersionSupport.java index 3cbca90b4631..faad81fa94a7 100644 --- a/h2o-core/src/main/java/water/JavaVersionSupport.java +++ b/h2o-core/src/main/java/water/JavaVersionSupport.java @@ -8,7 +8,7 @@ public class JavaVersionSupport { // Make sure that the following is logically consistent with whitelist in R code - see function .h2o.check_java_version in connection.R. // Upgrade of the javassist library should be considered when adding support for a new java version. public static final int MIN_SUPPORTED_JAVA_VERSION = 8; - public static final int MAX_SUPPORTED_JAVA_VERSION = 17; + public static final int MAX_SUPPORTED_JAVA_VERSION = 21; /** * Checks for the version of Java this instance of H2O was ran with and compares it with supported versions. diff --git a/h2o-core/src/test/java/water/JavaVersionSupportTest.java b/h2o-core/src/test/java/water/JavaVersionSupportTest.java index bc868d78d47e..151af662c85b 100644 --- a/h2o-core/src/test/java/water/JavaVersionSupportTest.java +++ b/h2o-core/src/test/java/water/JavaVersionSupportTest.java @@ -37,7 +37,7 @@ public static void beforeClass() throws Exception { @Parameterized.Parameters public static Collection data() { return Arrays.asList(new Object[][]{ - {8}, {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16}, {17} + {8}, {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16}, {17}, {21} }); } @@ -79,7 +79,7 @@ public static void beforeClass() throws Exception { @Parameterized.Parameters public static Collection data() { return Arrays.asList(new Object[][]{ - {7}, {18} + {7}, {22} }); } diff --git a/h2o-docs/src/product/welcome.rst b/h2o-docs/src/product/welcome.rst index 391b0cdbb6bf..ffbac1afb7ba 100644 --- a/h2o-docs/src/product/welcome.rst +++ b/h2o-docs/src/product/welcome.rst @@ -37,7 +37,7 @@ H2O runs on Java. To build H2O or run H2O tests, the 64-bit JDK is required. To H2O supports the following versions of Java: -- Java SE 17, 16, 15, 14, 13, 12, 11, 10, 9, 8 +- Java SE 21, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8 Click `here `__ to download the latest supported version. diff --git a/h2o-genmodel-extensions/deepwater/build.gradle b/h2o-genmodel-extensions/deepwater/build.gradle index 6eb6dfc28441..405067698eb0 100644 --- a/h2o-genmodel-extensions/deepwater/build.gradle +++ b/h2o-genmodel-extensions/deepwater/build.gradle @@ -1,7 +1,7 @@ description = "H2O GenModel Deepwater Extension" -sourceCompatibility = 1.7 -targetCompatibility = 1.7 +sourceCompatibility = 1.8 +targetCompatibility = 1.8 dependencies { api project(":h2o-genmodel") diff --git a/h2o-genmodel-extensions/mojo-pipeline/build.gradle b/h2o-genmodel-extensions/mojo-pipeline/build.gradle index d8de9185b88e..56e67b1c1fbc 100644 --- a/h2o-genmodel-extensions/mojo-pipeline/build.gradle +++ b/h2o-genmodel-extensions/mojo-pipeline/build.gradle @@ -1,8 +1,8 @@ description = "H2O GenModel support MOJO2 pipeline extensions" // MOJO has to stay Java 1.7 compatible! -sourceCompatibility = 1.7 -targetCompatibility = 1.7 +sourceCompatibility = 1.8 +targetCompatibility = 1.8 dependencies { api project(":h2o-genmodel") diff --git a/h2o-genmodel-extensions/xgboost/build.gradle b/h2o-genmodel-extensions/xgboost/build.gradle index af361cf161d9..50fc433486bf 100644 --- a/h2o-genmodel-extensions/xgboost/build.gradle +++ b/h2o-genmodel-extensions/xgboost/build.gradle @@ -3,8 +3,8 @@ apply plugin: 'com.github.johnrengelman.shadow' description = "H2O GenModel XGBoost support" // MOJO has to stay Java 1.7 compatible! -sourceCompatibility = 1.7 -targetCompatibility = 1.7 +sourceCompatibility = 1.8 +targetCompatibility = 1.8 ext { xgboostPredictorVersion = "0.3.20" diff --git a/h2o-genmodel/build.gradle b/h2o-genmodel/build.gradle index 28f23e00facc..e7b339a9aad0 100644 --- a/h2o-genmodel/build.gradle +++ b/h2o-genmodel/build.gradle @@ -4,8 +4,8 @@ description = "H2O GenModel" // MOJO has to stay Java 1.7 compatible! -sourceCompatibility = 1.7 -targetCompatibility = 1.7 +sourceCompatibility = 1.8 +targetCompatibility = 1.8 apply from: "$rootDir/gradle/dataCheck.gradle" diff --git a/h2o-logger/build.gradle b/h2o-logger/build.gradle index 6cc35e02651e..cc542f446315 100644 --- a/h2o-logger/build.gradle +++ b/h2o-logger/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'java-library' -sourceCompatibility = 1.7 -targetCompatibility = 1.7 +sourceCompatibility = 1.8 +targetCompatibility = 1.8 compileJava { options.debug = true diff --git a/h2o-r/h2o-DESCRIPTION.template b/h2o-r/h2o-DESCRIPTION.template index d4c56118bfa3..681a10b446ef 100644 --- a/h2o-r/h2o-DESCRIPTION.template +++ b/h2o-r/h2o-DESCRIPTION.template @@ -46,7 +46,7 @@ License: Apache License (== 2.0) URL: https://github.com/h2oai/h2o-3 BugReports: https://github.com/h2oai/h2o-3/issues NeedsCompilation: no -SystemRequirements: Java (>= 8, <= 17) +SystemRequirements: Java (>= 8, <= 21) Depends: R (>= 2.13.0), methods, stats diff --git a/scripts/jenkins/Makefile.jenkins b/scripts/jenkins/Makefile.jenkins index 2038ff1ace2f..f49cf7032fd9 100755 --- a/scripts/jenkins/Makefile.jenkins +++ b/scripts/jenkins/Makefile.jenkins @@ -480,6 +480,13 @@ test-junit-17-jenkins: test-junit-17: ADDITIONAL_TEST_JVM_OPTS="--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED" ./gradlew test -x h2o-ext-mojo-pipeline:test -x h2o-automl:test -x h2o-ext-xgboost:testMultiNode -x h2o-ext-target-encoder:testMultiNode -x h2o-clustering:test $$ADDITIONAL_GRADLE_OPTS +test-junit-21-jenkins: + $(call sed_test_scripts) + @$(MAKE) -f $(THIS_FILE) test-junit-21 + +test-junit-21: + ADDITIONAL_TEST_JVM_OPTS="--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED" ./gradlew test -x h2o-ext-mojo-pipeline:test -x h2o-automl:test -x h2o-ext-xgboost:testMultiNode -x h2o-ext-target-encoder:testMultiNode -x h2o-clustering:test $$ADDITIONAL_GRADLE_OPTS + test-junit-latest-jenkins: $(call sed_test_scripts) @$(MAKE) -f $(THIS_FILE) test-junit-latest diff --git a/scripts/jenkins/groovy/defineTestStages.groovy b/scripts/jenkins/groovy/defineTestStages.groovy index e0a0dd38e8cd..4209572721b4 100644 --- a/scripts/jenkins/groovy/defineTestStages.groovy +++ b/scripts/jenkins/groovy/defineTestStages.groovy @@ -428,6 +428,12 @@ def call(final pipelineContext) { additionalTestPackages: [pipelineContext.getBuildConfig().COMPONENT_PY], imageSpecifier: "python-3.6-jdk-17" ], + [ + stageName: 'Java 21 JUnit', target: 'test-junit-21-jenkins', pythonVersion: '3.6', javaVersion: 21, + timeoutValue: 700, component: pipelineContext.getBuildConfig().COMPONENT_JAVA, + additionalTestPackages: [pipelineContext.getBuildConfig().COMPONENT_PY], + imageSpecifier: "python-3.6-jdk-21" + ], [ stageName: 'Py3.6 Single Node', target: 'test-pyunit-single-node', pythonVersion: '3.6', timeoutValue: 40, component: pipelineContext.getBuildConfig().COMPONENT_PY @@ -504,6 +510,10 @@ def call(final pipelineContext) { stageName: 'Java 17 Smoke', target: 'test-junit-17-smoke-jenkins', javaVersion: 17, timeoutValue: 40, component: pipelineContext.getBuildConfig().COMPONENT_JAVA ], + [ + stageName: 'Java 21 Smoke', target: 'test-junit-21-smoke-jenkins', javaVersion: 21, timeoutValue: 40, + component: pipelineContext.getBuildConfig().COMPONENT_JAVA + ], [ stageName: 'Java 11 JUnit', target: 'test-junit-11-jenkins', pythonVersion: '3.6', javaVersion: 11, timeoutValue: 400, component: pipelineContext.getBuildConfig().COMPONENT_JAVA,