From d8c1ff41000be8c6546d1ed6d4cee4dd718ce90c Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" Date: Fri, 4 Oct 2024 08:01:47 +0200 Subject: [PATCH 1/8] HDDS-11527. Avoid unnecessary duplicate build --- .github/workflows/ci.yml | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ecf5a76c6cc..d0a9d83eefd0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,6 @@ on: required: false env: FAIL_FAST: ${{ github.event_name == 'pull_request' }} - BUILD_JAVA_VERSION: 8 # minimum version TEST_JAVA_VERSION: 17 # preferred version MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 OZONE_WITH_COVERAGE: ${{ github.event_name == 'push' }} @@ -106,7 +105,7 @@ jobs: if: needs.build-info.outputs.needs-build == 'true' strategy: matrix: - java: [ 8, 17 ] + java: [ 17 ] fail-fast: false steps: - name: Checkout project @@ -150,21 +149,19 @@ jobs: - name: Store binaries for tests uses: actions/upload-artifact@v4 with: - name: ozone-bin-${{ matrix.java }} + name: ozone-bin path: | hadoop-ozone/dist/target/ozone-*.tar.gz !hadoop-ozone/dist/target/ozone-*-src.tar.gz retention-days: 1 - name: Store source tarball for compilation uses: actions/upload-artifact@v4 - if: ${{ matrix.java == env.BUILD_JAVA_VERSION }} with: name: ozone-src path: hadoop-ozone/dist/target/ozone-*-src.tar.gz retention-days: 1 - name: Store Maven repo for tests uses: actions/upload-artifact@v4 - if: ${{ matrix.java == env.BUILD_JAVA_VERSION }} with: name: ozone-repo path: | @@ -348,7 +345,7 @@ jobs: - name: Download compiled Ozone binaries uses: actions/download-artifact@v4 with: - name: ozone-bin-${{ env.BUILD_JAVA_VERSION }} + name: ozone-bin - name: Untar binaries run: | mkdir dist @@ -425,14 +422,8 @@ jobs: ref: ${{ needs.build-info.outputs.sha }} - name: Download compiled Ozone binaries uses: actions/download-artifact@v4 - if: ${{ matrix.suite }} == 'MR' # until HDDS-11053 is fixed with: - name: ozone-bin-${{ env.BUILD_JAVA_VERSION }} - - name: Download compiled Ozone binaries - uses: actions/download-artifact@v4 - if: ${{ matrix.suite }} != 'MR' - with: - name: ozone-bin-${{ env.TEST_JAVA_VERSION }} + name: ozone-bin - name: Untar binaries run: | mkdir -p hadoop-ozone/dist/target @@ -475,7 +466,7 @@ jobs: - name: Download compiled Ozone binaries uses: actions/download-artifact@v4 with: - name: ozone-bin-${{ env.BUILD_JAVA_VERSION }} + name: ozone-bin - name: Untar binaries run: | mkdir -p hadoop-ozone/dist/target @@ -596,7 +587,7 @@ jobs: - name: Untar binaries run: | mkdir -p hadoop-ozone/dist/target - tar xzvf target/artifacts/ozone-bin-${{ env.TEST_JAVA_VERSION }}/ozone*.tar.gz -C hadoop-ozone/dist/target + tar xzvf target/artifacts/ozone-bin/ozone*.tar.gz -C hadoop-ozone/dist/target - name: Setup java ${{ env.TEST_JAVA_VERSION }} uses: actions/setup-java@v4 with: From 20be73522c67c34fed0f23d98ce53a7716636adb Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" Date: Fri, 4 Oct 2024 08:03:40 +0200 Subject: [PATCH 2/8] remove matrix build --- .github/workflows/ci.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0a9d83eefd0..68d744fb2682 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -103,10 +103,6 @@ jobs: runs-on: ubuntu-20.04 timeout-minutes: 60 if: needs.build-info.outputs.needs-build == 'true' - strategy: - matrix: - java: [ 17 ] - fail-fast: false steps: - name: Checkout project uses: actions/checkout@v4 @@ -141,7 +137,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: ${{ matrix.java }} + java-version: ${{ env.TEST_JAVA_VERSION }} - name: Run a full build run: hadoop-ozone/dev-support/checks/build.sh -Pdist -Psrc -Dmaven.javadoc.skip=true ${{ inputs.ratis_args }} env: From d891f44fa72b0b137c204a4a48db4335cf1b4847 Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" Date: Fri, 4 Oct 2024 08:12:14 +0200 Subject: [PATCH 3/8] clarify TEST_JAVA_VERSION --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68d744fb2682..cee6dacaeb99 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,8 @@ on: required: false env: FAIL_FAST: ${{ github.event_name == 'pull_request' }} - TEST_JAVA_VERSION: 17 # preferred version + # Minimum required Java version for running Ozone is defined in pom.xml (javac.version). + TEST_JAVA_VERSION: 17 # JDK version used by CI build and tests; should match the JDK version in apache/ozone-runner image MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 OZONE_WITH_COVERAGE: ${{ github.event_name == 'push' }} jobs: From 06d6863b5ada8ddee4f929b3e20cd6e05f3d243d Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" Date: Fri, 4 Oct 2024 08:15:16 +0200 Subject: [PATCH 4/8] include java version in step name --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cee6dacaeb99..79f9112b281c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -134,7 +134,7 @@ jobs: name: ratis-jars path: | ~/.m2/repository/org/apache/ratis - - name: Setup java + - name: Setup java ${{ env.TEST_JAVA_VERSION }} uses: actions/setup-java@v4 with: distribution: 'temurin' @@ -210,7 +210,7 @@ jobs: name: ratis-jars path: | ~/.m2/repository/org/apache/ratis - - name: Setup java + - name: Setup java ${{ matrix.java }} uses: actions/setup-java@v4 with: distribution: 'temurin' @@ -259,7 +259,7 @@ jobs: name: ratis-jars path: | ~/.m2/repository/org/apache/ratis - - name: Setup java + - name: Setup java 8 uses: actions/setup-java@v4 with: distribution: 'temurin' @@ -307,7 +307,7 @@ jobs: name: ratis-jars path: | ~/.m2/repository/org/apache/ratis - - name: Setup java + - name: Setup java 8 uses: actions/setup-java@v4 with: distribution: 'temurin' From 34dffaf1477c304fd6acfa23c5578f9de17c3e9f Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" Date: Fri, 4 Oct 2024 08:15:37 +0200 Subject: [PATCH 5/8] use TEST_JAVA_VERSION in native check --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79f9112b281c..dfe331903ee6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -307,11 +307,11 @@ jobs: name: ratis-jars path: | ~/.m2/repository/org/apache/ratis - - name: Setup java 8 + - name: Setup java ${{ env.TEST_JAVA_VERSION }} uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: 8 + java-version: ${{ env.TEST_JAVA_VERSION }} - name: Execute tests run: hadoop-ozone/dev-support/checks/${{ github.job }}.sh ${{ inputs.ratis_args }} continue-on-error: true From c2194c0504d38bfe830efd49cfbaaec8e865de20 Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" Date: Fri, 4 Oct 2024 08:16:20 +0200 Subject: [PATCH 6/8] use TEST_JAVA_VERSION in basic check --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dfe331903ee6..8e519a837553 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -259,11 +259,11 @@ jobs: name: ratis-jars path: | ~/.m2/repository/org/apache/ratis - - name: Setup java 8 + - name: Setup java ${{ env.TEST_JAVA_VERSION }} uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: 8 + java-version: ${{ env.TEST_JAVA_VERSION }} - name: Execute tests run: hadoop-ozone/dev-support/checks/${{ matrix.check }}.sh ${{ inputs.ratis_args }} continue-on-error: true From ea10202091c0e35b382195c20e88ebf805760dc6 Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" Date: Fri, 4 Oct 2024 08:41:00 +0200 Subject: [PATCH 7/8] use TEST_JAVA_VERSION in license check --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e519a837553..f3f1911b5932 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -386,6 +386,11 @@ jobs: name: ozone-repo path: | ~/.m2/repository/org/apache/ozone + - name: Setup java ${{ env.TEST_JAVA_VERSION }} + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: ${{ env.TEST_JAVA_VERSION }} - name: Execute tests run: | hadoop-ozone/dev-support/checks/${{ github.job }}.sh From 119e2ed54918d7029b7b1d0649e9366c0338715c Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" Date: Fri, 4 Oct 2024 09:13:22 +0200 Subject: [PATCH 8/8] Revert "use TEST_JAVA_VERSION in basic check" This reverts commit c2194c0504d38bfe830efd49cfbaaec8e865de20. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f3f1911b5932..860c14aedf2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -259,11 +259,11 @@ jobs: name: ratis-jars path: | ~/.m2/repository/org/apache/ratis - - name: Setup java ${{ env.TEST_JAVA_VERSION }} + - name: Setup java 8 uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: ${{ env.TEST_JAVA_VERSION }} + java-version: 8 - name: Execute tests run: hadoop-ozone/dev-support/checks/${{ matrix.check }}.sh ${{ inputs.ratis_args }} continue-on-error: true