Set limit on get code owner status calls

The backend is going to limit the results of this REST endpoint by
default to 200 [1], which is the max number of files that are by default
shown on the change screen. Since users can expand the file list to see
more files, the limit would likely break showing the code owner statuses
for these files. To prevent this we set 100000 as limit on the get code
owner status calls (100000 is the maximum number of files that a change
is allowed to contain, at least by default). Setting this high limit
preserves the current behaviour, which means that the frontend is always
retrieving code owner statuses for all files. However setting a limit
explicitly will allow the backend to limit the results by default (if no
limit is specified on the request).

As a follow-up change the frontend should be adapted to request only 200
code owner status by default (for the max number of files that are shown
on the change screen by default) and then request code-owner statuses
for further files only if the user expands the file list to see more
files. This would prevent computing code owner statuses unnecessarily
for large changes when the file list doesn't get expanded by the user.
Since computing code owner statuses is expensive this would improve
latency a lot. This change is a first step towards this goal.

[1] https://gerrit-review.googlesource.com/c/plugins/code-owners/+/303328

Bug: Google b/183000367
Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: I757b794eaf5bc131ad3c9dbaefe38e9af7a3d8e5
1 file changed
tree: df60d4b4ebc18f24e098b1393b878130d28bd8b6
  1. java/
  2. javatests/
  3. proto/
  4. resources/
  5. test/
  6. ui/
  7. .eslintrc.json
  8. .gitignore
  9. .gitreview
  10. bower.json
  11. BUILD
  12. LICENSE
  13. package-lock.json
  14. package.json
  15. README.md
README.md

Gerrit Code Review code-owners plugin

This plugin provides support for defining code owners for files in a repository.

If the code-owners plugin is enabled, changes can only be submitted if all touched files are covered by approvals from code owners.

Also see resources/Documentation/about.md.

IMPORTANT: Before installing/enabling the plugin follow the instructions from the setup guide, see resources/Documentation/setup-guide.md.