Skip to content

fix(update): give binary downloads their own timeout and keep failure causes - #184

Merged
redox merged 1 commit into
mainfrom
su/fix-update-download-timeout
Nov 8, 2026
Merged

redox merged 1 commit into
mainfrom
su/fix-update-download-timeout

Conversation

@redox

@redox redox commented Nov 8, 2026

Copy link
Copy Markdown
Member

Problem

altertable update failed with only [ERROR] Unable to install GitHub release binary.

The 10s manual timeout (AbortSignal.timeout) covered the whole release binary body (~94 MB), not just the response headers. On slower connections, response.arrayBuffer() aborted with a plain TimeoutError. That isn't a CliError, so the catch-all replaced it with a generic message and the cause was lost.

Changes

  • Add a 5-minute UpdaterConfig.timeoutsMs.download for the binary download (overridable through downloadTimeoutMs). Metadata and checksum requests keep the 10s timeout.
  • fetchBytes reports Timed out downloading <asset> after Ns. as a TimeoutError (exit code 9), and other failures as Unable to download <asset>: <reason>.
  • The install fallback error now includes the underlying reason.

Tests

  • A download slower than the metadata timeout but within the download timeout succeeds.
  • A download timeout gives a TimeoutError with the asset name, and the existing binary is left in place.
  • A mid-stream network failure gives a NetworkError with its cause.

bun run check --quick passes.

Note: users on a release without this fix still hit the old behavior until they update once (by retrying or with a manual binary download).

🤖 Generated with Claude Code

… causes

The 10s manual timeout covered the whole release binary body (~94 MB), so
slower connections aborted mid-download and the error was replaced with a
generic "Unable to install GitHub release binary." message.

- Add a 5-minute `timeoutsMs.download` for the binary download.
- Report download timeouts and network failures with the asset name and cause.
- Include the underlying reason in the install fallback error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@albert20260301 albert20260301 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verified the failure against a real loopback HTTP response that sends headers and one byte immediately, then delays the body: the old updater reports the generic install error; this patch succeeds with the separate download deadline. A shorter download deadline produces TimeoutError/exit 9 with the asset name and leaves the original binary unchanged.

Local static checks, 869 unit tests, 157 black-box tests and build pass; required CI is green. Checksum/version verification and atomic replacement remain intact. This verifies the patch, not publication: installed older updaters still need the documented retry/manual bootstrap to acquire the fix.

@redox
redox requested a review from utay November 8, 2026 18:34
@redox
redox merged commit 98804ab into main Nov 8, 2026
15 checks passed
@redox
redox deleted the su/fix-update-download-timeout branch November 8, 2026 19:07
redox pushed a commit that referenced this pull request Nov 8, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.15.1](v1.15.0...v1.15.1)
(2026-11-08)


### Bug Fixes

* **update:** give binary downloads their own timeout and keep failure
causes
([#184](#184))
([98804ab](98804ab))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: altertable-release[bot] <345426372+altertable-release[bot]@users.noreply.github.com>
@albert20260301

Copy link
Copy Markdown
Contributor

The fix is now available in CLI 1.15.1 on npm and GitHub Releases.

Verified the archive integrity, extracted version/update help, and identical SHA-256 for the GitHub asset, npm bundle and a fresh build of the release commit. The updater source exactly matches the reviewed patch with the passing real-HTTP slow-body/rollback regression.

An older installed updater still uses its old download timeout. If updating through it fails, acquire 1.15.1 via the package manager or a manual release-binary download; the new timeout applies once the fixed updater is installed. This verification did not replace a live installed CLI.

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.

3 participants