Optimize validation of groups to ensure we are being careful with memory allocation when processing large CODEOWNERS files
Currently we limit the number of references to be validated to 200. This value was chosen arbitrarily to reduce the potential risk of long running requests and memory allocation.
We still have some risks around the group references as each group can contain a very large number of users which are all preloaded so we can check if the groups contain users with permission to approve MRs.
We should look into how much memory is currently being allocated to these longer running request and see if we can batch load records to reduce memory allocation as we cannot control how many users are assigned to groups referenced in these files.
Edited by 🤖 GitLab Bot 🤖