Page MenuHomePhabricator

Quibble should support restoring npm cache from Castor
Open, Needs TriagePublic

Description

We only cache npmjs tarballs and do not save compiled/installed state (node_module). We could make Quibble faster by saving node_modules, restoring it and then running npm prune.

Past discussions: T159591 and T152386

Event Timeline

hashar moved this task from marble to Backlog on the Quibble board.
Ladsgroup subscribed.

I'll take a look, not saying will get it done but I can try playing with it. Haven't done much with quibble so be patient with me.

That was fast :D Thank you for doing this!

Change 702909 had a related patch set uploaded (by Jforrester; author: Kosta Harlan):

[integration/quibble@master] npm: Use cache flag for project directory and prefer offline

https://gerrit.wikimedia.org/r/702909

Krinkle renamed this task from Quibble should cache node_modules and use npm prune to Quibble should support restoring npm cache from Castor.Sep 21 2021, 3:34 AM

We only cache npmjs tarballs and do not save compiled/installed state (node_modules). We could make Quibble faster by saving node_modules, restoring it and then running npm prune.

The patch has moved on this from this already, but just for the record, my understanding is as follows:

  • We actually do not cache npm tarballs right now because it seems Quibble, unlike the standalone node-test jobs, does not currently configure saving/restoring the npm cache.
  • From past research in our CI setup, from upstream npm, and from the larger Node.js community, I think we can safe conclude that people have generally moved away from persisting node_modules and pruning it. I suspect this would be unstable over long periods of time and possibly slower as well due to requiring lots of checks. Even if marginally faster today, I'd expect over time npm-ci to win given its widespread use with blessing/recommendation from npm, including the GitHub ecosystem and people en-mass adopt lockfiles, use npm ci and cache .npm.
  • If we see notable time being spend in this command, the most likely suspect would be a dependency that is downloading large binaries that are not cached. I think the last one of these we saw what puppeteer, which has since been fixed.

Change 702909 abandoned by Hashar:

[integration/quibble@master] npm: Use cache for npm ci and prefer offline

Reason:

https://gerrit.wikimedia.org/r/702909