MR stuck on "You can only merge once the items above are resolved" if "Merge pipelines will try to validate the post-merge result prior to merging" option enabled

Summary

Merge request cannot be merged, it is stuck on "You can only merge once the items above are resolved"

Steps to reproduce

  1. Create a new repository
  2. Add a gitlab-ci file to run tests only against the default branch
  3. Enable "merged results pipelines" and "pipelines must succeed before merging"
  4. Create a merge request from dev-1 to dev-2
  5. No pipeline gets created because only pipelines against master should be created, but the MR also can never be merged.

Screen_Shot_2020-12-08_at_10.52.01_AM

Example Project

momentumstudio/composer-presets!1 (merged)

What is the current bug behavior?

Merge request cannot be merged, it is stuck on "You can only merge once the items above are resolved"

What is the expected correct behavior?

My tests have passed and I have approved the MR, so I should be able to merge it.

Relevant logs and/or screenshots

screenshot
image

Output of checks

This bug happens on GitLab.com

Results of GitLab environment info

GitLab.com

Results of GitLab application Check

GitLab.com

Possible fixes

This behavior is correct by design. The setting pipeline must succeed requires a pipeline to be created and to be success for a MR to be merged. Because when merging dev-1 into dev-2 there is no pipeline created, according to the project's CI configs, then pipeline must succeed requirement is not met.

When enabling pipeline must succeed the author of pipeline configs must ensure that there will be a pipeline for any merge request. Only creating a pipeline when merging into master does not cover all cases, as in this issue.

However, the wording of the message should be fixed and we should say exactly what's missing, like we do for open threads:

image

Another thing we could do is to ensure our doc page says that

When enabling pipeline must succeed the author of pipeline configs must ensure that there will be a pipeline for any merge request.

Edited Jan 20, 2021 by Fabio Pitino
Assignee Loading
Time tracking Loading