Skip to content

[vercel-flags-core] Retry datafile fetches with a shared deadline - #507

Merged
luismeyer merged 3 commits into
mainfrom
refactor/datafile-fetch-retries
Sep 25, 2026
Merged

luismeyer merged 3 commits into
mainfrom
refactor/datafile-fetch-retries

Conversation

@luismeyer

@luismeyer luismeyer commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Transient datafile failures now retry automatically across polling initialization, scheduled polls, build loading, offline initialization/evaluation, and direct getDatafile() fallback reads. The reusable fetchDatafile helper owns three total attempts with 100ms and 200ms backoff, plus one ten-second deadline covering token resolution, HTTP requests, retries, and body parsing.

Network, token, body parsing, and HTTP 408/429/5xx failures can retry. Other HTTP errors fail immediately. Cancellation settles callers even when a transport ignores its signal, and polling shutdown also cancels initialization requests and pending retry delays.

This PR is based directly on main. Streaming, telemetry ingestion, and bundle preparation already have retry loops; all core datafile callers now get retries from the shared helper by default. Includes a patch changeset.

Validation: 552 core tests passed, including public-API coverage for each datafile path, scheduled-poll recovery, concurrent build reads, and polling shutdown. TypeScript, Biome, and whitespace checks passed. Live network integration tests were excluded.

@vercel

vercel Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
flags-playground Ready Ready Preview, v0 Sep 25, 2026 10:16am UTC
flags-sdk-dev Ready Ready Preview, v0 Sep 25, 2026 10:16am UTC
flags-sdk-snippets Ready Ready Preview, v0 Sep 25, 2026 10:16am UTC
flags-sdk-sveltekit-snippets Ready Ready Preview, v0 Sep 25, 2026 10:16am UTC
shirt-shop Ready Ready Preview, v0 Sep 25, 2026 10:16am UTC
shirt-shop-api Ready Ready Preview, v0 Sep 25, 2026 10:16am UTC

This branch was successfully deployed

6 active deployments
Preview – flags-sdk-dev — 08afd67c Deployed Sep 25, 2026 by vercel[bot]
Preview – flags-playground — 08afd67c Deployed Sep 25, 2026 by vercel[bot]
Preview – flags-sdk-snippets — 08afd67c Deployed Sep 25, 2026 by vercel[bot]
Preview – flags-sdk-sveltekit-snippets — 08afd67c Deployed Sep 25, 2026 by vercel[bot]
Preview – shirt-shop-api — 08afd67c Deployed Sep 25, 2026 by vercel[bot]
Preview – shirt-shop — 08afd67c Deployed Sep 25, 2026 by vercel[bot]
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.

2 participants