From d376d58f065ceebf134b6c2333d18e86da1f38df Mon Sep 17 00:00:00 2001 From: Mike Place Date: Thu, 1 Apr 2021 15:25:40 +0200 Subject: [PATCH 1/3] Adds circuit breaker to app deployment in load pipeline --- .ci/load/scripts/load_agent.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.ci/load/scripts/load_agent.sh b/.ci/load/scripts/load_agent.sh index 3b5166aa13..a7a66a78d5 100755 --- a/.ci/load/scripts/load_agent.sh +++ b/.ci/load/scripts/load_agent.sh @@ -20,6 +20,7 @@ set -exuo pipefail POLL_FREQ=1 +POLL_TIMEOUT=600 LOCUST_LOCUSTFILE="../locust.py" LOCUST_PRINT_STATS=1 @@ -86,11 +87,15 @@ function appIsReady() { } function waitForApp() { + counter=1 while : do if appIsReady; then break + elif [ $counter -gt $POLL_TIMEOUT ]; then + exit 1 fi + ((counter++)) sleep $POLL_FREQ; done } From 2a0347cbcd1bbc2d6f138ae511682a0933e20605 Mon Sep 17 00:00:00 2001 From: Mike Place Date: Thu, 1 Apr 2021 15:28:09 +0200 Subject: [PATCH 2/3] Change timeout to 300s --- .ci/load/scripts/load_agent.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/load/scripts/load_agent.sh b/.ci/load/scripts/load_agent.sh index a7a66a78d5..427a9ee5ef 100755 --- a/.ci/load/scripts/load_agent.sh +++ b/.ci/load/scripts/load_agent.sh @@ -20,7 +20,7 @@ set -exuo pipefail POLL_FREQ=1 -POLL_TIMEOUT=600 +POLL_TIMEOUT=300 LOCUST_LOCUSTFILE="../locust.py" LOCUST_PRINT_STATS=1 From 890ed1b8bdbbc9bf048d270beeec3e6b05d0669c Mon Sep 17 00:00:00 2001 From: Mike Place Date: Fri, 2 Apr 2021 11:47:42 +0200 Subject: [PATCH 3/3] Apply review suggestion --- .ci/load/scripts/load_agent.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci/load/scripts/load_agent.sh b/.ci/load/scripts/load_agent.sh index 427a9ee5ef..cc97c5a8ab 100755 --- a/.ci/load/scripts/load_agent.sh +++ b/.ci/load/scripts/load_agent.sh @@ -93,6 +93,7 @@ function waitForApp() { if appIsReady; then break elif [ $counter -gt $POLL_TIMEOUT ]; then + echo "Poll timeout exceeded. Exiting with error code: 1" exit 1 fi ((counter++))