New commits while merge request is processing are included with merge

Summary

With the option 'Remove all approvals in a merge request when new commits are pushed to its source branch' enabled, if a merge request is approved, but takes some time to complete, it is still possible to commit to the source branch and have the new changes merged.

Steps to reproduce

  1. Create a merge request with approvals
  2. Gain the correct number of approvals
  3. Click the submit merge request button
  4. (GitLab must take time to process the request, our EE server can sometimes take 30s +)
  5. Commit to the source branch
  6. New commits are part of the merge, even though they came in after approval

Results of GitLab environment info

GitLab Enterprise Edition 11.3.5-ee gitlab-ee@7b10203cd1a50e2b622b6f4373774189c38d5a78

Assignee Loading
Time tracking Loading