Page MenuHomePhabricator

Run npm cache verify once a day per cache instead of on every build
Closed, ResolvedPublic

Description

npm cache verify runs on every gate-and-submit / postmerge Quibble build (jjb/mediawiki.yaml) and rewrites the whole npm index each time, even when it prunes nothing. A save after a verifying build then copies ~6,100 index files, and 1289314 can never skip a save. Details: T435973#12288198.

Change: before running verify, read $(npm config get cache)/_cacache/_lastverified and skip if it is less than a day old. npm writes that file itself and castor already syncs it, so no new job or timer is needed. Use npm config get cache because the path differs between images (T427822).

Coordinate with 1333189, which adds the same every-build verify to codehealth.

Daily is a starting point; tune with the save --stats and load timings after a week.

Event Timeline

Change #1338086 had a related patch set uploaded (by Mhurd; author: Mhurd):

[integration/config@master] jjb: run npm cache verify at most once a day per cache

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

Mentioned in SAL (#wikimedia-releng) [2026-09-11T06:05:40Z] <phedenskog> Updating Jenkins jobs from https://gerrit.wikimedia.org/r/c/integration/config/+/1338086 (quibble*, api-testing-*, mwext-phpunit-coverage*): run npm cache verify at most once a day per cache T437377

Change #1338086 merged by jenkins-bot:

[integration/config@master] jjb: run npm cache verify at most once a day per cache

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