-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Branch reuse with update-lockfile can result in other lockfile downgrades #31042
Comments
I'm going to try to annotate the relevant parts of the logs:
This part confirms that the branch exists but does not need rebasing due to branch rebase config. I believe the above to all be correct.
I believe that reuseExistingBranch=true is normal behavior, although not sure why we then set the branch to
Cloning here is expected if this is the first time we've needed to do any git work
This part above seems correct. We can see that the
Here Renovate tries to assess if the branch needs any more updates or if it's up to date.
The above is all as expected, including that the
I'm not sure about this line, I assume it's the undesired pyproject.toml downgrade
This seems as expected.
I'm not sure why there's 2 files
Here is sets the "new" content (which includes the old ida version) on top of the
And at this point we have already committed the mistake. It's been a long time since I looked at this logic, but I think that if (a) reuseExistingBranch=true, and (b) changes are found, then (c) we should abort and instead retry with reuseExistingBranch=false |
Discussed in #29276
Originally posted by msw-kialo May 27, 2024
What would you like help with?
I think I found a bug
How are you running Renovate?
Mend Renovate hosted app on github.com
If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.
No response
Please tell us more about your question or problem
If a poetry branch is not rebased, but otherwise updated (e.g. new version released), Renovate will probably reuse the existing branch (
reuseExistingBranch = true
).poetry
will be executed branched off earlier, but the output will be pushed with the newest base branch commit as parent (potentially due to enabled platform commit).Demonstration: https://github.com/msw-kialo/renovate-push-rebase
Specifically msw-kialo/renovate-push-rebase#1
Way to reproduce:
pyproject.toml
/poetry.lock
and therefore downgrades Update dependency idna to v3.7 msw-kialo/renovate-push-rebase#2The branch update can be seen in https://github.com/msw-kialo/renovate-push-rebase/compare/a6b3d271f60a8dec3925e85dd2185e0012d67955..5c1ba312b5fa29e18900e53a06fb2339d8e48a29
The diff only displays the updated boto3 change. Not shown is the unintended downgrade due to the changed parent commit (that is visible in the PR diff view).
We initially observed with issue in the self-hosted version of renovate. We also use GitHub and enabled platform commits; this feature might be required to trigger this issue.
We are able to mitigate this issue by setting
reuseExistingBranch = false
:renovate/lib/workers/repository/update/branch/reuse.ts
Line 120 in 8e6f89b
Logs (if relevant)
Logs
The text was updated successfully, but these errors were encountered: