-
Notifications
You must be signed in to change notification settings - Fork 13
retry network operations 3 times #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
To avoid transient network or server issues. Fixes #9
x-ref: "retry network operations 3 times" cygwin/cygwin-install-action#25
|
Tested here and failed: https://github.com/gstrauss/lighttpd1.4/actions/runs/14082875060/job/39439677948 The workflow is configured Would you file an issue (elsewhere) to request upgrading PS in the github Windows CI runners? |
@gstrauss Thanks a lot for testing! I'd prefer not to file it there, it's too far down the rabbit hole. That said an upgrade would be nice indeed, not just for this. |
@vszakats How will that flag fix #9 as you suggested in your original post? The failures are not 4xx or 5xx. |
|
It's the laziest fix to offer some kind of retry. The reasons for a failure can be many. I delete the reference to #9. But, since this doesn't work anyway due to lack of support in PowerShell, I guess a better approach would be using curl with |
|
Please review #26 |
|
Well, I'm not a windows expert here. With powershell 6 and 7, With some more testing, I found that if your PR changed |
|
@jon-turney should this PR be resurrected? Or would you prefer a separate PR to change |
|
@jon-turney: Thanks for #26. LGTM, made a comment there. |
x-ref: "retry network operations 3 times" cygwin/cygwin-install-action#25
x-ref: "retry network operations 3 times" cygwin/cygwin-install-action#25
The documentation seems to indicate that MaximumRetryCount doesn't do anything on socket connection refused or timeout, so it's effective a worthless option. So, thanks for the PR, but this seems hobbled into uselessness by choices made in pwsh. |
Yes. I was able to test this a few days ago when retrieving setup.exe from the mirror was for some reason slow. Even using |
To avoid transient network or server issues.
I'm not sure if the required PowerShell is present in CI runners. 5.1 doesn't support this option, 7.4 (LTS) does.
A CI run should clarify it.
Ref: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/invoke-webrequest?view=powershell-7.4#-maximumretrycount