Consider enabling the "Allow to merge only if pipeline passes" option
What is the productivity problem to solve?
Since we don't enforce green pipelines before merging MRs, it happens sometimes that people mistakenly merge a MR that has a failing pipeline (e.g. gitlab-org/gitlab!23279 (comment 274911822)).
This can potentially introduce failures in master
and get in the way of the "Scheduled pipeline success rate for master branch in GitLab project" PI.
Based on https://app.periscopedata.com/app/gitlab/496118/Engineering-Productivity-Sandbox?widget=7766009&udv=785399, there are not a lot of merged MRs that have a failing pipelines, so it shouldn't have a negative impact on the current workflow as we already expect maintainers to only merge MRs with passing pipelines:
Note that this chart coincide roughly with https://app.periscopedata.com/app/gitlab/496118/Engineering-Productivity-Sandbox?widget=6751340&udv=785399.
Problem identification checklist
-
The root cause of the problem is identified. -
The surface of the problem is as small as possible.
What are the potential solutions?
-
Dogfooding the "Allow to merge only if pipeline passes" option
Who and when will the solution be implemented?
The engineering productivity team should own this. We can probably do that during Q1.
Things to consider
- There are cases where Danger would fail to run (e.g. gitlab-org/gitlab!23499 (merged)). We should find a solution for these first.
- There may be cases when we want to skip a pipeline (e.g. fixing a master:broken, quarantining a test etc.) but I think it's a best practice even for these cases to wait for a green pipeline anyway.
- If this is really a problem, we can always temporarily disable the option. Note that if we do that too often (e.g. more than once a week), that probably means that we should find another solution (e.g. faster pipelines, merged results, merge trains etc.).
Final note
In any case, this is a two-way door decision so I'd be in favor of enabling it and see if that causes any problems.
Verify that the solution has improved the situation
-
The solution improved the situation. - If yes, check this box and close the issue. Well done!
🎉 - Otherwise, create a new "Productivity Improvement" issue. You can re-use the description from this issue, but obviously another solution should be chosen this time.
- If yes, check this box and close the issue. Well done!