chocolatey / chocolatey/choco

Retry downloads when failure is caused by transient network problems

Open
#1,853 1 comment 1 reaction 0 assignees View on GitHub
0 - Triaging Enhancement
Dominant language
C#
Stars
11.5k
Forks
960
PR merge metrics
No merged PRs in 30d

Description

As noted at https://github.com/chocolatey/choco/issues/1840 , fetches sometimes fail, even after successful ones have shown that the network is operational.

On a CI worker, failing for transient network problems is very undesirable.

It would be useful for choco to have an option to retry several times with reasonable backoff periods.

Sometimes the error message is quite obvious, like

`[NuGet] An error occurred while loading packages from 'https://chocolatey.org/api/v2/': The operation has timed out.`

Looking for `https://chocolatey.org/api/v2/` in the error messages is probably sufficient to trigger a retry, if configured to not fail on the first sight of a network connection problem.

https://github.com/NuGet/Home/issues/2269 upstream bug.

Contributor guide

Open the contributing guide

Research direction

Start by reading issue 1840 and the linked NuGet issue 2269, then search the repository for the NuGet package-fetching path and the timeout error text. Define the retry option, retry count, and backoff behavior; done means transient download failures retry when configured and still fail clearly after the retry limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli, networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.