CodeOwnerResolverResult: Include debug messages

Collect debug messages while resolving code owners so that we can make
them available to host admins if they need to investigate issues with
code owner config files that do not work as expected. Requires further
changes to expose this information to the host admins.

The debug messages are still written into the server logs on fine level
so that they are available in the logs when requests are traced.

Within CodeOwnerResolver the generation of debug messages is spread over
many methods. In order to be able to return them to the caller, we add
two new AutoValue classes (ResultWithMessages and
OptionalResultWithMessages) that wrap a result and also can contain
debug messages.

Adapt the CodeOwnerResolver tests to also verify the messages that
explain the result.

Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: I12bb9d131815f461873e62d7a2b59b3e109b3055
6 files changed
tree: ccb77e3ed811c44ac9b1f96fd79210915c81e2fa
  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