Limit the number of Unit tests that can be in each JUnit report on gitlab.com
Right now there is a file size limit on how large a JUnit report can be, however we should additionally limit how many test entries there can be in each JUnit report in order for our application to be as scalable as possible.
As a GitLab Administrator, I want the GitLab application to limit how many tests can be parsed in a single JUnit file so that the parsing of those files does not put undue stress on the server infrastructure.
**Background: **We need to set a limit on the number of test cases parsed by the JUnit parser. Please take note that this limit applies per build, and even if let's say we set a limit of 500,000 test cases, it is possible for a project to have multiple builds with thousands of test cases that in total will still exceed 500,000.
This issue will set the default limit on gitlab.com to 500,000 tests per file.
- Update the CI/CD application limits to detail new limit
This mainly focuses on:
It does make sense to limit the number of test cases parsed from the report, not only for this loop, but also for memory used, for example
😁. So I'd definitely prefer having a limit before enabling this globally on GitLab.com.
I think doing the PFADD in batches, rather than each time
#add_test_reportis called is a good improvement to avoid rountrips
gitlab-org/gitlabthis would mean about 130 redis calls in total. But spread across the several
All in all, I think this is okay to move forward as is, but I think we should have Application Limits on the number of tests parsed before enabling. As you mentioned.