choco icon indicating copy to clipboard operation
choco copied to clipboard

Add Wait/Retry to handle transient errors

Open dhekimian opened this issue 9 years ago • 4 comments

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)

dhekimian avatar Aug 10 '15 20:08 dhekimian

Thanks for adding. :)

ferventcoder avatar Aug 10 '15 21:08 ferventcoder

I guess this feature has fallen to the bottom of the list?

brettjacobson avatar Mar 28 '20 20:03 brettjacobson

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

ferventcoder avatar Apr 20 '20 17:04 ferventcoder

The code base already has a retry policy

Can that be configured?

mihai-unity avatar Sep 19 '22 07:09 mihai-unity