Merge Requests Ignore Failing Pipelines
Summary
Merge Requests show Pipelines as passing when there were failing Pipelines.
Steps to reproduce
Create a project with .gitlab-ci.yml
. Create two jobs, one with only:refs:merge_requests
, and one without. Create a branch that adds a new job (or edit the job without only:refs:merge_requests
) that fails.
Create a Merge Request for that branch. The only:refs:merge_requests
job(s) will mask the fact that there are failing jobs.
This also works with more than 1 job of each (having/not having only:refs:merge_requests
).
Example Project
https://gitlab.com/CauhxMilloy/pipelines-ignored-in-mr
This project has followed the reproduction steps described above. Looking at the only Merge Request on that project, it appears fine -- and able to merge. Looking at the Pipelines tab, one can see that jobs fails. In fact, the only thing that this Merge Request does is break the build (metaphorically).
Further detail can be found in that project's README.md and the Merge Request in question.
What is the current bug behavior?
If a project has jobs that both have, and do not have, only:refs:merge_requests
, then jobs without only:refs:merge_requests
are ignored when showing Pipeline passing state for the Merge Request.
What is the expected correct behavior?
A summed logical AND
for all current (matching SHA) Pipelines. If any fail, then the Merge Request should show it as failing and should block merging (to the extent that it would if all jobs failed).
Alternatively, the two Pipelines can be merged -- possibly in cases where both Pipelines would need to be rerun anyways.
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
N/A
Results of GitLab application Check
N/A
Possible fixes
Not aware. Sorry. :<