ci: retry docker compose pull to survive transient registry timeouts

The "Load and Start Appwrite" step ran `docker compose pull` as a plain
step with no retry, so a single transient Docker Hub timeout (e.g. a
traefik manifest fetch timing out) failed the whole job. Wrap the pull in
a 3-attempt retry loop across all test-gating jobs. `up --wait` stays
single-shot so genuine container health failures still surface immediately
rather than being masked by retries.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
fogelitoandClaude Opus 4.8 committed 2026-06-30 14:28:49 +03:00
1 parent 12cc5bd630
commit 7739b82787
1 file changed
+50 -5
+50 -5
View File
@@ -306,7 +306,16 @@ jobs:
- name: Load and Start Appwrite
timeout-minutes: 5
run: |
docker compose pull --quiet --ignore-buildable
# Docker Hub registry timeouts are a common transient CI failure
# (e.g. a traefik manifest fetch timing out). Retry the image pull;
# keep `up` single-shot so genuine container health failures still surface.
for attempt in 1 2 3; do
if docker compose pull --quiet --ignore-buildable; then
break
fi
echo "::warning::docker compose pull failed (attempt ${attempt}/3); retrying in 15s"
sleep 15
done
docker compose up -d --quiet-pull --wait
- name: Environment Variables
@@ -353,7 +362,16 @@ jobs:
- name: Load and Start Appwrite
timeout-minutes: 5
run: |
docker compose pull --quiet --ignore-buildable
# Docker Hub registry timeouts are a common transient CI failure
# (e.g. a traefik manifest fetch timing out). Retry the image pull;
# keep `up` single-shot so genuine container health failures still surface.
for attempt in 1 2 3; do
if docker compose pull --quiet --ignore-buildable; then
break
fi
echo "::warning::docker compose pull failed (attempt ${attempt}/3); retrying in 15s"
sleep 15
done
docker compose up -d --quiet-pull --wait
- name: Wait for Open Runtimes
@@ -443,7 +461,16 @@ jobs:
_APP_DATABASE_DOCUMENTSDB_SHARED_TABLES: ${{ matrix.mode != 'dedicated' && 'documentsdb_db_main' || '' }}
_APP_DATABASE_VECTORSDB_SHARED_TABLES: ${{ matrix.mode != 'dedicated' && 'vectorsdb_db_main' || '' }}
run: |
docker compose pull --quiet --ignore-buildable
# Docker Hub registry timeouts are a common transient CI failure
# (e.g. a traefik manifest fetch timing out). Retry the image pull;
# keep `up` single-shot so genuine container health failures still surface.
for attempt in 1 2 3; do
if docker compose pull --quiet --ignore-buildable; then
break
fi
echo "::warning::docker compose pull failed (attempt ${attempt}/3); retrying in 15s"
sleep 15
done
docker compose up -d --quiet-pull --wait
- name: Wait for Open Runtimes
@@ -526,7 +553,16 @@ jobs:
_APP_DATABASE_DOCUMENTSDB_SHARED_TABLES: ${{ matrix.mode != 'dedicated' && 'documentsdb_db_main' || '' }}
_APP_DATABASE_VECTORSDB_SHARED_TABLES: ${{ matrix.mode != 'dedicated' && 'vectorsdb_db_main' || '' }}
run: |
docker compose pull --quiet --ignore-buildable
# Docker Hub registry timeouts are a common transient CI failure
# (e.g. a traefik manifest fetch timing out). Retry the image pull;
# keep `up` single-shot so genuine container health failures still surface.
for attempt in 1 2 3; do
if docker compose pull --quiet --ignore-buildable; then
break
fi
echo "::warning::docker compose pull failed (attempt ${attempt}/3); retrying in 15s"
sleep 15
done
docker compose up -d --quiet-pull --wait
- name: Run tests
@@ -584,7 +620,16 @@ jobs:
_APP_DATABASE_DOCUMENTSDB_SHARED_TABLES: ${{ matrix.mode != 'dedicated' && 'documentsdb_db_main' || '' }}
_APP_DATABASE_VECTORSDB_SHARED_TABLES: ${{ matrix.mode != 'dedicated' && 'vectorsdb_db_main' || '' }}
run: |
docker compose pull --quiet --ignore-buildable
# Docker Hub registry timeouts are a common transient CI failure
# (e.g. a traefik manifest fetch timing out). Retry the image pull;
# keep `up` single-shot so genuine container health failures still surface.
for attempt in 1 2 3; do
if docker compose pull --quiet --ignore-buildable; then
break
fi
echo "::warning::docker compose pull failed (attempt ${attempt}/3); retrying in 15s"
sleep 15
done
docker compose up -d --quiet-pull --wait
- name: Wait for Open Runtimes