Cannot merge merge request due to unknown requirement when pipelines must succeed is enabled
Update
The use-case mentioned in the issue is going to be taken care of in #334281 based on the discussion in #30947 (comment 912343733)
Summary
When the pipeline is not run, but merges can only be accepted after a successful run, the merge-request UI currently only states:
'Please resolve the above issues first'
However the user has no idea what issue is to be resolved (there is no text 'above').
It turns out, that if a pipeline does not run (for example no changes where triggered with the use of the changes keyword), the merge request cannot (rightfully) be merged.
However, it would be nice to let the user know that it was due to a (failed/missing) pipeline.
I suspect this is due to the fact, that before we had the 'changes' keyword, the pipeline potentially always ran, and thus, the status would be 'failed'. Now, the pipeline may not run, and so the user is no idea as to why.
I could personally resolve this issue, as I was allowed and thus could, press the 'run pipeline' button on the branch.
Steps to reproduce
Some of the use cases in which this has been seen and worked around include:
- Get the message, add a comment, resolve it and then can merge.
- Get the message when there is no
.gitlab-ci.yml
in the project but Pipelines Must succeed is enabled. Disabling that feature allows the MR to merge.
Example Project
What is the current bug behavior?
Merge Request widget shows 'Please resolve the above issues first' with no issue listed.
What is the expected correct behavior?
Either a user can merge OR when 'Please resolve the above issues first' is shown a reason is listed.
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
Having a simple text which describes the 'issue' that is to be resolved (successful pipeline run) would make this paper-cut go away.