From a58a717014a260b2d2f0b030b8ea8c48e43efd4a Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" Date: Thu, 19 Jun 2025 09:17:50 +0200 Subject: [PATCH 1/4] catch missing output.log --- hadoop-ozone/dev-support/checks/_post_process.sh | 10 +++++++++- hadoop-ozone/dev-support/checks/rat.sh | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hadoop-ozone/dev-support/checks/_post_process.sh b/hadoop-ozone/dev-support/checks/_post_process.sh index 7501050f34f8..b455117d04c0 100644 --- a/hadoop-ozone/dev-support/checks/_post_process.sh +++ b/hadoop-ozone/dev-support/checks/_post_process.sh @@ -26,10 +26,18 @@ # - $REPORT_FILE should be defined # - Maven output should be saved in $REPORT_DIR/output.log +if [[ ! -d "${REPORT_DIR}" ]]; then + mkdir -p "${REPORT_DIR}" +fi + if [[ ! -s "${REPORT_FILE}" ]]; then # check if there are errors in the log if [[ -n "${ERROR_PATTERN:-}" ]]; then - grep -m25 "${ERROR_PATTERN}" "${REPORT_DIR}/output.log" > "${REPORT_FILE}" + if [[ -e "${REPORT_DIR}/output.log" ]]; then + grep -m25 "${ERROR_PATTERN}" "${REPORT_DIR}/output.log" > "${REPORT_FILE}" + else + echo "Unknown failure, output.log missing" > "${REPORT_FILE}" + fi fi # script failed, but report file is empty (does not reflect failure) if [[ ${rc} -ne 0 ]] && [[ ! -s "${REPORT_FILE}" ]]; then diff --git a/hadoop-ozone/dev-support/checks/rat.sh b/hadoop-ozone/dev-support/checks/rat.sh index 3582587f8da4..1a9932e1e157 100755 --- a/hadoop-ozone/dev-support/checks/rat.sh +++ b/hadoop-ozone/dev-support/checks/rat.sh @@ -24,7 +24,8 @@ mkdir -p "$REPORT_DIR" REPORT_FILE="$REPORT_DIR/summary.txt" -mvn -B --no-transfer-progress -fn org.apache.rat:apache-rat-plugin:check "$@" +mvn -B --no-transfer-progress -fn org.apache.rat:apache-rat-plugin:check "$@" \ + | tee "${REPORT_DIR}/output.log" grep -r --include=rat.txt "!????" $dirs | tee "$REPORT_FILE" From c6bce01ff2ed486068e3710e2d547827f673e65b Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" Date: Thu, 19 Jun 2025 09:14:03 +0200 Subject: [PATCH 2/4] HDDS-13296. Integration check always passes due to missing output --- hadoop-ozone/dev-support/checks/junit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-ozone/dev-support/checks/junit.sh b/hadoop-ozone/dev-support/checks/junit.sh index ce93510f1f3e..23623045ada4 100755 --- a/hadoop-ozone/dev-support/checks/junit.sh +++ b/hadoop-ozone/dev-support/checks/junit.sh @@ -68,7 +68,7 @@ for i in $(seq 1 ${ITERATIONS}); do mkdir -p "${REPORT_DIR}" fi - mvn ${MAVEN_OPTIONS} -Dmaven-surefire-plugin.argLineAccessArgs="${OZONE_MODULE_ACCESS_ARGS}" "$@" clean verify \ + mvn ${MAVEN_OPTIONS} -Dmaven-surefire-plugin.argLineAccessArgs="${OZONE_MODULE_ACCESS_ARGS}" "$@" verify \ | tee "${REPORT_DIR}/output.log" irc=$? From 6921d21414ff95f840a7899898e431b0fc06958d Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" Date: Thu, 19 Jun 2025 09:29:40 +0200 Subject: [PATCH 3/4] fix error pattern (BUILD FAILURE cannot happen due to --fail-never) --- hadoop-ozone/dev-support/checks/junit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-ozone/dev-support/checks/junit.sh b/hadoop-ozone/dev-support/checks/junit.sh index 23623045ada4..3e6538b506c8 100755 --- a/hadoop-ozone/dev-support/checks/junit.sh +++ b/hadoop-ozone/dev-support/checks/junit.sh @@ -107,5 +107,5 @@ if [[ "${OZONE_WITH_COVERAGE}" == "true" ]]; then mvn -B -N jacoco:merge -Djacoco.destFile=$REPORT_DIR/jacoco-combined.exec -Dscan=false fi -ERROR_PATTERN="BUILD FAILURE" +ERROR_PATTERN="\[ERROR\]" source "${DIR}/_post_process.sh" From f231bc080cfe67deecc4e1651c49057e292dddaf Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" Date: Thu, 19 Jun 2025 11:41:35 +0200 Subject: [PATCH 4/4] fixup for HDDS-12977 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04c944c9b4a5..d53cf9bb91e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: integration-suites: ${{ steps.integration-suites.outputs.suites }} needs-basic-check: ${{ steps.categorize-basic-checks.outputs.needs-basic-check }} basic-checks: ${{ steps.categorize-basic-checks.outputs.basic-checks }} - needs-build: ${{ steps.selective-checks.outputs.needs-build }} + needs-build: ${{ steps.selective-checks.outputs.needs-build || steps.selective-checks.outputs.needs-integration-tests }} needs-compile: ${{ steps.selective-checks.outputs.needs-compile }} needs-compose-tests: ${{ steps.selective-checks.outputs.needs-compose-tests }} needs-integration-tests: ${{ steps.selective-checks.outputs.needs-integration-tests }}