Fix selective code owner removals race condition
What does this MR do and why?
Fixes a race condition which causes codeowner approvals to not be removed when they should be.
Screenshots or screen recordings
How to set up and validate locally
- Create 6 users, ax1, ax2, bx1, bx2, cx1, cx2
- Create 3 groups, ax (with ax1 + ax2), bx (with bx1 + bc2), cx (with cx1 + cx2)
- Add ax, bx, cx groups as developers for a project
- Enable selective codeowner removals for the same project
- Create a codeowners file like:
/ax/ @ax /bx/ @bx /cx/ @cx /ab/ @ax @bx /bc/ @bx @cx /ca/ @cx @ax
- Create a new branch and merge request editing the file in /ax as root
- Approve the merge request as ax1
- Edit each of the other files as root
In master you will find 3 rules approved incorrectly.
In this branch you should find no approvals remain.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #344632 (closed)
Edited by Lee Tickett