Allow owners to merge failed pipelines when "Pipelines must succeed" is enabled.

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem to solve

We need owners to be able to merge failed pipelines even though "Pipelines must succeed" is enabled.

Intended users

Lead Developers with ownership of the repo

Further details

Yesterday our GitHub implementation was replaced with GitLab. One feature we noticed right away was missing was the possibility for owners/administrators to merge failed pipelines if "Pipelines must succeed" was enabled. This was possible in GitHub and we've used the feature quite a lot due to flaky tests. It could be Network issues, API issues, Protractor/Selenium, etc. So let's say 1 out of 800 tests fails. Well, tough luck. You can't merge, even though you are the owner of the repo. So instead of just force merge, since you know which tests can fail, you have to run tests for another 30 minutes, just to se another random test fail.

Yes, in a perfect world you wouldn't merge stuff with failing tests, or use another test framework that allows the pipeline to be green when a flaky test fails. But that's besides the point. As an owner I should be able to merge, even though the developers can't. This is helpful in the case of a normal pipeline taking 1+ hours and your trying to get out a fix quickly.

image

Proposal

Add an option to allow owners to merge failed pipeline when "Pipelines must succeed" is enabled. Could just be a simple checkbox under "Pipelines must succeed" option.

Proposal considerations

As noted in #4161 Anytime you let someone merge outside the normal channels it can create compliance issues. Some considerations/options/constraints we should think about when deciding on the MVC for this are:

  1. only allow this on non-protected branches
  2. only allow if approval rule allows it
  3. only allow this on projects without compliance pipelines
  4. log any force merge to the audit log for compliance purposes ("audit log" being a thing I just made up)

Permissions and Security

Only owners can enable this.

Documentation

Availability & Testing

What does success look like, and how can we measure that?

What is the type of buyer?

Links / references

Edited by 🤖 GitLab Bot 🤖