Do you want to request a feature or report a bug?
Both
What is the current behavior?
Yarn sometimes shows 5xx errors when installing packages (eg. see #2769)
What is the expected behavior?
Yarn is supposed to be resilient to poor network conditions. It sounds like it might not be retrying correctly in some scenarios. We should verify that it does indeed retry on 5xx errors, by using a debugging proxy such as Fiddler to intentionally inject 500 errors and see how Yarn reacts.
@rally25rs, @gsklee, @torifat would you guys want to give this feature a try?
According to CDN logs a hundred or so times a day we get random 500 responses, they should be fixed by a retry.
I've been trying to spend my spare time on issue 3603 (reimplementing upgrade and upgrade-interactive), but if no one else has time, I can give it some attention.
I will give it a try tonight :) if @rally25rs has not done already.
You guys rock!
Guess I can go picking something else then :-p
Thanks for looking into this @torifat 馃憤
If you end up needing a hand, let me know.
@rally25rs Setting up Charles Proxy 馃槀 ...
I have spent some time on this. We already have a retry mechanism in RequestManager. But, in TarballFetcher we are using process to leverage stream. But, retry in stream is not straight forward like Promise or async-await. We have to end up doing something similar to https://github.com/stephenplusplus/retry-request/
Any suggestion? @bestander @rally25rs
Use your best judgement, retry-request code does not look too bad.