How best to optimize automerge settings #33876
Replies: 2 comments 1 reply
-
Hi there, We need more information about your environment. Please explain in detail how you are running Renovate. For example:
Thanks, the Renovate team |
Beta Was this translation helpful? Give feedback.
-
How about some very specific questions about how this works:
|
Beta Was this translation helpful? Give feedback.
-
How are you running Renovate?
A Mend.io-hosted app
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
I'm trying to figure out how to get a good setup with automerge, but everything I've tried doesn't quite work the way I'd expect and creates new problems. I'm on GitHub and I have a number of package rules set up to automerge. Here's what I've tried:
Setting
"rebaseWhen": "conflicted"
. With this setting, renovate won't rebase branches when they fall behind main, and it won't merge them that way even though my branch protection rules would allow it. So if it creates a set of branches at about the same time and then one of them gets merged then all the other ones will be behind main, fail to automerge, and require manual intervention.So, I tried setting
"rebaseWhen": "behind-base-branch"
. This created two new problems. First, it causes a whole lot of thrashing on the branches renovate creates, where CI gets run on them over and over again as each branch is merged in succession and then the other ones get rebased to it. Also, if a branch required us to make changes to fix an issue, renovate would force push to it and overwrite our changes whenever a rebase was needed. For some reason in this mode it doesn't do the thing where it will not automatically rebase this PR, because it does not recognize the last commit author.This made me wonder if I could group the automerge rules and then run renovate on a schedule, so a single automerge branch would be created with all of the changes and avoid the problem of the branches causing one another to need updates. I added the
"schedule:daily"
preset and set"groupName": "daily-dependency-auto-updates"
on each of my package rules that do automerge. With this setting, no changes would be added at all unless renovate happened to get triggered during the schedule window, so we mostly just missed the updates altogether.I'd love a way to have the changes automerge without manual intervention, without a ton of thrashing in CI, and without stomping on changes we make to fix issues. Is there an automerge setup that can balance these things? Specifically, I wonder if setting up a GitHub merge queue would solve it. Since the merge queue is designed to ensure that changes are tested together prior to merging into main, would using one allow renovate to merge changes into it even if they are behind the main branch? Or is there another way to optimize automerge?
Thanks so much!
Logs (if relevant)
Logs
Beta Was this translation helpful? Give feedback.
All reactions