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

Attempt to fix npm install timing out ci builds #3338

Merged
merged 2 commits into from
Mar 24, 2021

Conversation

feelepxyz
Copy link
Contributor

Looks like npm installing the npm_and_yarn helpers is timing out a fair
bit on ci:
https://github.com/dependabot/dependabot-core/pull/3329/checks?check_run_id=2183869598

Seeing errors like:

npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! errno ERR_SOCKET_TIMEOUT
npm ERR! request to https://registry.npmjs.org/@jest/reporters/-/reporters-26.6.2.tgz failed, reason: Socket timeout

I also disabled npm audit when isntalling which we never look at from
the build output.

Looks like npm installing the npm_and_yarn helpers is timing out a fair
bit on ci:
https://github.com/dependabot/dependabot-core/pull/3329/checks?check_run_id=2183869598

Seeing errors like:

```
npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! errno ERR_SOCKET_TIMEOUT
npm ERR! request to https://registry.npmjs.org/@jest/reporters/-/reporters-26.6.2.tgz failed, reason: Socket timeout
```

I also disabled `npm audit` when isntalling which we never look at from
the build output.
@feelepxyz feelepxyz requested a review from a team as a code owner March 24, 2021 12:37
@@ -20,4 +20,4 @@ cp -r \
"$install_dir"

cd "$install_dir"
npm ci
npm ci --no-audit --fetch-timeout=600000
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know if this will actually fix things, docs say the timeout is already 5 mins which I'm not sure is true from the build output. https://docs.npmjs.com/cli/v7/using-npm/config#fetch-timeout

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://docs.npmjs.com/cli/v7/using-npm/config#fetch-retries seems interesting too - we may want to raise that from the default of 2.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah will try 5 and see if the build failure goes away 👍

@feelepxyz feelepxyz merged commit bb9cc2d into main Mar 24, 2021
@feelepxyz feelepxyz deleted the feelepxyz/set-high-npm-install-timeout branch March 24, 2021 15:37
@thepwagner thepwagner mentioned this pull request Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants