From b6e67d5ef06fe5b87b3b5a1b8a16c82dcb9b27b1 Mon Sep 17 00:00:00 2001 From: Rafaela Soares Date: Tue, 6 Jan 2026 22:43:19 +0000 Subject: [PATCH 1/3] wait for registration-service deployment to be created --- scripts/ci/manage-devsandbox-dashboard.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/scripts/ci/manage-devsandbox-dashboard.sh b/scripts/ci/manage-devsandbox-dashboard.sh index 42ce286fc..84cb85519 100755 --- a/scripts/ci/manage-devsandbox-dashboard.sh +++ b/scripts/ci/manage-devsandbox-dashboard.sh @@ -176,8 +176,22 @@ if [[ ${DEPLOY_UI} == "true" ]]; then # Get the HOST_NS (host operator namespace) HOST_NS=$(oc get projects -l app=host-operator --output=name -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}' | sort | tail -n 1) - # Wait for registration-service deployment and route to be ready - oc wait --for=condition=Available deployment/registration-service -n ${HOST_NS} --timeout=10m + # Wait for registration-service deployment to be created + TIMEOUT=150 # 5 minutes in 2-second intervals + COUNTER=0 + while ! oc get deployment/registration-service -n ${HOST_NS} &>/dev/null; do + if [[ $COUNTER -ge $TIMEOUT ]]; then + echo "ERROR: registration-service was not created after 5m" + echo "Available deployments in ${HOST_NS}:" + oc get deployments -n ${HOST_NS} + exit 1 + fi + echo -n "." + sleep 2 + ((COUNTER++)) + done + # Wait for registration-service deployment to be available + oc wait --for=condition=Available deployment/registration-service -n ${HOST_NS} --timeout=2m # Wait for registration-service route to exist NEXT_WAIT_TIME=0 while [[ -z $(oc get routes registration-service -n ${HOST_NS} -o jsonpath='{.status.ingress[0].host}' 2>/dev/null || true) ]]; do From 8c565dc3da990ef50cf6b49bc0ff574ed311e978 Mon Sep 17 00:00:00 2001 From: Rafaela Soares Date: Tue, 6 Jan 2026 22:59:26 +0000 Subject: [PATCH 2/3] improvements --- scripts/ci/manage-devsandbox-dashboard.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/ci/manage-devsandbox-dashboard.sh b/scripts/ci/manage-devsandbox-dashboard.sh index 84cb85519..71544c1c5 100755 --- a/scripts/ci/manage-devsandbox-dashboard.sh +++ b/scripts/ci/manage-devsandbox-dashboard.sh @@ -188,10 +188,12 @@ if [[ ${DEPLOY_UI} == "true" ]]; then fi echo -n "." sleep 2 - ((COUNTER++)) + ((++COUNTER)) done + # Wait for registration-service deployment to be available oc wait --for=condition=Available deployment/registration-service -n ${HOST_NS} --timeout=2m + # Wait for registration-service route to exist NEXT_WAIT_TIME=0 while [[ -z $(oc get routes registration-service -n ${HOST_NS} -o jsonpath='{.status.ingress[0].host}' 2>/dev/null || true) ]]; do @@ -203,7 +205,7 @@ if [[ ${DEPLOY_UI} == "true" ]]; then fi echo -n "." sleep 2 - ((NEXT_WAIT_TIME++)) + ((++NEXT_WAIT_TIME)) done # Get the Registration Service API URL From bcd072934b942d47e9b786ebe4744d0a72348fcc Mon Sep 17 00:00:00 2001 From: Rafaela Soares Date: Tue, 6 Jan 2026 23:17:54 +0000 Subject: [PATCH 3/3] requested changes --- scripts/ci/manage-devsandbox-dashboard.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ci/manage-devsandbox-dashboard.sh b/scripts/ci/manage-devsandbox-dashboard.sh index 71544c1c5..bff1cae08 100755 --- a/scripts/ci/manage-devsandbox-dashboard.sh +++ b/scripts/ci/manage-devsandbox-dashboard.sh @@ -177,10 +177,10 @@ if [[ ${DEPLOY_UI} == "true" ]]; then HOST_NS=$(oc get projects -l app=host-operator --output=name -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}' | sort | tail -n 1) # Wait for registration-service deployment to be created - TIMEOUT=150 # 5 minutes in 2-second intervals + MAX_ITERATIONS=150 # 5 minutes in 2-second intervals COUNTER=0 while ! oc get deployment/registration-service -n ${HOST_NS} &>/dev/null; do - if [[ $COUNTER -ge $TIMEOUT ]]; then + if [[ $COUNTER -ge $MAX_ITERATIONS ]]; then echo "ERROR: registration-service was not created after 5m" echo "Available deployments in ${HOST_NS}:" oc get deployments -n ${HOST_NS}