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 31ffdd1d43e HDDS-16714. Split kubernetes check by environment (#11406)
31ffdd1d43e is described below
commit 31ffdd1d43e9d05ba374ee60d71e706fb29754c9
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Wed Oct 7 18:47:28 2026 +0200
HDDS-16714. Split kubernetes check by environment (#11406)
---
.github/workflows/ci.yml | 12 +++++++++-
dev-support/ci/kubernetes_suites.sh | 26 ++++++++++++++++++++++
hadoop-ozone/dev-support/checks/kubernetes.sh | 7 ++++++
hadoop-ozone/dist/src/main/k8s/examples/testlib.sh | 14 ------------
4 files changed, 44 insertions(+), 15 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 66e32c01582..02bbff46721 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -58,6 +58,7 @@ jobs:
acceptance-suites: ${{ steps.acceptance-suites.outputs.suites }}
test-classes: ${{ steps.selective-checks.outputs.test-classes }}
integration-suites: ${{ steps.integration-suites.outputs.suites }}
+ kubernetes-suites: ${{ steps.kubernetes-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 }}
@@ -117,6 +118,9 @@ jobs:
- name: Integration suites
id: integration-suites
run: dev-support/ci/integration_suites.sh
+ - name: Kubernetes suites
+ id: kubernetes-suites
+ run: dev-support/ci/kubernetes_suites.sh
- name: Categorize Basic Checks
id: categorize-basic-checks
env:
@@ -341,9 +345,15 @@ jobs:
needs-ozone-binary-tarball: true
ratis-args: ${{ inputs.ratis_args }}
script: kubernetes
+ script-args: ${{ matrix.suite }}
sha: ${{ needs.build-info.outputs.sha }}
- timeout-minutes: 60
+ split: ${{ matrix.suite }}
+ timeout-minutes: 10
with-coverage: ${{ fromJSON(needs.build-info.outputs.with-coverage) }}
+ strategy:
+ matrix:
+ suite: ${{ fromJson(needs.build-info.outputs.kubernetes-suites) }}
+ fail-fast: false
integration:
needs:
diff --git a/dev-support/ci/kubernetes_suites.sh
b/dev-support/ci/kubernetes_suites.sh
new file mode 100755
index 00000000000..8e4ddf85308
--- /dev/null
+++ b/dev-support/ci/kubernetes_suites.sh
@@ -0,0 +1,26 @@
+#!/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.
+
+# shellcheck source=dev-support/ci/lib/_script_init.sh
+. dev-support/ci/lib/_script_init.sh
+
+cd hadoop-ozone/dist/src/main/k8s/examples
+SUITES=$(find * -name test.sh | sort -u | cut -f1 -d'/')
+
+initialization::ga_output suites \
+ "$(initialization::parameters_to_json ${SUITES})"
diff --git a/hadoop-ozone/dev-support/checks/kubernetes.sh
b/hadoop-ozone/dev-support/checks/kubernetes.sh
index 8a7de14cabe..e3407d356f9 100755
--- a/hadoop-ozone/dev-support/checks/kubernetes.sh
+++ b/hadoop-ozone/dev-support/checks/kubernetes.sh
@@ -21,6 +21,13 @@ cd "$DIR/../../.." || exit 1
OZONE_ROOT=$(pwd -P)
+: ${OZONE_KUBERNETES_SUITE:="${1:-}"}
+: ${OZONE_TEST_SELECTOR:=""}
+
+if [[ -n "${OZONE_KUBERNETES_SUITE}" ]] && [[ -z "${OZONE_TEST_SELECTOR}" ]];
then
+ export OZONE_TEST_SELECTOR="/${OZONE_KUBERNETES_SUITE}/test.sh"
+fi
+
export KUBECONFIG
REPORT_DIR=${OUTPUT_DIR:-"${OZONE_ROOT}/target/kubernetes"}
diff --git a/hadoop-ozone/dist/src/main/k8s/examples/testlib.sh
b/hadoop-ozone/dist/src/main/k8s/examples/testlib.sh
index 685300c22c9..6e9637900fc 100644
--- a/hadoop-ozone/dist/src/main/k8s/examples/testlib.sh
+++ b/hadoop-ozone/dist/src/main/k8s/examples/testlib.sh
@@ -90,22 +90,10 @@ pre_run_setup() {
wait_for_startup
}
-dump_pv_pvc_state() {
- local -r label="${1:-state}"
- echo "===== PV/PVC ${label} ====="
- kubectl get pv,pvc -o wide --all-namespaces 2>&1 || true
- echo "----- PV finalizers / status -----"
- kubectl get pv -o
custom-columns=NAME:.metadata.name,STATUS:.status.phase,CLAIM:.spec.claimRef.name,FINALIZERS:.metadata.finalizers,DELETION:.metadata.deletionTimestamp
2>&1 || true
- echo "----- Recent events (last 30) -----"
- kubectl get events --sort-by=.lastTimestamp --all-namespaces 2>&1 | tail
-30 || true
- echo "===== end ${label} ====="
-}
-
reset_k8s_env() {
print_phase "Deleting existing k8s resources"
#reset environment
local -r DEL_TIMEOUT="${RESET_TIMEOUT:-120s}"
- dump_pv_pvc_state "before delete"
kubectl delete --timeout="$DEL_TIMEOUT" --ignore-not-found statefulset --all
kubectl delete --timeout="$DEL_TIMEOUT" --ignore-not-found daemonset --all
kubectl delete --timeout="$DEL_TIMEOUT" --ignore-not-found deployment --all
@@ -113,9 +101,7 @@ reset_k8s_env() {
kubectl delete --timeout="$DEL_TIMEOUT" --ignore-not-found configmap --all
kubectl delete --timeout="$DEL_TIMEOUT" --ignore-not-found pod --all
kubectl delete --timeout="$DEL_TIMEOUT" --ignore-not-found pvc --all
- dump_pv_pvc_state "after pvc delete"
kubectl delete --timeout="$DEL_TIMEOUT" --ignore-not-found pv --all
- dump_pv_pvc_state "after pv delete"
}
start_k8s_env() {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]