Windows builds spuriously fails on choco install in GitLab CI/CD
Steps to reproduce
Trigger a GitLab pipeline run. If it doesn't fail; repeat.
$ choco install -y grep Chocolatey v0.10.15 Installing the following packages: grep By installing you accept licenses for the packages. Progress: Downloading grep 2.1032... 100% grep v2.1032 [Approved] - Likely broken for FOSS users (due to download location changes) grep package files install completed. Performing other installation steps. Downloading grep 64 bit from 'https://sourceforge.net/projects/ezwinports/files/grep-2.10-w32-bin.zip/download' ERROR: The remote file either doesn't exist, is unauthorized, or is forbidden for url 'https://sourceforge.net/projects/ezwinports/files/grep-2.10-w32-bin.zip/download'. Exception calling "GetResponse" with "0" argument(s): "Unable to connect to the remote server" This package is likely not broken for licensed users - see https://chocolatey.org/docs/features-private-cdn. The install of grep was NOT successful. Error while running 'C:\ProgramData\chocolatey\lib\grep\tools\chocolateyinstall.ps1'. See log for details. Chocolatey installed 0/1 packages. 1 packages failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). Failures - grep (exited 404) - Error while running 'C:\ProgramData\chocolatey\lib\grep\tools\chocolateyinstall.ps1'. See log for details. Uploading artifacts for failed job 00:09 ERROR: Job failed: exit status 1
The full log is here
GitLab Windows runner, amd64.
N/A, but most certainly still happens on the current tip: 34348b82
This probelm was mentioned in !1454 (comment 373714546)
I've seen this maybe 5-10 times and every time that I have made a job retry, the job succeeded. Unfortunately, there seems to be no way to see the previous job log after a retry so I cannot link to more examples.
I suspect it might be a download bandwidth issue. If it is, we will avoid it once we start using Docker containers also for Windows builds since we then will have all dependencies already installed.
GitLab CI/CD has a retry that may be useful to work around this problem.