From 88668b2f8225556d89269f3b605e0709d364c855 Mon Sep 17 00:00:00 2001 From: Laurent Goujon Date: Tue, 2 Jul 2024 12:04:14 -0700 Subject: [PATCH] GH-38051: [Java] Change minimum java versions for github actions Remove build support for Java 8 and make Java 11 the minimum version to use to build Arrow in github actions and ci tasks --- .env | 2 +- .github/workflows/java.yml | 2 +- ci/docker/conda-integration.dockerfile | 2 +- ci/docker/conda-python-hdfs.dockerfile | 2 +- ci/docker/conda-python-spark.dockerfile | 2 +- ci/docker/java-jni-manylinux-201x.dockerfile | 2 +- ci/docker/linux-apt-docs.dockerfile | 2 +- dev/conbench_envs/README.md | 6 +++--- dev/release/setup-rhel-rebuilds.sh | 4 +++- dev/release/verify-release-candidate.sh | 2 +- dev/tasks/tasks.yml | 4 ++-- docker-compose.yml | 4 ++-- 12 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.env b/.env index be35921f94c3a..1358aafe824a6 100644 --- a/.env +++ b/.env @@ -61,7 +61,7 @@ GCC_VERSION="" GO=1.21.8 STATICCHECK=v0.4.7 HDFS=3.2.1 -JDK=8 +JDK=11 KARTOTHEK=latest # LLVM 12 and GCC 11 reports -Wmismatched-new-delete. LLVM=14 diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index 8eb2682dc077d..d4211c2c81cb5 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -58,7 +58,7 @@ jobs: strategy: fail-fast: false matrix: - jdk: [8, 11, 17, 21, 22] + jdk: [11, 17, 21, 22] maven: [3.9.6] image: [java] env: diff --git a/ci/docker/conda-integration.dockerfile b/ci/docker/conda-integration.dockerfile index 78d2503b23df7..c602490d6b729 100644 --- a/ci/docker/conda-integration.dockerfile +++ b/ci/docker/conda-integration.dockerfile @@ -23,7 +23,7 @@ ARG arch=amd64 ARG maven=3.8.7 ARG node=16 ARG yarn=1.22 -ARG jdk=8 +ARG jdk=11 ARG go=1.21.8 # Install Archery and integration dependencies diff --git a/ci/docker/conda-python-hdfs.dockerfile b/ci/docker/conda-python-hdfs.dockerfile index fa4fa0d1fb772..4e5e1a402e282 100644 --- a/ci/docker/conda-python-hdfs.dockerfile +++ b/ci/docker/conda-python-hdfs.dockerfile @@ -20,7 +20,7 @@ ARG arch=amd64 ARG python=3.8 FROM ${repo}:${arch}-conda-python-${python} -ARG jdk=8 +ARG jdk=11 ARG maven=3.8.7 RUN mamba install -q -y \ maven=${maven} \ diff --git a/ci/docker/conda-python-spark.dockerfile b/ci/docker/conda-python-spark.dockerfile index 866f6f37f8bd9..d95fe58b529f6 100644 --- a/ci/docker/conda-python-spark.dockerfile +++ b/ci/docker/conda-python-spark.dockerfile @@ -20,7 +20,7 @@ ARG arch=amd64 ARG python=3.8 FROM ${repo}:${arch}-conda-python-${python} -ARG jdk=8 +ARG jdk=11 ARG maven=3.8.7 ARG numpy=latest diff --git a/ci/docker/java-jni-manylinux-201x.dockerfile b/ci/docker/java-jni-manylinux-201x.dockerfile index 8b73c73c1d240..479f4aa598b18 100644 --- a/ci/docker/java-jni-manylinux-201x.dockerfile +++ b/ci/docker/java-jni-manylinux-201x.dockerfile @@ -33,7 +33,7 @@ RUN vcpkg install \ --x-feature=s3 # Install Java -ARG java=1.8.0 +ARG java=11 ARG maven=3.9.3 RUN yum install -y java-$java-openjdk-devel && \ yum clean all && \ diff --git a/ci/docker/linux-apt-docs.dockerfile b/ci/docker/linux-apt-docs.dockerfile index 1c916840e071b..0804f3543c283 100644 --- a/ci/docker/linux-apt-docs.dockerfile +++ b/ci/docker/linux-apt-docs.dockerfile @@ -19,7 +19,7 @@ ARG base FROM ${base} ARG r=4.4 -ARG jdk=8 +ARG jdk=11 ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium diff --git a/dev/conbench_envs/README.md b/dev/conbench_envs/README.md index 509dc5c0c9537..7fab503974805 100644 --- a/dev/conbench_envs/README.md +++ b/dev/conbench_envs/README.md @@ -99,16 +99,16 @@ Here are steps how `@ursabot` benchmark builds use `benchmarks.env` and `hooks.s ### 2. Install Arrow dependencies for Java sudo su - apt-get install openjdk-8-jdk + apt-get install openjdk-11-jdk apt-get install maven Verify that you have at least these versions of `java`, `javac` and `maven`: # java -version - openjdk version "1.8.0_292" + openjdk version "11.0.22" 2024-01-16 .. # javac -version - javac 1.8.0_292 + javac 11.0.22 ... # mvn -version Apache Maven 3.6.3 diff --git a/dev/release/setup-rhel-rebuilds.sh b/dev/release/setup-rhel-rebuilds.sh index dc190d2d2426e..e8861a19f35b7 100755 --- a/dev/release/setup-rhel-rebuilds.sh +++ b/dev/release/setup-rhel-rebuilds.sh @@ -35,7 +35,7 @@ dnf -y install \ cmake \ git \ gobject-introspection-devel \ - java-1.8.0-openjdk-devel \ + java-11-openjdk-devel \ libcurl-devel \ llvm-devel \ llvm-toolset \ @@ -55,3 +55,5 @@ npm install -g yarn python3 -m ensurepip --upgrade alternatives --set python /usr/bin/python3 +alternatives --set java java-11-openjdk.$(uname -i) +alternatives --set javac java-11-openjdk.$(uname -i) diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index 2f4b203f217af..6a36109dc2fc1 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -21,7 +21,7 @@ # Requirements # - Ruby >= 2.3 # - Maven >= 3.8.7 -# - JDK >=8 +# - JDK >= 11 # - gcc >= 4.8 # - Node.js >= 18 # - Go >= 1.21 diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index 2eb361047fc62..610ea7e9d6c85 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -1549,8 +1549,8 @@ tasks: image: conda-python-hdfs {% endfor %} -{% for python_version, spark_version, test_pyarrow_only, numpy_version, jdk_version in [("3.8", "v3.5.0", "false", "latest", "8"), - ("3.10", "v3.5.0", "false", "1.23", "8"), +{% for python_version, spark_version, test_pyarrow_only, numpy_version, jdk_version in [("3.8", "v3.5.0", "false", "latest", "11"), + ("3.10", "v3.5.0", "false", "1.23", "11"), ("3.11", "master", "false", "latest", "17")] %} test-conda-python-{{ python_version }}-spark-{{ spark_version }}: ci: github diff --git a/docker-compose.yml b/docker-compose.yml index fa248d59037d3..cf22324f7cfb4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1202,7 +1202,7 @@ services: build: args: base: ${REPO}:${ARCH}-python-${PYTHON}-wheel-manylinux-2014-vcpkg-${VCPKG} - java: 1.8.0 + java: 11 context: . dockerfile: ci/docker/java-jni-manylinux-201x.dockerfile cache_from: @@ -1747,7 +1747,7 @@ services: # docker-compose run java # Parameters: # MAVEN: 3.9.5 - # JDK: 8, 11, 17, 21 + # JDK: 11, 17, 21 image: ${ARCH}/maven:${MAVEN}-eclipse-temurin-${JDK} shm_size: *shm-size volumes: &java-volumes