.yarn/cache not updated for node update branches
#44178
Unanswered
klippx
asked this question in
Request Help
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
How are you running Renovate?
Self-hosted Renovate CLI
Which platform you running Renovate on?
GitHub.com
Which version of Renovate are you using?
43.236.0
Please tell us more about your question or problem
Problem
We use Yarn 4 with
nodeLinker: node-modulesand a committed.yarn/cachedirectory. We havepostUpgradeTasksconfigured to runyarn installand commit.yarn/cache/**changes.This works correctly for pure npm update branches (e.g.
renovate/opentelemetry), but fails for branches that combinegithub-actionsandnpmupdates (e.g.renovate/node-24.xwhich bumps bothsetup-nodeversions and@types/node). The.yarn/cachezip files for the new package versions are simply missing from the commit.Analysis
Running with
LOG_LEVEL=debug, I found that within the same Renovate run, the zero-install detection is inconsistent:Branch
renovate/node-24.x(github-actions + npm, processed first):Branch
renovate/opentelemetry(pure npm, processed seconds later):The node-24.x branch gets
YARN_ENABLE_GLOBAL_CACHEinjected into the environment, which causes yarn to write packages to a global folder instead of.yarn/cache. The opentelemetry branch does not get this override and works correctly.Earlier in the same run, Renovate correctly logs
"Detected Yarn zero-install in ./.yarn/cache"for all package files during initial scanning. So it knows the cache is there, but then ignores it for certain branches.Config
{ "enabledManagers": ["dockerfile", "github-actions", "npm", "mise"], "extends": ["config:best-practices", "config:js-app"], "postUpdateOptions": ["yarnDedupeHighest"], "packageRules": [ { "matchManagers": ["npm", "github-actions"], "postUpgradeTasks": { "commands": ["yarn install"], "executionMode": "branch", "fileFilters": [".yarn/cache/**"] } } ] }.yarnrc.yml:Impact
These branches will fail by default and need manual intervention. Which is a shame since all other
npmupdate types are automatically handled by renovate.Related issues
Yarn cache is not updated when npm updates are grouped with Docker image updates
Logs (if relevant)
Logs
Beta Was this translation helpful? Give feedback.
All reactions