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
- Create a new repository
- Add a gitlab-ci file to run tests only against the
default
branch - Enable "merged results pipelines" and "pipelines must succeed before merging"
- Create a merge request from
dev-1
todev-2
- No pipeline gets created because only pipelines against master should be created, but the MR also can never be merged.
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 |
---|
![]() |
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:
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.