-
Notifications
You must be signed in to change notification settings - Fork 2.7k
fix(npm/pnpm): revert "fix(npm/pnpm): redirect cache and store dir" to attempt to fix pnpm dedupe
hanging
#36554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(npm/pnpm): revert "fix(npm/pnpm): redirect cache and store dir" to attempt to fix pnpm dedupe
hanging
#36554
Conversation
This reverts commit 8fb6a9c.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to investigate deeper. I'm also using pnpm with dedupe and don't see that issue 🤔
Thanks for the investigation! I'll reply to your comment from the discussion here:
Via My config: {
extends: [
'config:base',
// Upgrade all remark packages with URL prefix https://github.com/remarkjs/
// https://github.com/renovatebot/renovate/pull/25969
'group:remark',
],
ignorePresets: [':prHourlyLimit2'],
// Run `pnpm dedupe` after pnpm-lock.yaml updates
// https://docs.renovatebot.com/configuration-options/#:~:text=for%20npm%20%3C%3D%206.-,pnpmDedupe,pnpm%20dedupe%20%2D%2Dconfig.ignore%2Dscripts%3Dtrue%20after%20pnpm%2Dlock.yaml%20updates.,-yarnDedupeFewer
postUpdateOptions: ['pnpmDedupe'],
// Allow the major versions in the `dependency upgrades - non-major` groups
// below to be combined with the minors and patches
// https://github.com/renovatebot/renovate/issues/18211#issuecomment-1272521018
separateMajorMinor: false,
packageRules: [
{
groupName: 'github-actions dependency upgrades - major',
matchManagers: ['github-actions'],
matchPackageNames: ['pnpm/action-setup'],
matchPackagePatterns: ['^actions/'],
updateTypes: ['major'],
automerge: true,
},
{
groupName: 'dependency upgrades - non-major',
matchDepTypes: [
'devDependencies',
'dependencies',
'peerDependencies',
'resolutions',
'overrides',
'pnpm.overrides',
'packageManager',
],
updateTypes: ['patch', 'minor'],
automerge: true,
},
{
groupName: 'dependency upgrades - non-major',
matchDepTypes: [
'devDependencies',
'dependencies',
'peerDependencies',
'resolutions',
'overrides',
'pnpm.overrides',
'packageManager',
],
updateTypes: ['major'],
matchPackageNames: ['eslint-plugin-unicorn'],
automerge: true,
},
{
groupName: 'dependency upgrades - major',
matchDepTypes: [
'devDependencies',
'dependencies',
'peerDependencies',
'resolutions',
'overrides',
'pnpm.overrides',
'packageManager',
],
updateTypes: ['major'],
matchPackagePatterns: ['^eslint-plugin-unicorn'],
},
{
description: 'Enable major version upgrades of @types/node https://github.com/renovatebot/renovate/issues/1463#issuecomment-875014401',
matchManagers: ['npm'],
matchPackageNames: ['@types/node'],
versioning: 'npm',
},
// Disabled since these GitHub Actions don't get major version bumps often
// {
// "groupName": "GitHub Official Actions - major",
// "matchDepTypes": ["action"],
// "updateTypes": ["major"],
// "matchPackageNames": ["actions/checkout", "actions/setup-node", "actions/upload-artifact"],
// "automerge": true
// },
{
matchCurrentVersion: '>=4.0.0',
matchDatasources: ['npm'],
matchPackageNames: ['@upleveled/eslint-config-upleveled'],
replacementName: 'eslint-config-upleveled',
replacementVersion: '4.0.12',
},
{
matchCurrentVersion: '>=2.0.0',
matchDatasources: ['npm'],
matchPackageNames: ['@upleveled/eslint-plugin-upleveled'],
replacementName: 'eslint-plugin-upleveled',
replacementVersion: '2.1.7',
},
],
schedule: 'after 4pm on thursday',
vulnerabilityAlerts: {
schedule: null,
},
// Remediate vulnerabilities in transitive dependencies
// https://docs.renovatebot.com/configuration-options/#transitiveremediation
transitiveRemediation: true,
} Source: https://github.com/karlhorky/renovate-config/blob/main/default.json5 |
It appears that @peterhirn is also configuring {
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
":semanticCommits",
"config:best-practices",
"group:monorepos",
"group:recommended"
],
"postUpdateOptions": ["pnpmDedupe"],
"lockFileMaintenance": {
"enabled": true,
"automerge": true
},
"packageRules": [
{ "matchDepNames": ["node"], "ignoreUnstable": false },
{
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
"matchCurrentVersion": "!/^0/",
"automerge": true
}
]
} |
can you create a minimal reproduction please? |
1 similar comment
This comment has been minimized.
This comment has been minimized.
Sure, minimal reproduction here (also added to PR description above): |
@viceice I checked the Dependency Dashboard of the reproduction just now, and I see that it is still hanging (screenshots above - I toggled the checkbox in the Dependency Dashboard yesterday) The main parts of the reproduction:
{
"extends": ["config:base"],
"postUpdateOptions": ["pnpmDedupe"],
"packageRules": [
{
"groupName": "dependency upgrades - non-major",
"matchDepTypes": ["devDependencies", "packageManager"],
"updateTypes": ["patch", "minor"]
}
]
}
{
"devDependencies": {
"stylelint": "16.19.1"
},
"packageManager": "[email protected]+sha512.d615db246fe70f25dcfea6d8d73dee782ce23e2245e3c4f6f888249fb568149318637dca73c2c5c8ef2a4ca0d5657fb9567188bfab47f566d1ee6ce987815c39"
} Show Renovate logs
Any ideas? |
@karlhorky does it only hang if you have that packageRules grouping? |
does it still reproduce without the package rule for grouping? it seems we use the wrong pnpm version for dedupe when pnpm is updated in same PR. |
I believe the hanging ( But |
Hi there, Please don't merge from Thanks, The Renovate team |
So are these problems only when pnpm itself is being upgraded? |
In my testing so far, yes. |
When I ran this PR/branch against https://github.com/renovate-reproductions/36554a it still had the same problem:
I'm pretty sure I haven't made a mistake in my reproduction. If this PR does not fix it, it's not the place to be having Discussions |
Removing pnpmDedupe from the reproduction let it complete successfully. Both reproduction repos work if the |
Oh nice, thanks for that! Maybe that should be the default Unusual that the Committed in my shared Renovate config here, let's see what happens 🤞 |
Hmm, first retry of other existing repos failed in the same way with Show logs
I thought maybe there was some caching of the shared config going on here, but it appears that Renovate received my config update:
Wonder if it has to do with some bad cached state on Renovate with this particular repo... 🤔 I would try resetting this, if there were controls somewhere... |
Yeah, still hanging for multiple runs now, with different repos now:
I'll fork my reproduction and see if I can reproduce it with the simple version without shared config - it will appear here: |
Renovate fails to create Dependency DashboardAnother interesting (potentially much worse for onboarding) hanging-type behavior with The Dependency Dashboard issue does not appear for such repos - so if:
...a Dependency Dashboard issue will not appear at all and Renovate will appear to be not working at all. That's what I'm currently experiencing on the new reproduction: I'll leave this reproduction open at the |
So I created a 3rd reproduction (always waiting ~16 minutes after any change). I can confirm that it's possible to un-hang a repo with simple config (not using Shared Config Presets) by applying the My commit applying the The created PR: So @peterhirn it may be worth a try for you, since you're not using Shared Config Presets. For the repos upleveled/portfolio-cms#22 and upleveled/next-starter-peacock#34 (and many others) using Shared Config Presets of my Shared Config Preset
So it appears as if there needs to be some kind of manual "reset" or "cache clearing" done for the bad state that Renovate is remembering about these Shared Config Presets repos - although I do not know how to do this 🤔 |
Update: I tried committing invalid JSON in
|
Update 2: I tried to change the ![]() ![]() @rarkins @viceice @HonkingGoose is there a way for me to manually reset the bad saved state that Renovate appears to have about the repo / Shared Config Preset? Or maybe the suggested My Shared Config Preset here: {
extends: [
'config:base',
// Upgrade all remark packages with URL prefix https://github.com/remarkjs/
// https://github.com/renovatebot/renovate/pull/25969
'group:remark',
],
ignorePresets: [':prHourlyLimit2'],
// Allow the major versions in the `dependency upgrades - non-major` groups
// below to be combined with the minors and patches
// https://github.com/renovatebot/renovate/issues/18211#issuecomment-1272521018
separateMajorMinor: false,
packageRules: [
// Run `pnpm dedupe` after pnpm-lock.yaml updates
// - https://docs.renovatebot.com/configuration-options/#:~:text=for%20npm%20%3C%3D%206.-,pnpmDedupe,pnpm%20dedupe%20%2D%2Dconfig.ignore%2Dscripts%3Dtrue%20after%20pnpm%2Dlock.yaml%20updates.,-yarnDedupeFewer
// - https://github.com/renovatebot/renovate/pull/36554#issuecomment-2988439293
{
matchPackageNames: ['!pnpm'],
postUpdateOptions: ['pnpmDedupe'],
},
{
groupName: 'github-actions dependency upgrades - major',
matchManagers: ['github-actions'],
matchPackageNames: ['pnpm/action-setup'],
matchPackagePatterns: ['^actions/'],
updateTypes: ['major'],
automerge: true,
},
{
groupName: 'dependency upgrades - non-major',
matchDepTypes: [
'devDependencies',
'dependencies',
'peerDependencies',
'resolutions',
'overrides',
'pnpm.overrides',
'packageManager',
],
updateTypes: ['patch', 'minor'],
automerge: true,
},
{
groupName: 'dependency upgrades - non-major',
matchDepTypes: [
'devDependencies',
'dependencies',
'peerDependencies',
'resolutions',
'overrides',
'pnpm.overrides',
'packageManager',
],
updateTypes: ['major'],
matchPackageNames: ['eslint-plugin-unicorn'],
automerge: true,
},
{
groupName: 'dependency upgrades - major',
matchDepTypes: [
'devDependencies',
'dependencies',
'peerDependencies',
'resolutions',
'overrides',
'pnpm.overrides',
'packageManager',
],
updateTypes: ['major'],
matchPackagePatterns: ['^eslint-plugin-unicorn'],
},
{
description: 'Enable major version upgrades of @types/node https://github.com/renovatebot/renovate/issues/1463#issuecomment-875014401',
matchManagers: ['npm'],
matchPackageNames: ['@types/node'],
versioning: 'npm',
},
// Disabled since these GitHub Actions don't get major version bumps often
// {
// "groupName": "GitHub Official Actions - major",
// "matchDepTypes": ["action"],
// "updateTypes": ["major"],
// "matchPackageNames": ["actions/checkout", "actions/setup-node", "actions/upload-artifact"],
// "automerge": true
// },
{
matchCurrentVersion: '>=4.0.0',
matchDatasources: ['npm'],
matchPackageNames: ['@upleveled/eslint-config-upleveled'],
replacementName: 'eslint-config-upleveled',
replacementVersion: '4.0.12',
},
{
matchCurrentVersion: '>=2.0.0',
matchDatasources: ['npm'],
matchPackageNames: ['@upleveled/eslint-plugin-upleveled'],
replacementName: 'eslint-plugin-upleveled',
replacementVersion: '2.1.7',
},
],
schedule: 'after 4pm on thursday',
vulnerabilityAlerts: {
schedule: null,
},
// Remediate vulnerabilities in transitive dependencies
// https://docs.renovatebot.com/configuration-options/#transitiveremediation
transitiveRemediation: true,
} I would change to a different Shared Config Preset URL (eg. by forking) to temporarily try that out to see if it helps, but if it does, I would want to afterwards switch back to the original URL and fix the bad saved state in Renovate... |
Another thing I could imagine trying is to remove the content of the pnpm lockfile, while leaving the file - maybe that would be a workaround? 🤔 |
pnpm dedupe
hanging
Workaround for Shared Config Presets +
|
Hmm... spoke too soon - there is still hanging behavior even with the workaround above. An So this problem doesn't only affect the Show logs
Config: {
"extends": ["github>karlhorky/renovate-config:default.json5"]
} Shared Config Preset: {
extends: [
'config:base',
// Upgrade all remark packages with URL prefix https://github.com/remarkjs/
// https://github.com/renovatebot/renovate/pull/25969
'group:remark',
],
ignorePresets: [':prHourlyLimit2'],
// Allow the major versions in the `dependency upgrades - non-major` groups
// below to be combined with the minors and patches
// https://github.com/renovatebot/renovate/issues/18211#issuecomment-1272521018
separateMajorMinor: false,
packageRules: [
// Run `pnpm dedupe` after pnpm-lock.yaml updates
// - https://docs.renovatebot.com/configuration-options/#:~:text=for%20npm%20%3C%3D%206.-,pnpmDedupe,pnpm%20dedupe%20%2D%2Dconfig.ignore%2Dscripts%3Dtrue%20after%20pnpm%2Dlock.yaml%20updates.,-yarnDedupeFewer
// - https://github.com/renovatebot/renovate/pull/36554#issuecomment-2988439293
{
matchPackageNames: ['!pnpm'],
postUpdateOptions: ['pnpmDedupe'],
},
{
groupName: 'github-actions dependency upgrades - major',
matchManagers: ['github-actions'],
matchPackageNames: ['pnpm/action-setup'],
matchPackagePatterns: ['^actions/'],
updateTypes: ['major'],
automerge: true,
},
// "postUpdateOptions": ["pnpmDedupe"] currently cannot be applied to `pnpm`
// - https://github.com/renovatebot/renovate/pull/36554#issuecomment-2991578549
{
groupName: 'pnpm upgrades - non-major',
matchDepTypes: ['packageManager'],
matchPackageNames: ['pnpm'],
updateTypes: ['patch', 'minor'],
automerge: true,
},
{
groupName: 'dependency upgrades - non-major',
matchDepTypes: [
'devDependencies',
'dependencies',
'peerDependencies',
'resolutions',
'overrides',
'pnpm.overrides',
'packageManager',
],
matchPackageNames: [
// "postUpdateOptions": ["pnpmDedupe"] currently cannot be applied to `pnpm`
// - https://github.com/renovatebot/renovate/pull/36554#issuecomment-2991578549
'!pnpm',
],
updateTypes: ['patch', 'minor'],
automerge: true,
},
{
groupName: 'dependency upgrades - non-major',
matchDepTypes: [
'devDependencies',
'dependencies',
'peerDependencies',
'resolutions',
'overrides',
'pnpm.overrides',
'packageManager',
],
updateTypes: ['major'],
matchPackageNames: ['eslint-plugin-unicorn'],
automerge: true,
},
{
groupName: 'dependency upgrades - major',
matchDepTypes: [
'devDependencies',
'dependencies',
'peerDependencies',
'resolutions',
'overrides',
'pnpm.overrides',
'packageManager',
],
updateTypes: ['major'],
matchPackagePatterns: ['^eslint-plugin-unicorn'],
},
{
description: 'Enable major version upgrades of @types/node https://github.com/renovatebot/renovate/issues/1463#issuecomment-875014401',
matchManagers: ['npm'],
matchPackageNames: ['@types/node'],
versioning: 'npm',
},
// Disabled since these GitHub Actions don't get major version bumps often
// {
// "groupName": "GitHub Official Actions - major",
// "matchDepTypes": ["action"],
// "updateTypes": ["major"],
// "matchPackageNames": ["actions/checkout", "actions/setup-node", "actions/upload-artifact"],
// "automerge": true
// },
{
matchCurrentVersion: '>=4.0.0',
matchDatasources: ['npm'],
matchPackageNames: ['@upleveled/eslint-config-upleveled'],
replacementName: 'eslint-config-upleveled',
replacementVersion: '4.0.12',
},
{
matchCurrentVersion: '>=2.0.0',
matchDatasources: ['npm'],
matchPackageNames: ['@upleveled/eslint-plugin-upleveled'],
replacementName: 'eslint-plugin-upleveled',
replacementVersion: '2.1.7',
},
],
schedule: 'after 4pm on thursday',
vulnerabilityAlerts: {
schedule: null,
},
// Remediate vulnerabilities in transitive dependencies
// https://docs.renovatebot.com/configuration-options/#transitiveremediation
transitiveRemediation: true,
} https://github.com/karlhorky/renovate-config/blob/main/default.json5 |
Current state:
|
No, Issues are for actionable tasks, not discussing. |
Reverts #35807
As per the discussion in #36336 and #35840 and #36006 and #36143 , Renovate is currently broken for pnpm due to
pnpm dedupe
hanging on stdin due to astore-dir
misalignment."Broken" in this case can mean either:
temporary-error
explanation (from @peterhirn's report in Upgrade `pnpm` to `v10.11.0` broken (timeout, SIGTERM) #36006 (comment))Either way, it blocks usage of Renovate on pnpm repos - maybe specifically, pnpm repos which use the
packageManager
field inpackage.json
.What causes
pnpm dedupe
to be broken in this way? @dipunm's note from #35840 seems helpful:How can we resolve it? From reading the discussions, it appears that @CHC383 has a good suggestion here:
This unfortunately reverts #35807, but it looks like that PR broke pnpm compatibility.
Happy to adjust to change this.
Looking forward to having a non-broken Renovate experience with pnpm!
Reproduction
Minimal reproduction for
2. "silently failing to create new PRs"
here:cc @viceice @rarkins @peterhirn @dipunm @CHC383