feat(upgrade): add progress spinners for version check and download phases#515
Merged
feat(upgrade): add progress spinners for version check and download phases#515
Conversation
…hases
Show animated spinners during the two long-running phases of `sentry cli
upgrade` that previously had no visual feedback:
1. "Checking for updates..." — wraps the version resolution network call
2. "Downloading {version}..." — wraps the binary download (delta or full)
Uses the existing `withProgress` utility from polling.ts for consistency
with all other CLI commands. Spinners are suppressed in `--json` mode.
The setup phase (`runSetupOnNewBinary`) is intentionally NOT wrapped
since it spawns a child process with `stdio: "inherit"` that writes its
own output.
Changes:
- Add `json?: boolean` to `UpgradeFlags` to access the injected flag
- Wrap `resolveTargetWithFallback` with spinner in `func()`
- Wrap `executeUpgrade` with spinner in `executeStandardUpgrade`
- Wrap `executeUpgrade` with spinner in `migrateToStandaloneForNightly`
- Demote "Upgrading/Downgrading to..." from log.info to log.debug
(the spinner message replaces it as the primary visual indicator)
- Update test assertions to match new spinner messages
Contributor
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
Contributor
Codecov Results 📊✅ 126 passed | Total: 126 | Pass Rate: 100% | Execution Time: 0ms 📊 Comparison with Base Branch
✨ No test changes detected All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 1047 uncovered lines. Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 95.77% 95.77% —%
==========================================
Files 180 180 —
Lines 24767 24777 +10
Branches 0 0 —
==========================================
+ Hits 23720 23730 +10
- Misses 1047 1047 —
- Partials 0 0 —Generated by Codecov Action |
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.
Show animated spinners during the two long-running phases of
sentry cli upgradethat previously had no visual feedback:resolveTargetWithFallback)executeStandardUpgradeandmigrateToStandaloneForNightlyUses the existing
withProgressutility frompolling.tsfor a consistent look with all other CLI commands. Spinners are automatically suppressed in--jsonmode.The setup phase (
runSetupOnNewBinary) is intentionally not wrapped since it spawns a child process withstdio: "inherit"that writes its own output.Before / After