[vercel-flags-core] Retry datafile fetches with a shared deadline - #507
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
luismeyer
added this pull request to stack #509
September 22, 2026 14:02
luismeyer
force-pushed
the
refactor/datafile-fetch-retries
branch
from
September 22, 2026 15:10
3f4c45e to
fa92e34
Compare
luismeyer
removed this pull request from stack #509
September 22, 2026 16:24
luismeyer
marked this pull request as ready for review
September 23, 2026 13:18
dferber90
approved these changes
Sep 23, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Transient datafile failures now retry automatically across polling initialization, scheduled polls, build loading, offline initialization/evaluation, and direct
getDatafile()fallback reads. The reusablefetchDatafilehelper 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.