File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -580,6 +580,7 @@ jobs:
580580 azd env set RS_KEY "$RS_KEY"
581581
582582 max_attempts=3
583+ max_attempt_minutes=20
583584 attempt=1
584585 previous_transient_signature=""
585586
@@ -597,7 +598,7 @@ jobs:
597598
598599 set +e
599600 provision_log="azd-provision-attempt-${attempt}.log"
600- azd provision --no-prompt 2>&1 | tee "$provision_log"
601+ timeout --signal=TERM --kill-after=2m "${max_attempt_minutes}m" azd provision --no-prompt 2>&1 | tee "$provision_log"
601602 provision_exit=${PIPESTATUS[0]}
602603 set -e
603604
@@ -611,6 +612,12 @@ jobs:
611612 exit 1
612613 fi
613614
615+ if [ "$provision_exit" -eq 124 ]; then
616+ echo "Provision stopped: attempt exceeded ${max_attempt_minutes}m timeout."
617+ echo "Failing fast to avoid long-running hangs."
618+ exit 1
619+ fi
620+
614621 # Only retry on known transient Azure control-plane conflicts
615622 if ! grep -Eq 'RequestConflict|ContainerAppOperationInProgress|Operation expired|LeaseIdMissing' "$provision_log"; then
616623 echo "Provision failed with non-transient error; not retrying."
You can’t perform that action at this time.
0 commit comments