From b413a7ff06c585ae8c7a15109e1a9ee9a3295329 Mon Sep 17 00:00:00 2001 From: Birol Bilgin Date: Thu, 11 May 2023 17:50:41 +0200 Subject: [PATCH] gh/workflow: change multicluster provisioning to none blocking mode Multicluster conformance tests set up two clusters in blocking mode and sequentially. Every cluster provisioning takes 4 to 5 min. This commit changes provisioning to none blocking mode and adds a step to wait for provisioning to finish. This change would cut the run time by 4 to 5 min. Signed-off-by: Birol Bilgin --- .../workflows/conformance-multicluster-v1.11.yaml | 12 ++++++++++-- .../workflows/conformance-multicluster-v1.12.yaml | 12 ++++++++++-- .../workflows/conformance-multicluster-v1.13.yaml | 12 ++++++++++-- 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/.github/workflows/conformance-multicluster-v1.11.yaml b/.github/workflows/conformance-multicluster-v1.11.yaml index c07a4b9c1034..493c9263da95 100644 --- a/.github/workflows/conformance-multicluster-v1.11.yaml +++ b/.github/workflows/conformance-multicluster-v1.11.yaml @@ -243,7 +243,8 @@ jobs: --disk-type pd-standard \ --disk-size 10GB \ --node-taints node.cilium.io/agent-not-ready=true:NoExecute \ - --preemptible + --preemptible \ + --async - name: Create GKE cluster 2 run: | @@ -259,7 +260,14 @@ jobs: --disk-type pd-standard \ --disk-size 10GB \ --node-taints node.cilium.io/agent-not-ready=true:NoExecute \ - --preemptible + --preemptible \ + --async + + - name: Wait for clusters to be provisioned + run: | + while [ "$(gcloud container operations list --filter="status=RUNNING AND targetLink~${{ env.clusterNameBase }}" --format="value(name)")" ];do + echo "cluster has an ongoing operation, waiting for all operations to finish"; sleep 10 + done - name: Allow cross-cluster traffic run: | diff --git a/.github/workflows/conformance-multicluster-v1.12.yaml b/.github/workflows/conformance-multicluster-v1.12.yaml index 199374242cb8..aafcca013687 100644 --- a/.github/workflows/conformance-multicluster-v1.12.yaml +++ b/.github/workflows/conformance-multicluster-v1.12.yaml @@ -243,7 +243,8 @@ jobs: --disk-type pd-standard \ --disk-size 10GB \ --node-taints node.cilium.io/agent-not-ready=true:NoExecute \ - --preemptible + --preemptible \ + --async - name: Create GKE cluster 2 run: | @@ -259,7 +260,14 @@ jobs: --disk-type pd-standard \ --disk-size 10GB \ --node-taints node.cilium.io/agent-not-ready=true:NoExecute \ - --preemptible + --preemptible \ + --async + + - name: Wait for clusters to be provisioned + run: | + while [ "$(gcloud container operations list --filter="status=RUNNING AND targetLink~${{ env.clusterNameBase }}" --format="value(name)")" ];do + echo "cluster has an ongoing operation, waiting for all operations to finish"; sleep 10 + done - name: Allow cross-cluster traffic run: | diff --git a/.github/workflows/conformance-multicluster-v1.13.yaml b/.github/workflows/conformance-multicluster-v1.13.yaml index d1d3f120f841..71425de0c6cb 100644 --- a/.github/workflows/conformance-multicluster-v1.13.yaml +++ b/.github/workflows/conformance-multicluster-v1.13.yaml @@ -243,7 +243,8 @@ jobs: --disk-type pd-standard \ --disk-size 10GB \ --node-taints node.cilium.io/agent-not-ready=true:NoExecute \ - --preemptible + --preemptible \ + --async - name: Create GKE cluster 2 run: | @@ -259,7 +260,14 @@ jobs: --disk-type pd-standard \ --disk-size 10GB \ --node-taints node.cilium.io/agent-not-ready=true:NoExecute \ - --preemptible + --preemptible \ + --async + + - name: Wait for clusters to be provisioned + run: | + while [ "$(gcloud container operations list --filter="status=RUNNING AND targetLink~${{ env.clusterNameBase }}" --format="value(name)")" ];do + echo "cluster has an ongoing operation, waiting for all operations to finish"; sleep 10 + done - name: Allow cross-cluster traffic run: |