Avoiding conflicts and waiting for renovate to rebase
mheffner opened this issue · comments
I'm trying to find the best way to use automerge labels with multiple dependency update PRs opened by renovatebot. Because the PRs all touch the same files (go.mod/go.sum), when one is merged the remaining PRs will become conflicted until renovatebot rebases. However, kodiak will detect the conflict and remove the automerge label before it gets a chance. This means we can't queue up multiple dependency PRs to merge.
Here's the general steps we are taking:
- renovatebot opens PRs 1 and 2, both touch the same files (go.mod/go.sum)
- A human approves PRs 1 and 2, adds automerge label to both
- Kodiak merges PR 1
- PR 2 is now in a conflict state
- Kodiak removes automerge label and adds comment
- renovatebot wakes up and rebases PR 2, fixing conflict state
- PR 2 doesn't get merged by kodiak
I guess the ideal state would be that kodiak waits for renovate to rebase the PR, waits for the checks to run and pass, then merges the PR.
Here's our .kodiak.toml
:
version = 1
[merge]
blocking_labels = ["wip", "do-not-merge"]
[update]
always = true
ignored_usernames = ["dependabot", "renovate"]
We have branch protections set with "Require branches to be up to date before merging" enabled.
Thanks!
Hey @mheffner,
If you disable merge.notify_on_conflict
, Kodiak will no longer remove the auto merge label on merge conflict.
# https://kodiakhq.com/docs/config-reference#mergenotify_on_conflict
merge.notify_on_conflict = false
I think with this option disabled, Kodiak and Renovate should "just work". Renovate will fix the PR when there's a merge conflict and then Kodiak will be able to merge it
Let me know if you have any questions
Thanks @chdsbd , it looks like that did the trick. 🎉 Renovate will rebase the PR when another lands and then Kodiak kicks and merges it when it's ready.
I believe I saw that option earlier, but disregarded it because I believed it only controlled the comment notification about conflicts, not the removing of the label behavior. 🤦
This should get us where we need to go for now. In the future would there be a way to only disable the conflict notification when the author is a bot, like renovate or dependabot? It may be nice to keep this enable for human PRs. Not a priority at the moment though.
Thanks again!
This option resolved this for us, so closing.