Skip to content

Retry transient network fetch failures#146

Merged
silverwind merged 4 commits into
masterfrom
fetch-retry
Jul 2, 2026
Merged

Retry transient network fetch failures#146
silverwind merged 4 commits into
masterfrom
fetch-retry

Conversation

@silverwind

@silverwind silverwind commented Jul 2, 2026

Copy link
Copy Markdown
Owner

A single slow or dropped registry request aborts the whole run. fetchWithRetry retries transient failures (timeouts, socket/DNS errors) up to twice with a fresh timeout per attempt; deterministic errors and non-ok responses fail on the first attempt. Wired into the cached-registry, forge, npm and go @latest fetches; go/make probes stay single-shot.

silverwind and others added 4 commits July 2, 2026 11:18
A single slow or dropped registry request currently aborts the whole run.
Add a fetchRetrying wrapper that retries timeouts and transient socket/DNS
failures up to twice with a fresh timeout per attempt. Deterministic errors
(bad URL, NXDOMAIN, TLS) and HTTP error statuses still fail on the first
attempt. Route the cached-registry, forge, npm and go @latest fetches through
it; speculative go/make major-version probes stay single-shot.

Co-Authored-By: Claude (Opus 4.8) <noreply@anthropic.com>
Default is back to 5000 and retries are transient-only, so the extra detail
is not worth the longer line.

Co-Authored-By: Claude (Opus 4.8) <noreply@anthropic.com>
Matches the existing fetchWithEtag naming.

Co-Authored-By: Claude (Opus 4.8) <noreply@anthropic.com>
RegExp.escape needs Node 24, but engines allows >=22, so CI failed on
Node 22. Use a manual escape when RegExp.escape is unavailable.

Co-Authored-By: Claude (Opus 4.8) <noreply@anthropic.com>
@silverwind silverwind merged commit 0dbd5d9 into master Jul 2, 2026
20 checks passed
@silverwind silverwind deleted the fetch-retry branch July 2, 2026 09:32
silverwind added a commit that referenced this pull request Jul 2, 2026
* update deps (silverwind)
* Retry transient network fetch failures (#146) (silverwind)
* update deps (silverwind)
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