Skip to content

ci(embedding-sidecar): ride out huggingface outages with backoff retries#1087

Merged
edwh merged 1 commit into
masterfrom
ci/embedding-sidecar-hf-retry-backoff
Jul 16, 2026
Merged

ci(embedding-sidecar): ride out huggingface outages with backoff retries#1087
edwh merged 1 commit into
masterfrom
ci/embedding-sidecar-hf-retry-backoff

Conversation

@edwh

@edwh edwh commented Jul 16, 2026

Copy link
Copy Markdown
Member

Problem

The embedding-sidecar image pre-downloads the nomic-embed-text-v1.5 model from huggingface.co at build time. huggingface has sustained gateway-timeout windows, and the old 5×15s (~75s) flat retry can't outlast one. Because a build-time fetch failure aborts the whole "Build containers" step, a single huggingface wobble red-lines every open PR's CI at once.

Observed today across two unconnected PRs with the identical failure:

Fix

Widen both the npm-install and model-prebuild retry loops to 8 attempts with exponential backoff (15s → 120s cap, ~10 min total window) instead of 5×15s. A passing build no longer hinges on huggingface being reachable for one ~minute window. Behaviour is unchanged when the network is healthy — the first attempt succeeds.

Test Plan

  • Built docker/embedding-sidecar/Dockerfile locally with the change: build succeeds, Model cached. on the first attempt (backoff loop shell syntax verified, model fetch works).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Rm8xqAcBsnaYWZkrp5KAMA

The embedding-sidecar image pre-downloads the nomic-embed model from
huggingface.co at build time. huggingface has sustained gateway-timeout windows;
the old 5x15s (~75s) flat retry couldn't outlast one, and because a build-time
fetch failure aborts the whole "Build containers" step, a single huggingface
wobble red-lined EVERY open PR's CI at once (observed today across #1057 and
#1085 with identical `Gateway timeout ... nomic-embed-text-v1.5` logs).

Widen both the npm-install and model-prebuild retry loops to 8 attempts with
exponential backoff (15s -> 120s cap, ~10 min total) so a passing build no longer
hinges on huggingface being reachable for one ~minute window. Behaviour is
unchanged when the network is healthy (first attempt succeeds).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rm8xqAcBsnaYWZkrp5KAMA
@netlify

netlify Bot commented Jul 16, 2026

Copy link
Copy Markdown

Deploy Preview for golden-caramel-d2c3a7 canceled.

Name Link
🔨 Latest commit 73a1d04
🔍 Latest deploy log https://app.netlify.com/projects/golden-caramel-d2c3a7/deploys/6a58f2fb97babc000817df9a

@FreegleGeeks FreegleGeeks added CI: Running CI build is currently running CI: Passed CI build passed and removed CI: Running CI build is currently running labels Jul 16, 2026
@edwh
edwh merged commit 87eefe3 into master Jul 16, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI: Passed CI build passed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants