From 82f9a484cfd0f0e6abe0701ac8d91a12b0c14719 Mon Sep 17 00:00:00 2001 From: Milind Yadav Date: Thu, 29 May 2025 09:55:46 +0530 Subject: [PATCH 1/2] OCPQE-29735: Adding shard option to actual run command to work test the changes informing main chain as well of the param in the step Update ci-operator/step-registry/openshift-extended/test/openshift-extended-test-ref.yaml Update ci-operator/step-registry/openshift-extended/test/openshift-extended-test-commands.sh Update ci-operator/step-registry/openshift/e2e/test/clusterinfra-qe/openshift-e2e-test-clusterinfra-qe-ref.yaml Co-authored-by: Penghao --- ...shift-machine-api-provider-azure-main.yaml | 1 + ...ne-api-provider-azure-main-presubmits.yaml | 163 +++++++++++++++++- .../test/openshift-extended-test-commands.sh | 4 +- .../test/openshift-extended-test-ref.yaml | 4 + ...penshift-e2e-test-clusterinfra-qe-ref.yaml | 4 + 5 files changed, 171 insertions(+), 5 deletions(-) diff --git a/ci-operator/config/openshift/machine-api-provider-azure/openshift-machine-api-provider-azure-main.yaml b/ci-operator/config/openshift/machine-api-provider-azure/openshift-machine-api-provider-azure-main.yaml index 9278c92161ba2..862b0277a5443 100644 --- a/ci-operator/config/openshift/machine-api-provider-azure/openshift-machine-api-provider-azure-main.yaml +++ b/ci-operator/config/openshift/machine-api-provider-azure/openshift-machine-api-provider-azure-main.yaml @@ -92,6 +92,7 @@ tests: - as: regression-clusterinfra-azure-ipi-mapi optional: true run_if_changed: ^(go\.mod|go\.sum)$ + shard_count: 3 steps: cluster_profile: azure4 env: diff --git a/ci-operator/jobs/openshift/machine-api-provider-azure/openshift-machine-api-provider-azure-main-presubmits.yaml b/ci-operator/jobs/openshift/machine-api-provider-azure/openshift-machine-api-provider-azure-main-presubmits.yaml index 6b18aeb269cd6..ece82722145d3 100644 --- a/ci-operator/jobs/openshift/machine-api-provider-azure/openshift-machine-api-provider-azure-main-presubmits.yaml +++ b/ci-operator/jobs/openshift/machine-api-provider-azure/openshift-machine-api-provider-azure-main-presubmits.yaml @@ -526,7 +526,7 @@ presubmits: - ^main$ - ^main- cluster: build03 - context: ci/prow/regression-clusterinfra-azure-ipi-mapi + context: ci/prow/regression-clusterinfra-azure-ipi-mapi-1of3 decorate: true decoration_config: timeout: 7h0m0s @@ -535,9 +535,9 @@ presubmits: ci-operator.openshift.io/cloud-cluster-profile: azure4 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-machine-api-provider-azure-main-regression-clusterinfra-azure-ipi-mapi + name: pull-ci-openshift-machine-api-provider-azure-main-regression-clusterinfra-azure-ipi-mapi-1of3 optional: true - rerun_command: /test regression-clusterinfra-azure-ipi-mapi + rerun_command: /test regression-clusterinfra-azure-ipi-mapi-1of3 run_if_changed: ^(go\.mod|go\.sum)$ spec: containers: @@ -545,6 +545,7 @@ presubmits: - --gcs-upload-secret=/secrets/gcs/service-account.json - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - --lease-server-credentials-file=/etc/boskos/credentials + - --multi-stage-param=SHARD_ARGS="--shard-count 3 --shard-id 1" - --report-credentials-file=/etc/report/credentials - --secret-dir=/secrets/ci-pull-credentials - --target=regression-clusterinfra-azure-ipi-mapi @@ -595,7 +596,161 @@ presubmits: - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )regression-clusterinfra-azure-ipi-mapi,?($|\s.*) + trigger: (?m)^/test( | .* )regression-clusterinfra-azure-ipi-mapi-1of3,?($|\s.*) + - agent: kubernetes + always_run: false + branches: + - ^main$ + - ^main- + cluster: build03 + context: ci/prow/regression-clusterinfra-azure-ipi-mapi-2of3 + decorate: true + decoration_config: + timeout: 7h0m0s + labels: + ci-operator.openshift.io/cloud: azure4 + ci-operator.openshift.io/cloud-cluster-profile: azure4 + ci.openshift.io/generator: prowgen + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-machine-api-provider-azure-main-regression-clusterinfra-azure-ipi-mapi-2of3 + optional: true + rerun_command: /test regression-clusterinfra-azure-ipi-mapi-2of3 + run_if_changed: ^(go\.mod|go\.sum)$ + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --multi-stage-param=SHARD_ARGS="--shard-count 3 --shard-id 2" + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=regression-clusterinfra-azure-ipi-mapi + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )regression-clusterinfra-azure-ipi-mapi-2of3,?($|\s.*) + - agent: kubernetes + always_run: false + branches: + - ^main$ + - ^main- + cluster: build03 + context: ci/prow/regression-clusterinfra-azure-ipi-mapi-3of3 + decorate: true + decoration_config: + timeout: 7h0m0s + labels: + ci-operator.openshift.io/cloud: azure4 + ci-operator.openshift.io/cloud-cluster-profile: azure4 + ci.openshift.io/generator: prowgen + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-machine-api-provider-azure-main-regression-clusterinfra-azure-ipi-mapi-3of3 + optional: true + rerun_command: /test regression-clusterinfra-azure-ipi-mapi-3of3 + run_if_changed: ^(go\.mod|go\.sum)$ + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --multi-stage-param=SHARD_ARGS="--shard-count 3 --shard-id 3" + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=regression-clusterinfra-azure-ipi-mapi + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )regression-clusterinfra-azure-ipi-mapi-3of3,?($|\s.*) - agent: kubernetes always_run: true branches: diff --git a/ci-operator/step-registry/openshift-extended/test/openshift-extended-test-commands.sh b/ci-operator/step-registry/openshift-extended/test/openshift-extended-test-commands.sh index c60350bd13055..855f178ce9f6b 100755 --- a/ci-operator/step-registry/openshift-extended/test/openshift-extended-test-commands.sh +++ b/ci-operator/step-registry/openshift-extended/test/openshift-extended-test-commands.sh @@ -348,7 +348,9 @@ function run { fi echo "final scenarios: ${test_scenarios}" - extended-platform-tests run all --dry-run | \ + echo "SHARD_ARGS=\"${SHARD_ARGS}\"" + + extended-platform-tests run all --dry-run ${SHARD_ARGS:-} | \ grep -E "${test_scenarios}" | grep -E "${TEST_IMPORTANCE}" > ./case_selected hardcoded_filters="~NonUnifyCI&;~Flaky&;~DEPRECATED&;~SUPPLEMENTARY&;~VMonly&;~ProdrunOnly&;~StagerunOnly&" diff --git a/ci-operator/step-registry/openshift-extended/test/openshift-extended-test-ref.yaml b/ci-operator/step-registry/openshift-extended/test/openshift-extended-test-ref.yaml index e0ea72ca9cac9..3ee940d697fd1 100644 --- a/ci-operator/step-registry/openshift-extended/test/openshift-extended-test-ref.yaml +++ b/ci-operator/step-registry/openshift-extended/test/openshift-extended-test-ref.yaml @@ -63,6 +63,10 @@ ref: documentation: |- Indicates if the active cluster is an OpenShift cluster or a derivative (e.g., Hypershift, Microshift). A value of "true" means the cluster is OpenShift or a derivative, while "false" means it is not (e.g., AKS). + - name: SHARD_ARGS + default: "" + documentation: |- + Arguments to be passed to 'extended-platform-tests' regarding the sharding parameters of this run - name: MULTI_STAGE_OVERRIDE_NETOBSERV_CS_IMAGE default: "" documentation: |- diff --git a/ci-operator/step-registry/openshift/e2e/test/clusterinfra-qe/openshift-e2e-test-clusterinfra-qe-ref.yaml b/ci-operator/step-registry/openshift/e2e/test/clusterinfra-qe/openshift-e2e-test-clusterinfra-qe-ref.yaml index 124b8fc4c506b..cd08211543756 100644 --- a/ci-operator/step-registry/openshift/e2e/test/clusterinfra-qe/openshift-e2e-test-clusterinfra-qe-ref.yaml +++ b/ci-operator/step-registry/openshift/e2e/test/clusterinfra-qe/openshift-e2e-test-clusterinfra-qe-ref.yaml @@ -22,6 +22,10 @@ ref: documentation: |- Indicates if the active cluster is an OpenShift cluster or a derivative (e.g., Hypershift, Microshift). A value of "true" means the cluster is OpenShift or a derivative, while "false" means it is not (e.g., AKS). + - name: SHARD_ARGS + default: "" + documentation: |- + Arguments to be passed to 'extended-platform-tests' regarding the sharding parameters of this run resources: requests: cpu: "1" From bfc4da8749433537ab897742c556583c77679a7d Mon Sep 17 00:00:00 2001 From: Milind Yadav Date: Fri, 30 May 2025 16:43:56 +0530 Subject: [PATCH 2/2] removing shard_args from chain as not doing sharding for cluster-api-actuator-pkg --- .../openshift-e2e-test-clusterinfra-qe-ref.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ci-operator/step-registry/openshift/e2e/test/clusterinfra-qe/openshift-e2e-test-clusterinfra-qe-ref.yaml b/ci-operator/step-registry/openshift/e2e/test/clusterinfra-qe/openshift-e2e-test-clusterinfra-qe-ref.yaml index cd08211543756..124b8fc4c506b 100644 --- a/ci-operator/step-registry/openshift/e2e/test/clusterinfra-qe/openshift-e2e-test-clusterinfra-qe-ref.yaml +++ b/ci-operator/step-registry/openshift/e2e/test/clusterinfra-qe/openshift-e2e-test-clusterinfra-qe-ref.yaml @@ -22,10 +22,6 @@ ref: documentation: |- Indicates if the active cluster is an OpenShift cluster or a derivative (e.g., Hypershift, Microshift). A value of "true" means the cluster is OpenShift or a derivative, while "false" means it is not (e.g., AKS). - - name: SHARD_ARGS - default: "" - documentation: |- - Arguments to be passed to 'extended-platform-tests' regarding the sharding parameters of this run resources: requests: cpu: "1"