Skip to content

Commit 37604f9

Browse files
committed
feat(upgrade): add --offline flag and automatic offline fallback
Add --offline flag to 'sentry cli upgrade' that uses only cached version info (from background checks) and cached patches (from background prefetch) — no network calls at all. When a normal upgrade encounters a network error during version discovery, automatically falls back to the offline path if cached data is available, logging a warning about the fallback. The infrastructure for offline upgrades already existed: - Background version checks store latest version in SQLite - Background patch prefetch caches patch chains to disk - Delta upgrade already checks cache before network This change wires those pieces together with a new entry point. Changes: - Add --offline flag to upgrade command - Add resolveOfflineTarget() for cached version lookup - Add resolveTargetWithFallback() for auto network→cache fallback - Thread offline param through executeUpgrade/downloadBinaryToTemp to prevent full-binary download fallback when offline - Show '(offline, from cache)' in human output for offline upgrades - Validate --offline is only used with curl-installed binaries
1 parent a68826f commit 37604f9

File tree

5 files changed

+318
-88
lines changed

5 files changed

+318
-88
lines changed

0 commit comments

Comments
 (0)