From 0d0b4de84ec33277cef0fdd1673d7ea87909cbc6 Mon Sep 17 00:00:00 2001 From: Evan Jacobs <570070+quantizor@users.noreply.github.com> Date: Wed, 18 Feb 2026 18:07:38 -0500 Subject: [PATCH] fix: early timeout exit Added logic to handle pagination and retry on failure. --- entrypoint.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 38e3d19..37fc8a5 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -18,6 +18,9 @@ if [[ -n "$INPUT_TEAM_ID" ]]; then request_url="$request_url&teamId=$INPUT_TEAM_ID" fi +# Save the original URL so we can reset pagination later +original_request_url="$request_url" + echo "::debug::Retrieving Deployments from: $request_url" while [ "$deployment_ready" = false ]; do @@ -36,7 +39,8 @@ while [ "$deployment_ready" = false ]; do if [[ $exit_status -ne 0 ]]; then echo "::warning::Failed to get deployment from: $request_url" - break + sleep "$INPUT_DELAY" + continue fi error_code=$(echo "$response" | jq -r '.error.code') @@ -87,7 +91,10 @@ EOF request_url="$request_url&until=$next" fi else - break + # No more pages — reset to the first page and re-poll + request_url="$original_request_url" + sleep "$INPUT_DELAY" + continue fi # Sleep for a short interval to avoid spamming requests