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 fe5b917448 HDDS-9332. Handle empty unit check (#5336)
fe5b917448 is described below
commit fe5b9174485166cfd80da1f74505942110c0cdf7
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Tue Sep 26 09:36:08 2023 +0200
HDDS-9332. Handle empty unit check (#5336)
---
.github/workflows/ci.yml | 11 ++++++-----
dev-support/ci/categorize_basic_checks.sh | 10 +++++++++-
dev-support/ci/selective_ci_checks.sh | 3 ---
3 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ddf07a37ea..ab3c75ee86 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -26,9 +26,10 @@ jobs:
GITHUB_CONTEXT: ${{ toJson(github) }}
outputs:
acceptance-suites: ${{ steps.acceptance-suites.outputs.suites }}
- needs-basic-checks: ${{
steps.selective-checks.outputs.needs-basic-checks }}
+ needs-basic-check: ${{
steps.categorize-basic-checks.outputs.needs-basic-check }}
+ needs-unit-check: ${{
steps.categorize-basic-checks.outputs.needs-unit-check }}
basic-checks: ${{ steps.categorize-basic-checks.outputs.basic-checks }}
- basic-unit: ${{ steps.categorize-basic-checks.outputs.basic-unit }}
+ unit-checks: ${{ steps.categorize-basic-checks.outputs.unit-checks }}
needs-build: ${{ steps.selective-checks.outputs.needs-build }}
needs-compile: ${{ steps.selective-checks.outputs.needs-compile }}
needs-compose-tests: ${{
steps.selective-checks.outputs.needs-compose-tests }}
@@ -172,7 +173,7 @@ jobs:
- build-info
runs-on: ubuntu-20.04
timeout-minutes: 90
- if: needs.build-info.outputs.needs-basic-checks == 'true'
+ if: needs.build-info.outputs.needs-basic-check == 'true'
strategy:
matrix:
check: ${{ fromJson(needs.build-info.outputs.basic-checks) }}
@@ -225,10 +226,10 @@ jobs:
- basic
runs-on: ubuntu-20.04
timeout-minutes: 90
- if: needs.build-info.outputs.needs-basic-checks == 'true'
+ if: needs.build-info.outputs.needs-unit-check == 'true'
strategy:
matrix:
- check: ${{ fromJson(needs.build-info.outputs.basic-unit) }}
+ check: ${{ fromJson(needs.build-info.outputs.unit-checks) }}
fail-fast: false
steps:
- name: Checkout project
diff --git a/dev-support/ci/categorize_basic_checks.sh
b/dev-support/ci/categorize_basic_checks.sh
index d2beba5ed2..d32fe169a2 100755
--- a/dev-support/ci/categorize_basic_checks.sh
+++ b/dev-support/ci/categorize_basic_checks.sh
@@ -36,20 +36,28 @@ UNIT_CHECKS=$(grep -lr '^#checks:unit'
hadoop-ozone/dev-support/checks \
if [[ -n "${SPACE_DELIMITED_ALL_CHECKS}" ]]; then
SPACE_DELIMITED_ALL_CHECKS=" ${SPACE_DELIMITED_ALL_CHECKS[*]} " # add
framing blanks
+ basic=()
for item in ${BASIC_CHECKS[@]}; do
if [[ $SPACE_DELIMITED_ALL_CHECKS =~ " $item " ]] ; then # use
$item as regexp
basic+=($item)
fi
done
+ if [[ -n "${basic[@]}" ]]; then
+ initialization::ga_output needs-basic-check "true"
+ fi
initialization::ga_output basic-checks \
"$(initialization::parameters_to_json ${basic[@]})"
+ unit=()
for item in ${UNIT_CHECKS[@]}; do
if [[ $SPACE_DELIMITED_ALL_CHECKS =~ " $item " ]] ; then # use $item
as regexp
unit+=($item)
fi
done
- initialization::ga_output basic-unit \
+ if [[ -n "${unit[@]}" ]]; then
+ initialization::ga_output needs-unit-check "true"
+ fi
+ initialization::ga_output unit-checks \
"$(initialization::parameters_to_json ${unit[@]})"
fi
diff --git a/dev-support/ci/selective_ci_checks.sh
b/dev-support/ci/selective_ci_checks.sh
index c2e60b61ea..7527c7a624 100755
--- a/dev-support/ci/selective_ci_checks.sh
+++ b/dev-support/ci/selective_ci_checks.sh
@@ -551,9 +551,6 @@ function calculate_test_types_to_run() {
function set_outputs() {
# print results outside the group to increase visibility
- if [[ -n "${BASIC_CHECKS}" ]]; then
- initialization::ga_output needs-basic-checks "true"
- fi
initialization::ga_output basic-checks \
"$(initialization::parameters_to_json ${BASIC_CHECKS})"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]