microsoft / microsoft/winget-cli
Alternate URLs are needed for packages too, not just winget sources
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Description of the new feature / enhancement
in pull request https://github.com/microsoft/winget-cli/pull/2970 support was added for alternate URLs for some of winget's sources, but we also need support for alternate URLs for packages too.
e.g. LibreOffice and issue https://github.com/microsoft/winget-pkgs/issues/99420
-
the main download URLs should be on https://download.documentfoundation.org/libreoffice/stable/ - this download repository is served via a CDN, but only contains the last 3 (or so) releases
-
winget seems to have decided to (ab)use the https://downloadarchive.documentfoundation.org/libreoffice/ repository because this one contains all the LibreOffice releases. The problem with this one is that the downloadarchive is NOT served via a full CDN, but most files are served directly by a single server at The Document Foundation. As a result, it is lately suffocated with download requests, to the point it has become very slow to use.
Proposed technical implementation details
It is needed some sort of "alternate url" to be able to specify for winget to use when downloading packages (LibreOffice in this sample case)
- main URL should be served from the CDN, via https://download.documentfoundation.org/libreoffice/stable/
- and only fallback to use the other server https://downloadarchive.documentfoundation.org/libreoffice/ as a last resort, when at least 2...3 attempts (or more) have failed at downloading from the main url.
Also please add support to customize the retry counter, with a default of 3 retries.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing pull request #2970 to understand the existing alternate-URL support, then compare it with the LibreOffice example in winget-pkgs issue #99420. Define how package download URLs should fall back from the CDN to the archive after failed attempts, and how a configurable retry count with a default of three should behave.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100