Skip to content

fix: back off transient download retries - #125

Merged
figtracer merged 3 commits into
masterfrom
fig/download-backoff
Sep 10, 2026
Merged

figtracer merged 3 commits into
masterfrom
fig/download-backoff

Conversation

@figtracer

@figtracer figtracer commented Sep 10, 2026

Copy link
Copy Markdown
Member

A transient GitHub 502 can exhaust every download attempt because reqwest’s retry policy retries immediately; it does not implement the backoff described in the existing comment. Send GitHub GET and HEAD requests through an explicit retry loop with 1, 2, 4, 8, and 16 second delays, capped at 16 seconds for larger retry counts. Preserve FOUNDRYUP_MAX_RETRIES, the existing status classification and host scope, and attestation verification. Response-body failures remain outside this retry loop.

Full integration and live-install verification remain blocked by the installer’s existing running-forge guard on this machine.

AI assistance: implemented with OpenAI Codex.

The reqwest retry policy retries immediately, which can exhaust attempts before a temporary GitHub outage recovers. Space GitHub GET and HEAD retries with capped exponential delays while preserving the configured retry count and HTTP status classification.
@figtracer
figtracer marked this pull request as ready for review September 10, 2026 10:46

@mablr mablr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, just style concern.

Comment thread src/download.rs Outdated
@figtracer
figtracer requested a review from mablr September 10, 2026 11:05
@figtracer
figtracer enabled auto-merge (squash) September 10, 2026 11:06
@figtracer
figtracer merged commit c597d4c into master Sep 10, 2026
12 checks passed
@figtracer
figtracer deleted the fig/download-backoff branch September 10, 2026 11:16
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