Repository navigation
Jest generating thousands of new transform cache files on every CI run and and provides no performance improvement. #16264
Unanswered
tejasbagal1
asked this question in
Q&A
Replies: 2 comments
|
Set transform: {
'^.+\\.(ts|js|mjs|html|svg)$': [
'jest-preset-angular',
{ isolatedModules: true, babelConfig: true },
],
},With isolated modules off, ts-jest hashes Your Mac/RHEL tree keeps those mtimes, so the same cache can hit there. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello everyone,
We are running a large Angular application (~1337 test suites, ~14k tests) in a Tekton/Kubernetes CI pipeline using Jest 29, ts-jest, jest-preset-angular, Babel (babelConfig: true), and coverage enabled (jest --coverage).
We configured a persistent Jest cache:
cacheDirectory": "<rootDir>/.jest-cache"At the end of each pipeline run, the
.jest-cachedirectory is archived and stored in object storage. Before the next run, it is restored to the same location.The cache is successfully restored and existing cache files are being reused. However, on every pipeline run:
212 MB→579 MB)~5,900to~15,600filesNotable thing is workspace path remains unchanged,
Node.js,Yarn,Jest, andts-jestversions remain unchanged, The Jest transform cache directory hash remains the same across runs and Each CI execution runs in a new Tekton/Kubernetes podFor comparison, the same project on my local machine macOS and a RHEL VM behaves as expected: the cache stabilizes after the first run and subsequent test runs are significantly faster.
Has anyone seen
Jest/ts-jestcaches continuously grow across Kubernetes/Tekton runs despite stable paths and tool versions?Are there known factors that influence cache keys and could cause partial cache misses in ephemeral container environments?
All reactions