Skip to content
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

Ensure Yarn retries on 5xx errors #2849

Closed
Daniel15 opened this issue Mar 7, 2017 · 9 comments
Closed

Ensure Yarn retries on 5xx errors #2849

Daniel15 opened this issue Mar 7, 2017 · 9 comments

Comments

@Daniel15
Copy link
Member

Daniel15 commented Mar 7, 2017

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.

@bestander
Copy link
Member

@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.

@rally25rs
Copy link
Contributor

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.

@torifat
Copy link
Member

torifat commented Jun 19, 2017

I will give it a try tonight :) if @rally25rs has not done already.

@torifat torifat self-assigned this Jun 19, 2017
@bestander
Copy link
Member

You guys rock!

@gsklee
Copy link
Contributor

gsklee commented Jun 20, 2017

Guess I can go picking something else then :-p

@rally25rs
Copy link
Contributor

Thanks for looking into this @torifat 👍

If you end up needing a hand, let me know.

@torifat
Copy link
Member

torifat commented Jun 20, 2017

@rally25rs Setting up Charles Proxy 😂 ...

@torifat
Copy link
Member

torifat commented Jun 20, 2017

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

@bestander
Copy link
Member

Use your best judgement, retry-request code does not look too bad.

torifat added a commit to torifat/yarn that referenced this issue Jun 21, 2017
torifat added a commit to torifat/yarn that referenced this issue Jun 21, 2017
torifat added a commit to torifat/yarn that referenced this issue Jun 21, 2017
torifat added a commit to torifat/yarn that referenced this issue Jun 22, 2017
torifat added a commit to torifat/yarn that referenced this issue Jun 25, 2017
torifat added a commit to torifat/yarn that referenced this issue Jun 25, 2017
torifat added a commit to torifat/yarn that referenced this issue Jun 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants