-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
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.
- Creating a mock webserver using javascript or python or nginx
- Find any existing yarn project with a
yarn.lockfile. Change any of the package in the lock file to download from your mocked webserver - Run
yarn install - 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