Add additional retries on WinGet dowloads in CI#18929
Open
Conversation
8b577e1 to
1195e53
Compare
1195e53 to
4fced70
Compare
konstin
approved these changes
Apr 9, 2026
Comment on lines
+2
to
+14
| .SYNOPSIS | ||
| Install a package with winget with additional retries. | ||
|
|
||
| .DESCRIPTION | ||
| winget already performs internal retries for some network/download failures. | ||
| For the installer download path used by `winget install`, upstream currently | ||
| uses `MaxRetryCount = 2` in this loop [1]. | ||
|
|
||
| That corresponds to 2 total attempts (initial attempt + 1 retry). | ||
| This script adds an outer retry loop for CI, where transient errors can still | ||
| cause winget to fail (for example: "InternetOpenUrl() failed"). | ||
|
|
||
| [1]: https://github.com/microsoft/winget-cli/blob/87949cef103975859167c9122f8f3cfa84c5e56f/src/AppInstallerCLICore/Workflows/DownloadFlow.cpp#L430-L432 |
Member
There was a problem hiding this comment.
Do we have an upstream bug for more retries? This problem will also affect our users that install uv with winget.
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.
No description provided.