Gemfile/Bundler: lockfile updates that are blocked by dependencies create incomplete diff instead of error #35474
Replies: 3 comments
-
|
At the core this is of course a Bundler issue, but I think Renovate should probably check that the Gemfile.lock was changed as expected after it runs |
Beta Was this translation helpful? Give feedback.
-
|
Hi mxey, I see what it is. Renovate tries to update r10k to v5 but creates a misleading PR that only updates peripheral dependencies like faraday, json, logger, and uri. The core r10k dependency isn't actually updated due to conflicts with puppet_litmus and bolt. As a temporary workaround until the maintainers address this, you could try:
{
"packageRules": [
{
"matchManagers": ["bundler"],
"postUpgradeTasks": {
"commands": ["bundle outdated | grep '{{{depName}}}'"],
"fileFilters": ["Gemfile.lock"],
"executionMode": "update"
}
}
]
}This would make the update fail if the package is still outdated after running bundle.
The ideal fix would be for Renovate to verify that the target dependency was actually updated before creating a PR, so hopefully the maintainers will implement this validation soon. Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
I think it will do the opposite. |
Beta Was this translation helpful? Give feedback.
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
If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.
Gitlab, Renovate v39.253.4
Please tell us more about your question or problem
When Renovate tries to update a Gemfile.lock, the
bundle lock --update $packagecommand might just not update the package, if there is a dependency conflict that prevents the update. Bundler might make other changes to Gemfile.lock though. Renovate still creates a PR, but the contents of the diff do not match what the update should be.Reproduction repo
You can also reproduce this manually:
It's still outdated:
You can see that there is a dependency conflict if you force it, by putting
>= 5in theGemfileand runningbundle install:Logs (if relevant)
Logs
Beta Was this translation helpful? Give feedback.
All reactions