Add a registry of Review Bot worker tools.
Review Request #11533 — Created March 17, 2021 and submitted
Review Bot has been heavily dependent on
pkg_resources.iter_entry_points
for tool lookup. This is fine to use
for an initial scan, but we were calling it on every tool execution,
which was slow, and made it hard to write unit tests against anything
not provided by a package.This change introduces a basic tools registry in
reviewbot.tools.base.registry
. This handles tool discovery,
registration, unregistration, iteration, and fetching of tools.Tools are only discovered on startup now, and we fetch directly from the
registry when executing one.Unit tests were added to cover the new registry functions.
Unit tests pass for Python 2.x and 3.x.
Manually tested starting the worker, loading in the tools list into
Review Board, and running tools against new code.
Summary | ID |
---|---|
b89a2178345c12dea6030f03065ad1ca318e87d8 |
Description | From | Last Updated |
---|---|---|
E999 SyntaxError: invalid syntax |
reviewbot |
- Change Summary:
-
ADded back the error condition in
RunTool
when a tool couldn't be found. - Commits:
-
Summary ID 0614d530dd0b7a9a8d6f71c39150ee596d729d10 06a3d3f7d047eb42a3fad78a1b292796cf5d93f7