Retry downloads when failure is caused by transient network problems
- 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
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