diff --git a/wait-for-grafana/README.md b/wait-for-grafana/README.md index 22f81bf..7732537 100644 --- a/wait-for-grafana/README.md +++ b/wait-for-grafana/README.md @@ -22,11 +22,11 @@ The time to wait between each check, in seconds. Default is `0.5`. ### `startupTimeout` (optional) -The maximum time to wait for the server's TCP port to bind, in seconds. Default is `300`. +The maximum time to wait for the server's TCP port to bind, in seconds. Default is `60`. This covers the window between the container starting and Grafana's HTTP listener becoming active. During this phase the action polls every 5 seconds. Once the port responds (with any status other than `000`), normal health polling begins using the `timeout` and `interval` values above. -On contested CI runners, Grafana's HTTP listener can take longer to bind than the default health-check window allows, regardless of Grafana version. Increasing this value gives the process more time to start without affecting the health-check phase. +Raise this value only if Grafana genuinely takes longer than the default to start. A long default delays diagnosis of startup *crashes* (for example, a provisioning deadlock that prevents the HTTP listener from ever binding), since the action can only observe `000` and cannot distinguish "still booting" from "dead before booting." Pair this action with a separate diagnostic step that dumps container logs on failure to recover the real signal. ## How to use? diff --git a/wait-for-grafana/action.yml b/wait-for-grafana/action.yml index b742ccb..4e9cbc8 100644 --- a/wait-for-grafana/action.yml +++ b/wait-for-grafana/action.yml @@ -18,9 +18,9 @@ inputs: required: true default: "0.5" startupTimeout: - description: "Seconds to wait for the TCP port to bind before health polling begins. On contested CI runners, Grafana's HTTP listener can take longer to start than the default health-check window allows." + description: "Seconds to wait for the TCP port to bind before health polling begins. Raise this only if Grafana genuinely takes longer than the default to start — a long default delays diagnosis of startup crashes (e.g. provisioning deadlocks), which never recover no matter how long we wait." required: true - default: "300" + default: "60" runs: using: "composite" steps: diff --git a/wait-for-grafana/wait-for-grafana.sh b/wait-for-grafana/wait-for-grafana.sh index 5da6bac..7ae478e 100755 --- a/wait-for-grafana/wait-for-grafana.sh +++ b/wait-for-grafana/wait-for-grafana.sh @@ -4,7 +4,7 @@ url="$1" expected_response_code="$2" timeout="$3" interval="$4" -startup_timeout="${5:-300}" +startup_timeout="${5:-60}" echo "Checking URL: $url" echo "Expected response code: $expected_response_code"