Pause builds for MR's with unresolved discussions
Problem: Merge is delayed by builds that are being executed unnecessarily.
We are using web hooks to trigger Jenkins builds.
We also block merging if there are unresolved discussions. Usually we have multiple MR's blocked due to this.
However, the few unblocked MR's that could be merged are waiting for the other blocked MR's to be built, and the merging process is therefore slowed down considerably. While a MR is being blocked from merging, there is little value in re-building it.
At a given instance it is common that we have a 5:1 ratio of blocked MR's compared to MR's ready to be merged. That means that we are waiting about 5 times more than necessary to be able to merge a specific branch. Some days the ratio is even worse.
Today, we sometimes close MR's just because we know that it is going to take some time to resolve some of the discussions, and later reopen them when they are more ready. It is just a too manual process and we only do that when the situation is really bad (from a build-time perspective).
The goal is to have the shortest possible time between a push and when a branch is ready to merged.
I propose that builds are paused if an MR is being blocked by unresolved discussions. When all discussions are resolved, resume the builds.
Optionally a paused MR could be flagged to build anyway, but that ought to be fairly uncommon.