Skip to content

Add additional retries on WinGet dowloads in CI#18929

Open
zanieb wants to merge 1 commit intomainfrom
zb/winget-retries
Open

Add additional retries on WinGet dowloads in CI#18929
zanieb wants to merge 1 commit intomainfrom
zb/winget-retries

Conversation

@zanieb
Copy link
Copy Markdown
Member

@zanieb zanieb commented Apr 8, 2026

No description provided.

@zanieb zanieb added the internal A refactor or improvement that is not user-facing label Apr 8, 2026
@zanieb zanieb force-pushed the zb/winget-retries branch from 8b577e1 to 1195e53 Compare April 8, 2026 19:05
@zanieb zanieb force-pushed the zb/winget-retries branch from 1195e53 to 4fced70 Compare April 8, 2026 19:31
@zanieb zanieb marked this pull request as ready for review April 8, 2026 19:35
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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have an upstream bug for more retries? This problem will also affect our users that install uv with winget.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal A refactor or improvement that is not user-facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants