fix: add retry logic for docker pull in E2E CI workflow (#2051)

## Summary
- Adds a retry loop (3 attempts, 10s backoff) for `docker compose pull` before `docker compose up -d` in the E2E test workflow
- Fixes transient Docker Hub auth timeout failures where pulling `mongo:5.0.32-focal` failed with `context deadline exceeded`
- Only the E2E workflow is affected; no other CI workflows use `docker compose up`

## Failed run
https://github.com/hyperdxio/hyperdx/actions/runs/23953878483/job/69867599721
This commit is contained in:
Warren Lee 2026-04-03 11:08:09 -07:00 committed by GitHub
parent 59b1f46fd7
commit d84237f98b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -47,6 +47,19 @@ jobs:
- name: Start E2E Docker Compose
run: |
# Pre-pull images with retries to handle transient Docker Hub timeouts
for attempt in 1 2 3; do
if docker compose -p e2e-0 -f packages/app/tests/e2e/docker-compose.yml pull; then
echo "Docker images pulled successfully on attempt $attempt"
break
fi
if [ "$attempt" -eq 3 ]; then
echo "Failed to pull Docker images after 3 attempts"
exit 1
fi
echo "Docker pull failed (attempt $attempt/3), retrying in 10s..."
sleep 10
done
docker compose -p e2e-0 -f packages/app/tests/e2e/docker-compose.yml up -d
echo "Waiting for MongoDB..."
for i in $(seq 1 30); do