bors-ng icon indicating copy to clipboard operation
bors-ng copied to clipboard

Using delete_merged_branches shouldn't delete if there are dependent branches

Open joshma opened this issue 5 years ago • 2 comments

I think there may be two issues here, but one is more important than the other:

  1. Some engineers on the teams have dependent PRs out: master, feat-a, and feat-b, where feat-a is off of master and feat-b is off of feat-a. If feat-a is merged, delete_merged_branches=true causes bors to delete feat-a, which then causes an issue for feat-b. (GitHub closes the feat-b PR.)

  2. Separately, we haven't actually started using bors to merge, and I think bors is deleting a PR branch even if bors isn't the one merging. In other words, we have the bors bot turned on and an engineer could say bors r+ to merge it, but the engineer is instead using the UI merge button. In this scenario, bors is still deleting the branch after merging and thus breaking the dependent PR.

Fixing 1 would probably be sufficient - could bors leave a branch alone if there are PRs dependent on it?

Fixing 2 might be easier though - bors shouldn't delete branches that it hasn't merged itself.

joshma avatar May 04 '20 21:05 joshma

This is even more painful than it otherwise would be because it leaves the dependent PR (feat-b in the original example) in an unrecoverable state. The PR can't be opened because the base branch has been deleted, and the base branch can't be changed because the PR is closed.

browdus avatar Dec 15 '20 18:12 browdus

Looks like this is solved by #1023 !

berkowitzi avatar Dec 16 '20 20:12 berkowitzi