Skip to content

fix(ci): warm the new tag on jsDelivr before notifying the backend - #11

Merged
dorukozgen merged 1 commit into
mainfrom
fix/publish-warm-tag-before-notify
Jun 23, 2026
Merged

dorukozgen merged 1 commit into
mainfrom
fix/publish-warm-tag-before-notify

Conversation

@dorukozgen

Copy link
Copy Markdown
Contributor

Problem

The publish workflow failed at Notify backend on every run (~10 days): after cutting the immutable tag it sleep 5'd, then POSTed /api/internal/catalog/refresh with the brand-new tag. jsDelivr hadn't pulled that cold tag from GitHub yet, so the backend's force-fetch timed out → 502 → curl -fsS exit 22 → red CI.

The catalog itself published fine (tag cut, dist committed, @main purged) — only the instant-propagation notify failed.

Fix

  • Warm + wait: poll cdn.jsdelivr.net/gh/...@${TAG}/dist/models.json until it 200s (≤60s) before notifying, so the backend fetches a hot edge.
  • Retry the notify up to 5× for any residual cold-edge race.
  • Non-fatal last resort: a ::warning:: instead of failing the job — the backend's L2 TTL refresh still propagates the tag.

Companion

fleetifydev/fleetify-monorepo#44 widens the backend's forced-refresh fetch budget (4s → 15s) so a cold pull no longer 502s even without the warm-up.

🤖 Generated with Claude Code

The publish workflow failed at "Notify backend" on every run: it cut the tag,
slept 5s, then asked the backend to refresh by that brand-new tag. jsDelivr
hadn't pulled the cold tag from GitHub yet, so the backend's fetch timed out
-> 502 -> `curl -fsS` exit 22.

Poll jsDelivr for the new tag until it actually serves it (<=60s) before
notifying, retry the backend POST a few times for any residual cold-edge race,
and treat a final failure as a `::warning::` (non-fatal) since the backend's
L2 TTL refresh still propagates the tag.

Companion: fleetifydev/fleetify-monorepo widens the backend's forced-refresh
fetch timeout so a cold pull no longer 502s.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dorukozgen
dorukozgen merged commit 2340bcf into main Jun 23, 2026
2 checks passed
@dorukozgen
dorukozgen deleted the fix/publish-warm-tag-before-notify branch June 23, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant