From 0835c064b63c2886bce71fb10ca6a16a15144c6a Mon Sep 17 00:00:00 2001 From: Yoni Bettan Date: Thu, 9 Jan 2025 13:04:27 +0200 Subject: [PATCH] Retrying applying CRs in the `e2e` jobs. The webhook services are not always available right after the deployments are ready. This is causing a race condition between the services being ready to get requests and the CRs applied to the cluster. By retrying to apply the CRs we can give the services the time they need to become ready. Signed-off-by: Yoni Bettan --- ci/prow/e2e-hub-spoke-incluster-build | 6 +----- ci/prow/e2e-incluster-build | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ci/prow/e2e-hub-spoke-incluster-build b/ci/prow/e2e-hub-spoke-incluster-build index ec1224ee2..f6ff02557 100755 --- a/ci/prow/e2e-hub-spoke-incluster-build +++ b/ci/prow/e2e-hub-spoke-incluster-build @@ -1,7 +1,3 @@ -#!/bin/bash -# -set -euxo pipefail - readonly SKIP_MAKE_DEPLOY="${SKIP_MAKE_DEPLOY:-false}" readonly SKIP_MAKE_DEPLOY_HUB="${SKIP_MAKE_DEPLOY_HUB:-false}" readonly SKIP_ACM_INSTALLATION="${SKIP_ACM_INSTALLATION:-false}" @@ -51,7 +47,7 @@ else fi # Apply resources -oc apply -k ci/e2e-hub +timeout 1m bash -c 'until oc apply -k ci/e2e-hub; do sleep 3; done' # Wait for the build build to be created and completed timeout 1m bash -c 'until oc -n ${HUB_OPERATOR_NAMESPACE} get builds -o json | jq -er ".items[].metadata.name | select(.? | match(\"build\"))"; do sleep 1; done' diff --git a/ci/prow/e2e-incluster-build b/ci/prow/e2e-incluster-build index 995054cb3..01bdd6213 100755 --- a/ci/prow/e2e-incluster-build +++ b/ci/prow/e2e-incluster-build @@ -42,6 +42,7 @@ oc wait --for=condition=Available deployment/kmm-operator-controller deployment/ echo "Add resources" oc apply -k ci/e2e +timeout 1m bash -c 'until oc apply -k ci/e2e; do sleep 3; done' # Wait for the build pod to be created. `kubectl wait` doesn't support such option, # see https://github.com/kubernetes/kubernetes/issues/83242.