fix: show download progress and increase timeout during binary upgrade#272
Merged
Conversation
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>
Deploying archgate-cli with
|
| 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 |
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.
Summary
archgate upgradebinary 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.downloadReleaseBinary()accepts an optionalonProgresscallback. Without it, the function falls back to buffering the response in one shot (no behavior change for other callers).Test plan
bun run validatepasses (lint, typecheck, format, test, ADR check, build check)calls onProgress callback with streaming progress— verifies the callback receives correctdownloadedBytesandtotalBytesafter each chunkstreams without totalBytes when content-length is absent— verifiestotalBytesisnullwhen the server omitsContent-Lengtharchgate upgradeon a binary install and confirm the progress line updates in real-timearchgate upgradeoutput and confirm no progress output appears (non-TTY guard)