Skip to content

fix: show download progress and increase timeout during binary upgrade#272

Merged
rhuanbarreto merged 1 commit into
mainfrom
fix/upgrade-download-progress
May 5, 2026
Merged

fix: show download progress and increase timeout during binary upgrade#272
rhuanbarreto merged 1 commit into
mainfrom
fix/upgrade-download-progress

Conversation

@rhuanbarreto

Copy link
Copy Markdown
Contributor

Summary

  • Stream download with progress display: The archgate upgrade binary download now streams the response body and shows an updating progress line (Downloading... 45.2 / 112.0 MB (40%)) on TTY terminals. Non-TTY environments (piped / CI) skip progress output per ARCH-003.
  • Increase download timeout from 60s to 5 minutes: Release binaries exceed 100 MB and regularly timed out on slower connections. The new 300-second timeout accommodates real-world download speeds.
  • Backward-compatible callback API: downloadReleaseBinary() accepts an optional onProgress callback. Without it, the function falls back to buffering the response in one shot (no behavior change for other callers).

Test plan

  • Verify bun run validate passes (lint, typecheck, format, test, ADR check, build check)
  • New tests: calls onProgress callback with streaming progress — verifies the callback receives correct downloadedBytes and totalBytes after each chunk
  • New tests: streams without totalBytes when content-length is absent — verifies totalBytes is null when the server omits Content-Length
  • Manual: run archgate upgrade on a binary install and confirm the progress line updates in real-time
  • Manual: pipe archgate upgrade output and confirm no progress output appears (non-TTY guard)

The `archgate upgrade` command downloads 100+ MB binaries with no progress
indication and a 60-second timeout, causing timeouts on slower connections
and a confusing silent wait. Stream the response body to show an
incrementally updating progress line on TTY terminals, and increase the
download timeout from 60 seconds to 5 minutes.

Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying archgate-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: a058ad3
Status: ✅  Deploy successful!
Preview URL: https://bd78abfc.archgate-cli.pages.dev
Branch Preview URL: https://fix-upgrade-download-progres.archgate-cli.pages.dev

View logs

@rhuanbarreto rhuanbarreto merged commit ed4776b into main May 5, 2026
10 checks passed
@rhuanbarreto rhuanbarreto deleted the fix/upgrade-download-progress branch May 5, 2026 19:14
@archgatebot archgatebot Bot mentioned this pull request May 5, 2026
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