From 2244ff0d2e833146769070253a41d5f5724e3ec2 Mon Sep 17 00:00:00 2001 From: Konstantin Astakhov Date: Wed, 27 Sep 2023 14:07:00 +0700 Subject: [PATCH] ci(try-runtime): fix false-positive --- .github/workflows/try-runtime.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/try-runtime.yml b/.github/workflows/try-runtime.yml index d687154da6..4cbebc2b92 100644 --- a/.github/workflows/try-runtime.yml +++ b/.github/workflows/try-runtime.yml @@ -210,20 +210,10 @@ jobs: return 1 fi else - DOCKER_LOGS=$(do_docker_logs) - while [ $counter_life -lt 3 ] - do - (( counter_life++ )) - if [[ -n ${DOCKER_LOGS} ]]; then - echo "TryRuntime_on_runtime_upgrade executed without errors" - return 0 - else - echo "Container try-runtime not RUNNING" - return 1 - fi - done + (( counter_life++ )) + echo "Container try-runtime not RUNNING" $counter_life "time" + return 1 fi - exit 0 } while ! is_started; do @@ -231,10 +221,10 @@ jobs: sleep 30s counter=$(( $counter - 1 )) echo "Counter: $counter" - if [ "$counter" -gt "0" ]; then + if [ "$counter" -gt "0" ] && [ "$counter_life" -lt "3" ]; then continue else - echo "Counter reached zero, yet upgrade is not finished" + echo "Counter reached zero, yet upgrade is not finished correctly or Container try-runtime is not RUNNING" exit 1 fi done