fix: add retry logic to PostgreSQL check in extract-test-cache.sh
HAF service containers may restart PostgreSQL during initialization (e.g., after applying CI config or installing extensions). The previous single-shot pg_isready check could fail if it ran during this brief restart window, causing the script to unnecessarily delete and re-extract cache data that was already in use by the running PostgreSQL instance. Add a retry loop (default 15s timeout, configurable via POSTGRES_CHECK_TIMEOUT) that checks multiple times before deciding PostgreSQL isn't running. This prevents race conditions where the script runs right as HAF is restarting PostgreSQL.
Loading
Please sign in to comment