Skip to content

Adding initial reviewer number hard limit

Gary Holtz requested to merge 343362-gmh-limit-number-of-reviewers into master

What does this MR do and why?

As mentioned in #343362 - there is currently no limit to the number of reviewers you can set on an MR. Having too many could lead to performance problems, so we are trying out a fairly large cap of 100. (discussed here: https://gitlab.com/gitlab-org/gitlab/-/issues/343362#note_842062955)

The feature flag rollout is here: #366485 (closed)

Since assignees have the same potential problem, this will include them as well in a future MR.

There are currently (that I know of, please correct me if I'm wrong!) 4 different ways to add reviewers:

  1. Using the dropdown on the sidebar on the MR page.
  2. Using the dropdown on the "Edit MR" page reached with the "Edit" button on the top of the MR page.
  3. Via quick actions:
  • with the format:
/assign_reviewer @user 
/assign_reviewer @user2
  • or all inline:
/assign_reviewer @user @user2
  1. Via the API

How to set up and validate locally

Ideally, try to add more than 100 reviewers to any MR.

Realistically - change the MAX_NUMBER_OF_ASSIGNEES_OR_REVIEWERS = 100 constant to something like 3 and try to add 4 reviewers to an MR.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #343362

Edited by Gary Holtz

Merge request reports