Large Number of Changes in Merge Requests May Allow CODEOWNERS Check to be Abandoned
Summary
Merge Requests containing changes affecting many files cause GitLab to stop assessing directories and files to generate the diff - which also affects the CODEOWNERS checks. This results in large scale changes bypassing some or all of the CODEOWNERS approvals.
Steps to reproduce
- You'll need to test this in a monorepository containing a large number of files.
- Create a CODEOWNERS file listing decent number of directories and owners. This is important for us to demonstrate that the checks may return some, all or none of the Code Owners
- Create a change affecting a large number of files in a branch and create the merge request.
- Allow the merge request to process. Once it's completed you'll find: a) The list of affected files in the MR is incomplete b) Some, all or none of the Code Owners approvals will be required based on how many of the files in the Merge Request were processed.
- Check the data returned for that merge request using the API, the file list should be incomplete.
- Run $ git log --stat [commit SHA] to confirm the full set of changes against the GitLab changes.
What is the current bug behavior?
The Changes list is incomplete in the merge request, and the CODEOWNERS check may or may not catch all the changes affecting CODEOWNERS. This results in missing required Code Owners approvals.
What is the expected correct behavior?
- A complete list of Code Owners approvers required for the merge to be successfully reviewed before being able to merge the requests.
- A means by which to retrieve a complete list of files in the Changes section.
Edited by Zane Wright