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 c06691f47b HDDS-9301. Fail checks in Summary step instead of Test
(#5346)
c06691f47b is described below
commit c06691f47bd0c50a1652883c287058c7622b851a
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Tue Sep 26 13:05:57 2023 +0200
HDDS-9301. Fail checks in Summary step instead of Test (#5346)
---
.github/workflows/ci.yml | 16 +++++++----
hadoop-ozone/dev-support/checks/_summary.sh | 41 +++++++++++++++++++++++++++++
2 files changed, 52 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ab3c75ee86..70cc3e1e06 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -204,8 +204,9 @@ jobs:
java-version: 8
- name: Execute tests
run: hadoop-ozone/dev-support/checks/${{ matrix.check }}.sh
+ continue-on-error: true
- name: Summary of failures
- run: cat target/${{ matrix.check }}/summary.txt
+ run: hadoop-ozone/dev-support/checks/_summary.sh target/${{
matrix.check }}/summary.txt
if: ${{ !cancelled() }}
- name: Archive build results
uses: actions/upload-artifact@v3
@@ -250,8 +251,9 @@ jobs:
java-version: 8
- name: Execute tests
run: hadoop-ozone/dev-support/checks/${{ matrix.check }}.sh
+ continue-on-error: true
- name: Summary of failures
- run: cat target/${{ matrix.check }}/summary.txt
+ run: hadoop-ozone/dev-support/checks/_summary.sh target/${{
matrix.check }}/summary.txt
if: ${{ !cancelled() }}
dependency:
needs:
@@ -316,8 +318,9 @@ jobs:
KEEP_IMAGE: false
OZONE_ACCEPTANCE_SUITE: ${{ matrix.suite }}
OZONE_VOLUME_OWNER: 1000
+ continue-on-error: true
- name: Summary of failures
- run: cat target/${{ github.job }}/summary.txt
+ run: hadoop-ozone/dev-support/checks/_summary.sh target/${{ github.job
}}/summary.txt
if: ${{ !cancelled() }}
- name: Archive build results
uses: actions/upload-artifact@v3
@@ -351,8 +354,9 @@ jobs:
sudo mkdir .aws && sudo chmod 777 .aws && sudo chown 1000 .aws
popd
./hadoop-ozone/dev-support/checks/kubernetes.sh
+ continue-on-error: true
- name: Summary of failures
- run: cat target/${{ github.job }}/summary.txt
+ run: hadoop-ozone/dev-support/checks/_summary.sh target/${{ github.job
}}/summary.txt
if: ${{ !cancelled() }}
- name: Archive build results
uses: actions/upload-artifact@v3
@@ -402,11 +406,13 @@ jobs:
- name: Execute tests
run: hadoop-ozone/dev-support/checks/integration.sh -P${{
matrix.profile }}
if: matrix.profile != 'flaky'
+ continue-on-error: true
- name: Execute flaky tests
run: hadoop-ozone/dev-support/checks/integration.sh -P${{
matrix.profile }} -Dsurefire.rerunFailingTestsCount=5
-Dsurefire.fork.timeout=3600
if: matrix.profile == 'flaky'
+ continue-on-error: true
- name: Summary of failures
- run: cat target/${{ github.job }}/summary.txt
+ run: hadoop-ozone/dev-support/checks/_summary.sh target/${{ github.job
}}/summary.txt
if: ${{ !cancelled() }}
- name: Archive build results
uses: actions/upload-artifact@v3
diff --git a/hadoop-ozone/dev-support/checks/_summary.sh
b/hadoop-ozone/dev-support/checks/_summary.sh
new file mode 100755
index 0000000000..f8c7bb942c
--- /dev/null
+++ b/hadoop-ozone/dev-support/checks/_summary.sh
@@ -0,0 +1,41 @@
+#!/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.
+
+REPORT_FILE="$1"
+
+: ${ITERATIONS:="1"}
+
+declare -i ITERATIONS
+
+rc=0
+
+if [[ ! -e "${REPORT_FILE}" ]]; then
+ echo "Report file missing, check logs for details"
+ rc=255
+
+elif [[ ${ITERATIONS} -gt 1 ]]; then
+ cat "${REPORT_FILE}"
+
+ if grep -q 'exit code: [^0]' "${REPORT_FILE}"; then
+ rc=1
+ fi
+
+elif [[ -s "${REPORT_FILE}" ]]; then
+ cat "${REPORT_FILE}"
+ rc=1
+fi
+
+exit ${rc}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]