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

Yarn does not retry package download on server side failure #7610

Closed
zymzxq opened this issue Oct 8, 2019 · 3 comments
Closed

Yarn does not retry package download on server side failure #7610

zymzxq opened this issue Oct 8, 2019 · 3 comments
Labels
fixed-in-modern This issue has been fixed / implemented in Yarn 2+.

Comments

@zymzxq
Copy link

zymzxq commented Oct 8, 2019

Do you want to request a feature or report a bug?
bug

What is the current behavior?
Yarn does not retry downloading artifacts when the registry returns 500 responses

If the current behavior is a bug, please provide the steps to reproduce.

  1. Creating a mock webserver using javascript or python or nginx
  2. Find any existing yarn project with a yarn.lock file. Change any of the package in the lock file to download from your mocked webserver
  3. Run yarn install
  4. The url to your webserver is requested only once.

What is the expected behavior?
From the previous 2 prs: 3686 and 6413, yarn should retry on server side errors. However, the later pr seems to have introduced a bug that stops this from happening. It moved the retry logic from tarball-fetcher.js into request-manager.js and put it inside if (!params.process) condition(line 422 in request-manager.js), which eventually stopped retry from happening because params.process is always not null(see tarball-fetcher.js line 273 in the 2nd pr). It seems to be an unexpected change according to the test case.

Please mention your node.js, yarn and operating system version.
Yarn: 1.17.3
Node: 12.7.0
OS: macos mojave

@ColinHebert
Copy link

ping @arcanis, author of #6413

@rkistner
Copy link

rkistner commented Nov 1, 2019

Added a PR that should fix this issue: #7663.

@merceyz
Copy link
Member

merceyz commented Jan 4, 2021

Closing as fixed in v2 where failed requests are automatically retried

https://yarnpkg.com/getting-started/migration

@merceyz merceyz closed this as completed Jan 4, 2021
@merceyz merceyz added the fixed-in-modern This issue has been fixed / implemented in Yarn 2+. label Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed-in-modern This issue has been fixed / implemented in Yarn 2+.
Projects
None yet
Development

No branches or pull requests

4 participants