commit | d04b02bc436e09326dd7a715252adfac348b5550 | [log] [tgz] |
---|---|---|
author | Edwin Kempin <ekempin@google.com> | Mon Oct 25 16:35:48 2021 +0200 |
committer | Edwin Kempin <ekempin@google.com> | Mon Oct 25 16:51:12 2021 +0200 |
tree | df60d4b4ebc18f24e098b1393b878130d28bd8b6 | |
parent | e712842e9e61d795568d3c9d34b56b909fe1dee6 [diff] |
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
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.