MR mergeable when .gitlab-ci.yml file is invalid and no pipeline ran

Summary

When the .gitlab-ci.yml file is invalid but a prior pipeline passed, the MR is still mergeable

Steps to reproduce

  1. Push a change to a branch
  2. Wait that pipeline finishes
  3. Modify .gitlab-ci.yml and make it invalid (optionally introduce other breaking changes for the project)
  4. Push to update the MR
  5. Pipeline fails due to invalid .gitlab-ci.yml
  6. Merge button is still enabled

Example Project

n/a

What is the current bug behavior?

The merge button is enabled.

What is the expected correct behavior?

The merge button should be disabled.

Relevant logs and/or screenshots

Screen_Shot_2017-08-17_at_18.26.43

Output of checks

n/a - I have no admin role

Results of GitLab environment info

n/a - I have no admin role
GitLab Enterprise Edition 9.3.10-ee 0bc6379

Results of GitLab application Check

n/a - I have no admin role

Assignee Loading
Time tracking Loading