Files
gerrit/java/com/google
Gal Paikin 5ff563522d Fix bug of removableReviewers without votes
Currently, the algorithm to compute removableReviewers goes over all the
approvals and searches for approvals that can't be removed, and those
reviewers that voted it can't be removed as well.

This algorithm neglected reviewers that never voted, and in some cases,
would return that they are not removable. To fix it, we ensure that all
reviewers are part of the initial set, and the algorithm could remove
those that voted a vote that can't be removed.

This is only visible in some code paths, so added a new test about
merged change such that this specific code path is invoked. The test
above used to succeed as well, since for some reason in merged changes
the label.all doesn't include the vote "0", but it does for non-merged
changes. This is a separate bug that may be worth fixing, another day.

Bug: Issue 14034
Change-Id: If6eecdc758598a3ba69225029ec8482791a8c5a6
2021-02-03 18:59:38 +00:00
..