Skip to content

Ambiguity in regards to whether a MR has been approved automatically even when there are defined rules

Why are we doing this work

While investigating a unexpected behaviour in regards to Vulnerability-Check MR approval rules, it was identified that the following behaviour seems to be as designed. The automatic approval in the scenario described below is unexpected to the end user and is not well explained in the UI.

Steps to reproduce:

step description screenshot
1 Go to Merge Request(MR) approval to project settings Screen_Shot_2021-06-28_at_10.35.43_AM
2 Assign a single user as a MR approver (e.g. Vulnerability-Check, Add approval rules): Screen_Shot_2021-06-28_at_10.35.23_AM
3 Open a MR which breaks the rule created above with the same user
4 Observe the rule has already been approved automatically Screen_Shot_2021-06-23_at_11.00.56_AM

Proposal / Expected behaviour

We need to either:

  1. reword the approval related sentence; or
  2. add extra information to provide more context of the current behaviour.

The exact solution is pending design.

Note: An alternative solution of keeping the required approval was considered and was not selected. For context see #334698 (comment 910654934)

Relevant links

Related code: https://gitlab.com/gitlab-org/gitlab/-/blob/7227afe12771869af5c769716bfaf0dbbac360df/ee/app/models/approval_merge_request_rule.rb#L102-119

Original issue: &6237 (comment 609639123)

Non-functional requirements

  • Documentation:
  • Feature flag:
  • Performance:
  • Testing:

Implementation plan

Edited by Zamir Martins