fix(upgrade): retry download on transient network errors with user feedback

Add downloadWithRetry with up to 3 attempts and quadratic backoff (5s, 20s)
to handle TLS timeouts and transient failures. Progress messages inform the
user of each failure and wait time before retrying.
This commit is contained in:
Deivid Soto 2026-04-09 14:15:32 +02:00
parent 29f4886a53
commit db3e74a736
2 changed files with 38 additions and 1 deletions

View file

@ -83,7 +83,7 @@ func (u *Upgrader) Execute(ctx context.Context, targetVersion string) Result {
// 4. Download archive
u.log(fmt.Sprintf("Downloading v%s...", targetVersion))
archivePath, err := download(ctx, targetVersion)
archivePath, err := downloadWithRetry(ctx, targetVersion, u.log)
if err != nil {
return u.fail("download: %v", err)
}