wordpress-mobile / gutenberg-mobile

Mobile version of Gutenberg - native iOS and Android
GNU General Public License v2.0
236 stars 55 forks source link

Try --maxsockets flag to limit ECONNRESET failures #6742

Closed geriux closed 4 months ago

geriux commented 4 months ago

This PR adds a workaround for the following issue with npm ci following suggestions from https://github.com/npm/cli/issues/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: