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:
parent
29f4886a53
commit
db3e74a736
2 changed files with 38 additions and 1 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue