Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
npm: Use cache for npm ci and prefer offline | integration/quibble | master | +24 -2 |
Related Objects
Event Timeline
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.
@Ladsgroup coincidentally, I just pushed https://gerrit.wikimedia.org/r/c/integration/quibble/+/702909
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
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: