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 531216c2f9 HDDS-10598. Rename unit check to native (#6521)
531216c2f9 is described below

commit 531216c2f98d3181eea00f49d153d1d5fd2eba5f
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Mon Apr 15 20:10:31 2024 +0200

    HDDS-10598. Rename unit check to native (#6521)
---
 .github/workflows/ci.yml                  | 21 +++++--------
 dev-support/ci/categorize_basic_checks.sh | 49 ++++++++++++-------------------
 hadoop-ozone/dev-support/checks/native.sh |  2 +-
 3 files changed, 28 insertions(+), 44 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index e4c9431caa..f7c3225ced 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -27,9 +27,8 @@ jobs:
     outputs:
       acceptance-suites: ${{ steps.acceptance-suites.outputs.suites }}
       needs-basic-check: ${{ 
steps.categorize-basic-checks.outputs.needs-basic-check }}
-      needs-unit-check: ${{ 
steps.categorize-basic-checks.outputs.needs-unit-check }}
+      needs-native-check: ${{ 
steps.categorize-basic-checks.outputs.needs-native-check }}
       basic-checks: ${{ steps.categorize-basic-checks.outputs.basic-checks }}
-      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 }}
@@ -228,17 +227,13 @@ jobs:
           name: ${{ matrix.check }}
           path: target/${{ matrix.check }}
         continue-on-error: true
-  unit:
+  native:
     needs:
       - build-info
       - basic
     runs-on: ubuntu-20.04
     timeout-minutes: 150
-    if: needs.build-info.outputs.needs-unit-check == 'true'
-    strategy:
-      matrix:
-        check: ${{ fromJson(needs.build-info.outputs.unit-checks) }}
-      fail-fast: false
+    if: needs.build-info.outputs.needs-native-check == 'true'
     steps:
       - name: Checkout project
         uses: actions/checkout@v4
@@ -257,19 +252,19 @@ jobs:
           distribution: 'temurin'
           java-version: 8
       - name: Execute tests
-        run: hadoop-ozone/dev-support/checks/${{ matrix.check }}.sh
+        run: hadoop-ozone/dev-support/checks/${{ github.job }}.sh
         continue-on-error: true
         env:
           GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
       - name: Summary of failures
-        run: hadoop-ozone/dev-support/checks/_summary.sh target/${{ 
matrix.check }}/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@v4
         if: ${{ !cancelled() }}
         with:
-          name: ${{ matrix.check }}
-          path: target/${{ matrix.check }}
+          name: ${{ github.job }}
+          path: target/${{ github.job }}
         continue-on-error: true
   dependency:
     needs:
@@ -499,9 +494,9 @@ jobs:
     timeout-minutes: 30
     if: github.repository == 'apache/ozone' && github.event_name != 
'pull_request'
     needs:
-      - unit
       - acceptance
       - integration
+      - native
     steps:
       - name: Checkout project
         uses: actions/checkout@v4
diff --git a/dev-support/ci/categorize_basic_checks.sh 
b/dev-support/ci/categorize_basic_checks.sh
index d32fe169a2..9b4adf2640 100755
--- a/dev-support/ci/categorize_basic_checks.sh
+++ b/dev-support/ci/categorize_basic_checks.sh
@@ -26,38 +26,27 @@ ALL_BASIC_CHECKS="${ALL_BASIC_CHECKS[@]%\]}"
 # Replace commas with spaces to form a space-delimited list
 SPACE_DELIMITED_ALL_CHECKS=$(echo "$ALL_BASIC_CHECKS" | tr -d '"' | tr ',' ' ')
 
-BASIC_CHECKS=$(grep -lr '^#checks:basic' hadoop-ozone/dev-support/checks \
-                       | sort -u | xargs -n1 basename \
-                       | cut -f1 -d'.')
-
-UNIT_CHECKS=$(grep -lr '^#checks:unit' hadoop-ozone/dev-support/checks \
-                       | sort -u | xargs -n1 basename \
-                       | cut -f1 -d'.')
-
 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)
+  # add framing blanks
+  SPACE_DELIMITED_ALL_CHECKS=" ${SPACE_DELIMITED_ALL_CHECKS[*]} "
+
+  for check in basic native; do
+    CHECKS=$(grep -lr "^#checks:${check}$" hadoop-ozone/dev-support/checks \
+      | sort -u \
+      | xargs -n1 basename \
+      | cut -f1 -d'.')
+
+    check_list=()
+    for item in ${CHECKS[@]}; do
+      # use $item as regex
+      if [[ $SPACE_DELIMITED_ALL_CHECKS =~ " $item " ]] ; then
+        check_list+=($item)
       fi
     done
-    if [[ -n "${basic[@]}" ]]; then
-        initialization::ga_output needs-basic-check "true"
+    if [[ -n "${check_list[@]}" ]]; then
+      initialization::ga_output "needs-${check}-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
-    if [[ -n "${unit[@]}" ]]; then
-        initialization::ga_output needs-unit-check "true"
-    fi
-    initialization::ga_output unit-checks \
-        "$(initialization::parameters_to_json ${unit[@]})"
+    initialization::ga_output "${check}-checks" \
+      "$(initialization::parameters_to_json ${check_list[@]})"
+  done
 fi
-
diff --git a/hadoop-ozone/dev-support/checks/native.sh 
b/hadoop-ozone/dev-support/checks/native.sh
index 89206b3bdf..bdeb138681 100755
--- a/hadoop-ozone/dev-support/checks/native.sh
+++ b/hadoop-ozone/dev-support/checks/native.sh
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#checks:unit
+#checks:native
 
 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
 CHECK=native


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

Reply via email to