Repository navigation
Retry a tarball download that stopped receiving data - #73
maxdeviant wants to merge 1 commit into
Conversation
A registry that stops sending partway through the tarball body, or never sends a response at all, currently hangs the install until the 15-minute budget runs out, and that timeout is deliberately not retried. On CI this shows up as a setup step that sits idle for 15 minutes and then fails. Each tarball attempt now has a stall timeout: 30 seconds without receiving any data abandons the attempt so it is retried like any other interrupted connection. The timer resets on every chunk, so a slow download that keeps making progress is unaffected, and the overall budget still applies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@maxdeviant is attempting to deploy a commit to the pnpm Team on Vercel. A member of the Team first needs to authorize it. |
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
✅ Deploy Preview for getpnpm ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📜 Recent review details
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
This PR makes it so a tarball download that stopped receiving data is retried rather than stalling indefinitely.
We've been seeing a number of stalls in our CI when using the
pnpm/setupAction:Note
Everything below this line is commentary from Claude.
Follow-up to #62. That PR retries a tarball download whose connection was reset, but deliberately does not retry one that runs out its 15-minute budget, since the budget is sized for a slow connection and retrying would multiply the wait.
That leaves a gap: a registry that accepts the connection and then stops sending (either partway through the body, or before any response at all) still hangs the install for the full 15 minutes and then fails. We hit this in CI through
pnpm/setup:The same download normally takes about 2.5 seconds, and a re-run succeeds.
Change
Each tarball attempt now has a stall timeout alongside the overall budget:
AbortSignal.timeoutviaAbortSignal.any, so it covers both waiting for the response and reading the body.Error("no data received for 30s") rather than aTimeoutError, so the existingisRetryableErrortreats it as an interrupted connection and retries it. The overall 15-minute timeout is still not retried, as fix: retry a registry or tarball request that failed transiently #62 intended.downloadTarballtakes an optionalstallTimeoutMs(defaulting to 30s) so the tests can use a short one. Metadata requests are unchanged, since their 30-second overall timeout is already retried.Tests
test/stalledDownload.test.tscovers both shapes of stall against a local server that leaves the first request open:In both cases the download is retried and completes on the second request. Without the stall signal passed to
request(), both tests hang until the test runner's timeout.Summary by CodeRabbit
New Features
Bug Fixes