This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 33435fcd65d HDDS-17856. Add more dependencies to cache (#12101)
33435fcd65d is described below

commit 33435fcd65d9b760be8aecc2461ce25f8cf8c297
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Sun Nov 22 10:15:32 2026 +0100

    HDDS-17856. Add more dependencies to cache (#12101)
---
 .github/actions/setup-java-with-cache/action.yml   | 11 +++-
 .github/workflows/check.yml                        |  9 +++
 .github/workflows/populate-cache.yml               | 48 +++++++++-------
 dev-support/ci/download-nodejs.sh                  | 64 ----------------------
 dev-support/ci/populate-cache.sh                   | 39 +++++++++++++
 hadoop-ozone/dev-support/checks/_lib.sh            | 14 +++--
 .../dist/src/main/compose/common/s3a-test.sh       | 12 ++++
 hadoop-ozone/ozonefs-hadoop2/pom.xml               |  1 +
 hadoop-ozone/pom.xml                               |  7 ---
 pom.xml                                            |  3 +-
 10 files changed, 107 insertions(+), 101 deletions(-)

diff --git a/.github/actions/setup-java-with-cache/action.yml 
b/.github/actions/setup-java-with-cache/action.yml
index 39d119bc81d..4598b1c728e 100644
--- a/.github/actions/setup-java-with-cache/action.yml
+++ b/.github/actions/setup-java-with-cache/action.yml
@@ -58,8 +58,15 @@ runs:
     - name: Calculate cache key
       id: cache-key
       shell: bash
-      run: |
-        echo "value=maven-repo-${{ hashFiles('**/pom.xml', 
'.mvn/extensions.xml', '.mvn/wrapper/maven-wrapper.properties') }}" >> 
"$GITHUB_OUTPUT"
+      run: >
+        echo "value=maven-repo-${{ hashFiles(
+            '**/pom.xml',
+            '.mvn/extensions.xml',
+            '.mvn/wrapper/maven-wrapper.properties',
+            'dev-support/ci/populate-cache.sh'
+        ) }}-$JAVA_VERSION" >> "$GITHUB_OUTPUT"
+      env:
+        JAVA_VERSION: ${{ inputs.java-version }}
 
     - name: Remove any leftover Maven repo
       id: cleanup
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
index 6e05b867949..6f3b0cf2b21 100644
--- a/.github/workflows/check.yml
+++ b/.github/workflows/check.yml
@@ -247,6 +247,15 @@ jobs:
           path: ~/.cache/ozone
           key: hadoop-${{ env.HADOOP_VERSION }}
 
+      - name: Restore Hadoop AWS dependencies
+        id: restore-hadoop-deps
+        # TODO reduce hard-code in HDDS-17509
+        if: ${{ inputs.script == 'acceptance' && contains(inputs.split, 
'test-s3a.sh') }}
+        uses: apache/infrastructure-actions/stash/restore@restore/v1
+        with:
+          path: ~/.cache/ozone/maven-repo
+          key: hadoop-${{ env.HADOOP_VERSION }}-deps
+
       - name: Restore Ranger
         id: restore-ranger
         # TODO reduce hard-code in HDDS-17509
diff --git a/.github/workflows/populate-cache.yml 
b/.github/workflows/populate-cache.yml
index 040408994e2..46103836ab8 100644
--- a/.github/workflows/populate-cache.yml
+++ b/.github/workflows/populate-cache.yml
@@ -24,6 +24,7 @@ on:
     paths:
       - 'pom.xml'
       - '**/pom.xml'
+      - 'dev-support/ci/populate-cache.sh'
       - '.github/actions/setup-java-with-cache/action.yml'
       - '.github/workflows/populate-cache.yml'
       - '.mvn/extensions.xml'
@@ -62,16 +63,15 @@ jobs:
           java-version: ${{ env.TEST_JAVA_VERSION }}
           only-exact-hit: true
 
-      - name: Fetch plugin dependencies
+      - name: Fetch dependencies
         if: steps.restore-cache.outputs.cache-hit != 'true'
-        run: ./mvnw $MAVEN_ARGS --no-transfer-progress --show-version 
dependency:resolve-plugins
+        run: |
+          dev-support/ci/populate-cache.sh
 
       - name: Get versions
         id: versions
         run: |
           source hadoop-ozone/dev-support/checks/_lib.sh
-          NODEJS_VERSION=$(get_version nodejs)
-          echo "NODEJS_VERSION=$NODEJS_VERSION" >> $GITHUB_ENV
           HADOOP_VERSION=$(get_version hadoop)
           echo "HADOOP_VERSION=$HADOOP_VERSION" >> $GITHUB_ENV
           RANGER_VERSION=$(get_version ranger)
@@ -101,6 +101,30 @@ jobs:
           key: hadoop-${{ env.HADOOP_VERSION }}
           retention-days: 90
 
+      - name: Restore Hadoop AWS dependencies
+        id: restore-hadoop-deps
+        uses: apache/infrastructure-actions/stash/restore@restore/v1
+        with:
+          path: ~/.cache/ozone/maven-repo
+          key: hadoop-${{ env.HADOOP_VERSION }}-deps
+
+      - name: Fetch Hadoop AWS dependencies
+        if: steps.restore-hadoop-deps.outputs.stash-hit != 'true'
+        run: |
+          # create custom local repo dir for Hadoop AWS dependencies
+          mkdir -p ~/.cache/ozone/maven-repo
+          bash hadoop-ozone/dist/src/main/compose/ozone/test-s3a.sh
+        env:
+          BUILD_ONLY: true
+
+      - name: Stash Hadoop AWS dependencies
+        if: steps.restore-hadoop-deps.outputs.stash-hit != 'true'
+        uses: apache/infrastructure-actions/stash/save@save/v1
+        with:
+          path: ~/.cache/ozone/maven-repo
+          key: hadoop-${{ env.HADOOP_VERSION }}-deps
+          retention-days: 90
+
       - name: Restore Ranger
         id: restore-ranger
         uses: apache/infrastructure-actions/stash/restore@restore/v1
@@ -126,22 +150,6 @@ jobs:
           key: ranger-${{ env.RANGER_VERSION }}
           retention-days: 90
 
-      - name: Restore NodeJS tarballs
-        id: restore-nodejs
-        if: steps.restore-cache.outputs.cache-hit != 'true'
-        uses: actions/cache@v6
-        with:
-          path: ~/.m2/repository/com/github/eirslett/node
-          key: nodejs-${{ env.NODEJS_VERSION }}
-
-      - name: Download NodeJS
-        if: steps.restore-cache.outputs.cache-hit != 'true' && 
steps.restore-nodejs.outputs.cache-hit != 'true'
-        run: dev-support/ci/download-nodejs.sh
-
-      - name: Fetch dependencies
-        if: steps.restore-cache.outputs.cache-hit != 'true'
-        run: ./mvnw $BUILD_ARGS $MAVEN_ARGS --no-transfer-progress 
--show-version -Pgo-offline clean verify
-
       - name: Delete Ozone jars from repo
         if: steps.restore-cache.outputs.cache-hit != 'true'
         run: rm -fr ~/.m2/repository/org/apache/ozone
diff --git a/dev-support/ci/download-nodejs.sh 
b/dev-support/ci/download-nodejs.sh
deleted file mode 100755
index 53561f87ba7..00000000000
--- a/dev-support/ci/download-nodejs.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/env bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-# This script gets a list of the changed files from git, and matches
-# that list against a set of regexes, each of which corresponds to a
-# test group.  For each set of matches, a flag is set to let github
-# actions know to run that test group.
-
-# Downloads Node.js for multiple platforms (Linux, Mac)
-
-set -u -o pipefail
-
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-cd "${DIR}/../.." || exit 1
-
-: ${REPO_DIR:="${HOME}/.m2/repository"}
-
-mkdir -p "${REPO_DIR}"
-
-declare -i rc=1
-
-if [[ -z "${NODEJS_VERSION:-}" ]]; then
-  source hadoop-ozone/dev-support/checks/_lib.sh
-  NODEJS_VERSION=$(get_version nodejs)
-fi
-
-if [[ -n "${NODEJS_VERSION}" ]]; then
-  rc=0
-  for platform in darwin-x64 linux-x64; do
-    
url="https://nodejs.org/dist/v${NODEJS_VERSION}/node-v${NODEJS_VERSION}-${platform}.tar.gz";
-    
output="${REPO_DIR}/com/github/eirslett/node/${NODEJS_VERSION}/node-${NODEJS_VERSION}-${platform}.tar.gz"
-    mkdir -pv "$(dirname "${output}")"
-
-    irc=1
-    for i in 1 2 3; do
-      echo "Downloading ${url}, attempt ${i}"
-      if curl --location --continue-at - -o "${output}" "${url}"; then
-        irc=0
-        break
-      fi
-      sleep 2
-    done
-
-    if [[ ${rc} -eq 0 ]]; then
-      rc=${irc}
-    fi
-  done
-fi
-
-exit ${rc}
diff --git a/dev-support/ci/populate-cache.sh b/dev-support/ci/populate-cache.sh
new file mode 100755
index 00000000000..5a4a85c3956
--- /dev/null
+++ b/dev-support/ci/populate-cache.sh
@@ -0,0 +1,39 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Fetches Ozone build and runtime dependencies.
+
+set -e -u -o pipefail
+
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+cd "$DIR/../.." || exit 1
+
+# fetch plugins, even if not part of normal build
+./mvnw --batch-mode --show-version dependency:resolve-plugins help:help "$@"
+
+# install, but skip shaded modules
+./mvnw --batch-mode --show-version clean install \
+  -DskipShade -Pgo-offline ${BUILD_ARGS:-} "$@"
+
+# no shading
+hadoop-ozone/dev-support/checks/_build.sh compile cyclonedx:makeBom \
+  -pl :ozone-filesystem-shaded,:ozone-filesystem-hadoop2 \
+  -Dmaven-replacer-plugin.skip "$@"
+
+# exercise some checks on limited modules to get more dependencies
+hadoop-ozone/dev-support/checks/errorprone.sh -pl :ozone-main "$@" || true
+hadoop-ozone/dev-support/checks/pmd.sh -am -pl :ozone-dev-support "$@" || true
+hadoop-ozone/dev-support/checks/repro.sh -pl :ozone-main "$@" || true
diff --git a/hadoop-ozone/dev-support/checks/_lib.sh 
b/hadoop-ozone/dev-support/checks/_lib.sh
index 00078b35f7c..329af20184f 100644
--- a/hadoop-ozone/dev-support/checks/_lib.sh
+++ b/hadoop-ozone/dev-support/checks/_lib.sh
@@ -103,12 +103,14 @@ get_version() {
   local tempfile=$(mktemp)
   local -i rc=0
 
-  # output version/transfer etc. to stderr first
-  ./mvnw --batch-mode --non-recursive --show-version \
-      help:evaluate -Dexpression="${dep}.version" -Doutput="${tempfile}" \
-      -Dscan=false "$@" >&2 \
-    && cat "${tempfile}" \
-    || rc=$?
+  local opts="--batch-mode --non-recursive --show-version -Dscan=false 
help:evaluate"
+
+  if ./mvnw --offline $opts -Dexpression="${dep}.version" 
-Doutput="${tempfile}" "$@" >&2 \
+    || ./mvnw $opts -Dexpression="${dep}.version" -Doutput="${tempfile}" "$@" 
>&2; then
+    cat "${tempfile}"
+  else
+    rc=1
+  fi
 
   rm -f "${tempfile}"
   return ${rc}
diff --git a/hadoop-ozone/dist/src/main/compose/common/s3a-test.sh 
b/hadoop-ozone/dist/src/main/compose/common/s3a-test.sh
index bf29e0f0cf1..294323713c9 100644
--- a/hadoop-ozone/dist/src/main/compose/common/s3a-test.sh
+++ b/hadoop-ozone/dist/src/main/compose/common/s3a-test.sh
@@ -48,6 +48,18 @@ if ! download_hadoop_aws; then
   exit 1
 fi
 
+if [[ "${CI:-}" == "true" ]] && [[ -d "${DOWNLOAD_DIR}/maven-repo" ]]; then
+  # custom local repo for Hadoop AWS dependencies
+  MAVEN_ARGS="${MAVEN_ARGS:-} -Dmaven.repo.local=${DOWNLOAD_DIR}/maven-repo"
+fi
+
+if [[ "${BUILD_ONLY:-}" == "true" ]]; then
+  cd "${HADOOP_AWS_DIR}"
+  mvn ${MAVEN_ARGS:-} --show-version -Dtest=ITestS3AContractContentSummary 
clean test
+  echo "[INFO] Skip S3A tests"
+  exit 0
+fi
+
 ## @description Run S3A contract tests against Ozone.
 ## @param       Ozone S3 bucket
 execute_s3a_tests() {
diff --git a/hadoop-ozone/ozonefs-hadoop2/pom.xml 
b/hadoop-ozone/ozonefs-hadoop2/pom.xml
index f454664c6d1..c62eada2b59 100644
--- a/hadoop-ozone/ozonefs-hadoop2/pom.xml
+++ b/hadoop-ozone/ozonefs-hadoop2/pom.xml
@@ -195,6 +195,7 @@
             </goals>
             <phase>process-sources</phase>
             <configuration>
+              <skip>${maven-replacer-plugin.skip}</skip>
               <basedir>${project.basedir}/target/generated-sources</basedir>
               <includes>
                 <include>**/*.java</include>
diff --git a/hadoop-ozone/pom.xml b/hadoop-ozone/pom.xml
index 0109eee20d1..17d81189e6b 100644
--- a/hadoop-ozone/pom.xml
+++ b/hadoop-ozone/pom.xml
@@ -125,13 +125,6 @@
         <module>ozonefs-shaded</module>
       </modules>
     </profile>
-    <profile>
-      <id>go-offline</id>
-      <modules>
-        <module>ozonefs-hadoop2</module>
-        <module>ozonefs-shaded</module>
-      </modules>
-    </profile>
     <profile>
       <id>CI</id>
       <modules>
diff --git a/pom.xml b/pom.xml
index 25ad1409398..6609c71ad7f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -146,6 +146,7 @@
     <maven-javadoc-plugin.version>3.12.0</maven-javadoc-plugin.version>
     <maven-patch-plugin.version>1.3</maven-patch-plugin.version>
     
<maven-remote-resources-plugin.version>3.3.0</maven-remote-resources-plugin.version>
+    <maven-replacer-plugin.skip>false</maven-replacer-plugin.skip>
     <maven-replacer-plugin.version>1.5.3</maven-replacer-plugin.version>
     <maven-resources-plugin.version>3.5.0</maven-resources-plugin.version>
     <maven-shade-plugin.version>3.6.2</maven-shade-plugin.version>
@@ -3053,12 +3054,10 @@
     <profile>
       <id>go-offline</id>
       <properties>
-        <cyclonedx.skip>true</cyclonedx.skip>
         <enforcer.skip>true</enforcer.skip>
         <jacoco.skip>true</jacoco.skip>
         <maven.javadoc.skip>true</maven.javadoc.skip>
         <mdep.analyze.skip>true</mdep.analyze.skip>
-        <skip.installnodepnpm>true</skip.installnodepnpm>
         <skip.pnpm>true</skip.pnpm>
         <test>void</test>
       </properties>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to