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

Try --maxsockets flag to limit ECONNRESET failures #6742

Merged
merged 3 commits into from
Mar 20, 2024
Merged

Conversation

geriux
Copy link
Contributor

@geriux geriux commented Mar 15, 2024

This PR adds a workaround for the following issue with npm ci following suggestions from npm/cli#4652

  [2024-03-19T10:20:29Z] npm ERR! code ECONNRESET
  | [2024-03-19T10:20:29Z] npm ERR! network aborted
  | [2024-03-19T10:20:29Z] npm ERR! network This is a problem related to network connectivity.
  | [2024-03-19T10:20:29Z] npm ERR! network In most cases you are behind a proxy or have bad network settings.
  | [2024-03-19T10:20:29Z] npm ERR! network
  | [2024-03-19T10:20:29Z] npm ERR! network If you are behind a proxy, please make sure that the
  | [2024-03-19T10:20:29Z] npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
  | [2024-03-19T10:20:29Z]

Example of the above issue.

Currently, this constant failure only affects Android jobs in PR and trunk builds.

With these changes, it will set a maximum of 1 for the maxsockets flag and it will keep the default value of 15 for Mac jobs.

This branch has triggered CI several times and the npm issue didn't happen, some other failures were encountered like having artifacts already published (due to re-triggering the build job) and i18 issues that might be solved once we add cache.

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered if this change warrants user-facing release notes more info and have added them to RELEASE-NOTES.txt if necessary.

@geriux geriux added the Tooling label Mar 15, 2024
Gerardo added 2 commits March 19, 2024 11:29
…ckets flag with a value that will change depending on the platform, for Mac jobs it'll use the default value from npm which is 15, for Linux it will use a value of 1 to prevent ECONNRESET errors
@geriux geriux requested a review from twstokes March 19, 2024 11:52
@geriux geriux marked this pull request as ready for review March 19, 2024 11:52
Copy link
Contributor

@twstokes twstokes left a comment

Choose a reason for hiding this comment

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

🤞

@geriux geriux merged commit fbdcf1a into trunk Mar 20, 2024
20 checks passed
@geriux geriux deleted the try/limit-sockets-npm branch March 20, 2024 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants