You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run job on master branch with cached yarn install with the following cache config cache(maxCacheSize: 10000, defaultBranch: 'master', caches:[ arbitraryFileCache( cacheName: 'yarn_install_cache', path: './', includes: '**/node_modules/**/*,.yarn/install-state.gz', excludes: '**/node_modules/@repo/**/*', cacheValidityDecidingFile: 'yarn.lock', compressionMethod: 'TAR_ZSTD' ) ]) { sh 'yarn install' }
Run job on another branch with cached yarn install with the same cache config
Expected Results
I think when we have cache hit from default caches it should be copied to job caches, not created again from scratch
Actual Results
`
[Cache for ./ (yarn_install_cache) with id 0374ec857381230fa83049643ce3cdee] Searching cache in job specific caches...
[Cache for ./ (yarn_install_cache) with id 0374ec857381230fa83049643ce3cdee] Searching cache in default caches...
[Cache for ./ (yarn_install_cache) with id 0374ec857381230fa83049643ce3cdee] got hash 1bb160d6d3bd445af936d09bbc7acc99 for cacheValidityDecidingFile(s) - actual file(s): /home/jenkins/agent/workspace/ext-mui-turborepo-template_PR-45/yarn.lock
[Cache for ./ (yarn_install_cache) with id 0374ec857381230fa83049643ce3cdee] Found cache in default caches
[Cache for ./ (yarn_install_cache) with id 0374ec857381230fa83049643ce3cdee] Restoring cache...
[Cache for ./ (yarn_install_cache) with id 0374ec857381230fa83049643ce3cdee] Cache restored in 52182ms
[Pipeline] {
[Pipeline] sh
yarn install
! Corepack is about to download https://repo.yarnpkg.com/4.3.1/packages/yarnpkg-cli/bin/yarn.js
➤ YN0000: · Yarn 4.3.1
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 0s 708ms
➤ YN0000: ┌ Post-resolution validation
➤ YN0060: │ @typescript-eslint/eslint-plugin is listed by your project with version 7.17.0 (pf918f), which doesn't satisfy what eslint-plugin-unused-imports requests (^8.0.0).
➤ YN0060: │ eslint is listed by your project with version 8.57.0 (p55e30), which doesn't satisfy what @typescript-eslint/eslint-plugin and other dependencies request (but they have non-overlapping ranges!).
➤ YN0086: │ Some peer dependencies are incorrectly met by your project; run yarn explain peer-requirements for details, where is the six-letter p-prefixed code.
➤ YN0086: │ Some peer dependencies are incorrectly met by dependencies; run yarn explain peer-requirements for details.
➤ YN0000: └ Completed in 0s 285ms
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 21s 507ms
➤ YN0000: ┌ Link step
➤ YN0008: │ sharp@npm:0.33.4 must be rebuilt because its dependency tree changed
➤ YN0008: │ esbuild@npm:0.20.2 must be rebuilt because its dependency tree changed
➤ YN0008: │ core-js-pure@npm:3.37.1 must be rebuilt because its dependency tree changed
➤ YN0000: └ Completed in 3s 82ms
➤ YN0000: · Done with warnings in 26s 74ms
[Pipeline] }
[Cache for ./ (yarn_install_cache) with id 0374ec857381230fa83049643ce3cdee] Creating cache...
[Cache for ./ (yarn_install_cache) with id 0374ec857381230fa83049643ce3cdee] got hash 1bb160d6d3bd445af936d09bbc7acc99 for cacheValidityDecidingFile(s) - actual file(s): /home/jenkins/agent/workspace/ext-mui-turborepo-template_PR-45/yarn.lock
[Cache for ./ (yarn_install_cache) with id 0374ec857381230fa83049643ce3cdee] Cache created in 182172ms`
Anything else?
I checked it also with yarn install --immutable to make sure it doesn't modify yarn.lock and I have the same result
Are you interested in contributing a fix?
No response
The text was updated successfully, but these errors were encountered:
Thanks for your suggestion. I agree, maybe it should not even be copied when the default cache is valid.
Especially when cache creation needs so much time...
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
I'm using Jenkins on Kubernetes:
Reproduction steps
yarn install
with the following cache configcache(maxCacheSize: 10000, defaultBranch: 'master', caches:[ arbitraryFileCache( cacheName: 'yarn_install_cache', path: './', includes: '**/node_modules/**/*,.yarn/install-state.gz', excludes: '**/node_modules/@repo/**/*', cacheValidityDecidingFile: 'yarn.lock', compressionMethod: 'TAR_ZSTD' ) ]) { sh 'yarn install' }
yarn install
with the same cache configExpected Results
I think when we have cache hit from default caches it should be copied to job caches, not created again from scratch
Actual Results
`
[Cache for ./ (yarn_install_cache) with id 0374ec857381230fa83049643ce3cdee] Searching cache in job specific caches...
[Cache for ./ (yarn_install_cache) with id 0374ec857381230fa83049643ce3cdee] Searching cache in default caches...
[Cache for ./ (yarn_install_cache) with id 0374ec857381230fa83049643ce3cdee] got hash 1bb160d6d3bd445af936d09bbc7acc99 for cacheValidityDecidingFile(s) - actual file(s): /home/jenkins/agent/workspace/ext-mui-turborepo-template_PR-45/yarn.lock
[Cache for ./ (yarn_install_cache) with id 0374ec857381230fa83049643ce3cdee] Found cache in default caches
[Cache for ./ (yarn_install_cache) with id 0374ec857381230fa83049643ce3cdee] Restoring cache...
[Cache for ./ (yarn_install_cache) with id 0374ec857381230fa83049643ce3cdee] Cache restored in 52182ms
[Pipeline] {
[Pipeline] sh
! Corepack is about to download https://repo.yarnpkg.com/4.3.1/packages/yarnpkg-cli/bin/yarn.js
➤ YN0000: · Yarn 4.3.1
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 0s 708ms
➤ YN0000: ┌ Post-resolution validation
➤ YN0060: │ @typescript-eslint/eslint-plugin is listed by your project with version 7.17.0 (pf918f), which doesn't satisfy what eslint-plugin-unused-imports requests (^8.0.0).
➤ YN0060: │ eslint is listed by your project with version 8.57.0 (p55e30), which doesn't satisfy what @typescript-eslint/eslint-plugin and other dependencies request (but they have non-overlapping ranges!).
➤ YN0086: │ Some peer dependencies are incorrectly met by your project; run yarn explain peer-requirements for details, where is the six-letter p-prefixed code.
➤ YN0086: │ Some peer dependencies are incorrectly met by dependencies; run yarn explain peer-requirements for details.
➤ YN0000: └ Completed in 0s 285ms
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 21s 507ms
➤ YN0000: ┌ Link step
➤ YN0008: │ sharp@npm:0.33.4 must be rebuilt because its dependency tree changed
➤ YN0008: │ esbuild@npm:0.20.2 must be rebuilt because its dependency tree changed
➤ YN0008: │ core-js-pure@npm:3.37.1 must be rebuilt because its dependency tree changed
➤ YN0000: └ Completed in 3s 82ms
➤ YN0000: · Done with warnings in 26s 74ms
[Pipeline] }
[Cache for ./ (yarn_install_cache) with id 0374ec857381230fa83049643ce3cdee] Creating cache...
[Cache for ./ (yarn_install_cache) with id 0374ec857381230fa83049643ce3cdee] got hash 1bb160d6d3bd445af936d09bbc7acc99 for cacheValidityDecidingFile(s) - actual file(s): /home/jenkins/agent/workspace/ext-mui-turborepo-template_PR-45/yarn.lock
[Cache for ./ (yarn_install_cache) with id 0374ec857381230fa83049643ce3cdee] Cache created in 182172ms`
Anything else?
I checked it also with
yarn install --immutable
to make sure it doesn't modifyyarn.lock
and I have the same resultAre you interested in contributing a fix?
No response
The text was updated successfully, but these errors were encountered: