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 e3634e92f46 HDDS-16976. Make integration check cacheable (#11515)
e3634e92f46 is described below

commit e3634e92f4648b75570e6bc0f6efaefa4056f54f
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Thu Oct 15 05:17:14 2026 +0200

    HDDS-16976. Make integration check cacheable (#11515)
    
    Co-authored-by: Siyao Meng <[email protected]>
---
 .github/workflows/intermittent-test-check.yml |  5 +++--
 hadoop-ozone/dev-support/checks/junit.sh      | 32 ++++++++++++++++++++++-----
 2 files changed, 29 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/intermittent-test-check.yml 
b/.github/workflows/intermittent-test-check.yml
index a2fc663dacb..37ecde8614a 100644
--- a/.github/workflows/intermittent-test-check.yml
+++ b/.github/workflows/intermittent-test-check.yml
@@ -213,18 +213,19 @@ jobs:
             hadoop-ozone/dev-support/checks/junit.sh $args 
-Dtest="$TEST_CLASS#$TEST_METHOD,Abstract*Test*\$*"
           fi
         env:
+          CHECK: flaky
           DEVELOCITY_ACCESS_KEY: ${{ secrets.OZONE_DEVELOCITY_ACCESS_KEY }}
           repo_path: ${{ steps.download-ozone-repo.outputs.download-path }}
           ratis_args: ${{ needs.ratis.outputs.build-args }}
       - name: Summary of failures
-        run: hadoop-ozone/dev-support/checks/_summary.sh 
target/unit/summary.txt
+        run: hadoop-ozone/dev-support/checks/_summary.sh 
target/flaky/summary.txt
         if: ${{ failure() }}
       - name: Archive build results
         uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a 
# v7.0.1
         if: ${{ failure() }}
         with:
           name: result-${{ github.run_number }}-${{ github.run_id }}-split-${{ 
matrix.split }}
-          path: target/unit
+          path: target/flaky
   count-failures:
     if: ${{ failure() }}
     needs: run-test
diff --git a/hadoop-ozone/dev-support/checks/junit.sh 
b/hadoop-ozone/dev-support/checks/junit.sh
index 7d01cc66b22..42042bcfff6 100755
--- a/hadoop-ozone/dev-support/checks/junit.sh
+++ b/hadoop-ozone/dev-support/checks/junit.sh
@@ -55,10 +55,27 @@ if [[ -f 
hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh ]]; then
   ozone_java_setup
 fi
 
-mvn ${MAVEN_OPTIONS} clean
+if [[ ${CI:-} != "true" ]]; then
+  # Local run, remove leftover artifacts from all modules
+  mvn ${MAVEN_OPTIONS} -Dscan=false clean
+fi
+
+CLEAN="clean"
+
+if [[ ${ITERATIONS} -gt 1 ]] || [[ ${CHECK} == "flaky" ]]; then
+  if [[ ${OZONE_REPO_CACHED} == "false" ]]; then
+    # Need to build for local run.  In flaky-test-check the jars come from 
separate workflow job.
+    # Test may be limited to specific modules, also build dependencies.
+    # `clean` is included for cacheability.
+    mvn ${MAVEN_OPTIONS} -DskipTests --also-make "$@" clean install
+  fi
+
+  # Keep outputs from previous iterations
+  CLEAN=""
 
-if [[ ${ITERATIONS} -gt 1 ]] && [[ ${OZONE_REPO_CACHED} == "false" ]]; then
-  mvn ${MAVEN_OPTIONS} -DskipTests install
+  # Repeated runs must execute the test, not load it from the build cache
+  MAVEN_OPTIONS="${MAVEN_OPTIONS} -Ddevelocity.cache.local.enabled=false"
+  MAVEN_OPTIONS="${MAVEN_OPTIONS} -Ddevelocity.cache.remote.enabled=false"
 fi
 
 REPORT_DIR=${OUTPUT_DIR:-"$DIR/../../../target/${CHECK}"}
@@ -75,13 +92,16 @@ for i in $(seq 1 ${ITERATIONS}); do
   if [[ ${ITERATIONS} -gt 1 ]]; then
     original_report_dir="${REPORT_DIR}"
     REPORT_DIR="${original_report_dir}/iteration${i}"
-    mkdir -p "${REPORT_DIR}"
   fi
 
-  mvn ${MAVEN_OPTIONS} 
-Dmaven-surefire-plugin.argLineAccessArgs="${OZONE_MODULE_ACCESS_ARGS}" "$@" 
"${PHASE}" \
-      | tee "${REPORT_DIR}/output.log"
+  log=$(mktemp)
+  mvn ${MAVEN_OPTIONS} 
-Dmaven-surefire-plugin.argLineAccessArgs="${OZONE_MODULE_ACCESS_ARGS}" "$@" 
${CLEAN} "${PHASE}" \
+      | tee "${log}"
   irc=$?
 
+  mkdir -p "${REPORT_DIR}"
+  mv -f "${log}" "${REPORT_DIR}"/output.log
+
   # shellcheck source=hadoop-ozone/dev-support/checks/_mvn_unit_report.sh
   source "${DIR}/_mvn_unit_report.sh"
   if [[ ${irc} == 0 ]] && [[ -s "${REPORT_DIR}/summary.txt" ]]; then


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

Reply via email to