choco
choco copied to clipboard
Add Wait/Retry to handle transient errors
We frequently run into issues where Chocolatey receives a 503 or other transient error when installing or upgrading a package. We use Chocolatey via scripts that have dependencies on packages being installed, if an upstream package fails, the entire build fails.
It would be nice to have a configurable number of retries and a wait period between retries.
Also, An escalating wait period would also be a nice feature
Example: 3 Retries / 5 seconds
00:00 - choco install -y googlechrome
-- Error 503 (1st error)
[wait 5s]
00:05 - choco install -y googlechrome (1st retry)
-- Error 503 (2nd error)
[wait 10s]
00:15 - choco install -y googlechrome (2nd retry)
-- Error 504 (3rd error)
[wait 15s]
00:30 - choco install -y googlechrome (3nd retry)
Thanks for adding. :)
I guess this feature has fallen to the bottom of the list?
Hi @brettjacobson - this is up for grabs, meaning open for someone to provide a pull request for.
The code base already has a retry policy with what's requested here, so it should not be terrible for someone to add the changes. Externalizing the retries outside of choco does allow for a bit more control.
There are a lot of things we want to do and so there are competing priorities. Typically if we open up an item to Up For Grabs, it's not something we plan to do anytime soon, but we would entertain someone providing a PR. HTH
The code base already has a retry policy
Can that be configured?