<div dir="ltr">If we were to upgrade npm to 5+ (I think) that would support package-lock.json<br><a href="https://docs.npmjs.com/files/package-lock.json">https://docs.npmjs.com/files/package-lock.json</a><br><br>That file would be committed to our code repository and allow the CI to skip the dependency resolution step(s). This means that the tar/zip or clone would happen directly without involving <a href="http://registry.npmjs.org">registry.npmjs.org</a> at all.<br><br>Upgrading npm (and adding a package-lock.json file) might be outside of the scope of this issue, but I think it would help mitigate/resolve the problem.</div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jun 28, 2018 at 10:26 AM Antoine Musso <<a href="mailto:hashar%2Bwmf@free.fr">hashar+wmf@free.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
Since June 27th, any CI job running 'npm install' might suffer from a 10<br>
minutes extra delay.<br>
<br>
Somehow when requesting package informations from the NpmJS CDN<br>
(CloudFlare), the connection holds for ten minutes.  npm just idles<br>
waiting for a reply. Then eventually it shows:<br>
<br>
  npm ERR! registry error parsing json<br>
<br>
npm then retry and process as usual.<br>
<br>
<br>
The json error is due to a CloudFlare HTML page stating:<br>
<br>
 The page could not be rendered due to a temporary fault.<br>
<br>
<br>
The impact is any Jenkins job using npm have a high chance of taking 10<br>
more minutes to build.  That notably impacts MediaWiki core and all its<br>
extensions.<br>
<br>
<br>
A few minutes ago, I have made a change to run npm with --loglevel=info<br>
which would give some hints about what it is doing by causing npm to<br>
emit more informations in the console.  (verbose would be way too much<br>
log though).<br>
<br>
I have filled a bug to npm: <a href="https://github.com/npm/npm/issues/21101" rel="noreferrer" target="_blank">https://github.com/npm/npm/issues/21101</a><br>
Our task: <a href="https://phabricator.wikimedia.org/T198348" rel="noreferrer" target="_blank">https://phabricator.wikimedia.org/T198348</a><br>
<br>
<br>
I have no idea how to mitigate the issue :-(<br>
<br>
-- <br>
Antoine "hashar" Musso<br>
<br>
<br>
_______________________________________________<br>
Wikitech-l mailing list<br>
<a href="mailto:Wikitech-l@lists.wikimedia.org" target="_blank">Wikitech-l@lists.wikimedia.org</a><br>
<a href="https://lists.wikimedia.org/mailman/listinfo/wikitech-l" rel="noreferrer" target="_blank">https://lists.wikimedia.org/mailman/listinfo/wikitech-l</a></blockquote></div>