Repository navigation
Conversation
… deadline The artifact download used AbortSignal.timeout(120_000) for the whole fetch including the body, so the ~195 MB linux-arm64 server archive aborted on connections slower than about 1.6 MB/s. Bound the time to the response headers (30 s) separately and watch the body for progress instead: the download fails when the server does not respond or when no data arrives for 120 s, but a slow connection that keeps making progress is allowed to finish. Partial files are still removed on failure. Fixes beeper#50
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.
Fixes #50.
Problem
downloadArtifactfetched the server/desktop artifact with a singleAbortSignal.timeout(120_000)covering the whole request including the body. The linux-arm64 server archive is ~195 MB, so any connection slower than ~1.6 MB/s always aborted mid-download with "The operation timed out" - which is what the Raspberry Pi 4 reporter hits.Change
downloadArtifactaccepts optional{ responseTimeoutMs, idleTimeoutMs }(used by the tests to keep them fast; defaults are unchanged behavior-wise for healthy connections).Tests
Added three cases to
packages/cli/test/installations.test.ts, all passing viabun test:bun test test/installations.test.ts: 10/10 pass. The wider suite shows 9 pre-existing failures on a clean checkout ofmainin this Linux sandbox (they need the built@beeper/desktop-apipackage, whichprepare-desktop-api.tscan't fetch here); baseline-compared with a worktree ofmainto confirm they are unrelated.Environment note: verified on Linux with Bun 1.4.4; I don't have a Raspberry Pi to reproduce the original report end-to-end, but the abort path is the same
AbortSignal.timeoutthe report identifies.PR prepared with AI assistance (various models).