-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
PNPM lockfileVersion reverted back from 9.0 to 6.0 #9684
Comments
The logic in the conditional statement is not great, and falls back to a default version of |
Tbh I don't see how this condition could provoke such bug 🤔 sig { params(pnpm_lock: DependencyFile).returns(Integer) }
def self.pnpm_version_numeric(pnpm_lock)
if pnpm_lockfile_version(pnpm_lock).to_f >= 9.0
9
elsif pnpm_lockfile_version(pnpm_lock).to_f >= 6.0
8
elsif pnpm_lockfile_version(pnpm_lock).to_f >= 5.4
7
else
6
end
end If In my case because my lockfileVersion ends up at |
The existing logic is bizarre. If the sig defines it as returning an Integer, why call This code has never been mentally processed, merely changed over and over again, and passed a CI. This is really sad to see. |
Additionally, if the parser can't parse a v9 lock file in the first place, then we shouldn't expect it to work. Perhaps it returns If there is no fixture for a v9 lock file in the test suite, then it is impossible that a test written to pass returning v9 is properly testing the code. |
If we have a look we can see that the method used to get the lockfileVersion is: def self.pnpm_lockfile_version(pnpm_lock)
pnpm_lock.content.match(/^lockfileVersion: ['"]?(?<version>[\d.]+)/)[:version]
end Which results in the proper version float number
First of all, in the same PR that you linked we can see that a test has been added to test parsing a v9 file so there's a fare chance that parsing the file works. Even if that was the case it wouldn't be the problem. You're confusing the When the Chill out man |
Same issue happening for me: #9682 |
This comment has been minimized.
This comment has been minimized.
From the rebase logs:
pnpm v9 seems to be used… though I’m seeing the same behavior: lockfile re-generated to v6. |
From my logs, what's using PNPM 8 is:
|
Yes: #9687 should fix that. |
It still does not use pnpm v9, for me I am getting pnpm v8 still, and additionally the outdated packages are not parsed properly (which I expect is because the format is different from v9).
The two listed are correctly identified as out of date packages, but it fails to identify the version? |
Are there any updates on this? Dependabot has been broken for over a month now |
@dd-jonas Would you happen to have a link to a public repo where this is broken for you? |
@matijs this is mine from today (14.06.2024) D3strukt0r/weleda-webcenter-text-export#53 |
@D3strukt0r thanks! This is very odd, it's been working flawlessly for me for many weeks now in quite a few different repositories. After a quick look, the main difference seems to be that all I have Dependabot running on both Actions runners as well as the legacy (?) way of running it. |
@matijs my current setting for this is https://github.com/D3strukt0r/weleda-webcenter-text-export/blob/master/.github/dependabot.yml - package-ecosystem: "npm"
directory: "/pwa"
target-branch: "develop"
labels:
- "dependabot :robot:"
reviewers:
- "D3strukt0r"
schedule:
interval: "daily"
groups:
pwa-dependencies:
applies-to: version-updates
patterns:
- "*"
update-types:
- "minor"
- "patch" i don't see anything special there. if anybody is interested, it's on a daily schedule so i can see it once it ever gets fixed. in the meantime i'll have to figure out how to get renovatebot running on a server, it's just that i can't quite comprehend their docs yet ... ugh |
@matijs ...
2024/06/07 00:19:44 [173] 204 /update_jobs/838583963/record_update_job_unknown_error
updater | 2024/06/07 00:19:44 ERROR <job_838583963> Error processing ts-jest (Dependabot::SharedHelpers::HelperSubprocessFailed)
2024/06/07 00:19:44 ERROR <job_838583963> ERR_PNPM_UNSUPPORTED_ENGINE Unsupported environment (bad pnpm and/or Node.js version)
Your pnpm version is incompatible with "/home/dependabot/dependabot-updater/repo".
Expected version: ^9.0.6
Got: 8.15.6
This is happening because the package's manifest has an engines.pnpm field specified.
To fix this issue, install the required pnpm version globally.
To install the latest version of pnpm, run "pnpm i -g pnpm".
To check your pnpm version, run "pnpm -v". |
It doesn't matter where you put it, in that it is still broken, but it is breaking in a different way. The latest break is the same exact one I see in my private repo. On the latest release of pnpm, 9.3.0, with the lockfile at the root level. |
@senkenn (as a workaround,) have you tried adding a (we switched to corepack a while ago hence the |
Adding |
@matijs I have also tried adding the I don't see any errors about the pnpm version being incompatible in either logs though. The biggest difference I can see is that the log without |
I agree, adding packageManager also worked for me. Would be great if it also worked without it though. Like, dependabot could certainly read the version, and if it can't it should be taking the latest version, which it isn't |
It looks like After reverting, adding |
@matijs thank you, this workaround also worked for us! 🙏 It's sad that such a workaround is still necessary so long after pnpm v9's release 😞 |
This should be fixed now, hopefully! |
Thanks @deivid-rodriguez for the fix! Closing this as fixed, please reactivate if the problem still occurs. |
Seems like some people had success with it, according to dependabot/dependabot-core#9684
Is there an existing issue for this?
Package ecosystem
npm
Package manager version
PNPM v9
Language version
Node.js 20
dependabot.yml content
What you expected to see, versus what you actually saw
Since #9668 I assumed updating a package that relies on a 9.0 pnpm.lock.yaml file should just update the given file without issue.
Instead the lockfileVersion is reverted back to 6.0 which rewrites the whole lockfile from scratch
Images of the diff or a link to the PR, issue, or logs
wJoenn/vue-template#237
The text was updated successfully, but these errors were encountered: