• 
      

    Add a registry of Review Bot worker tools.

    Review Request #11533 — Created March 17, 2021 and submitted

    Information

    ReviewBot
    release-3.0.x

    Reviewers

    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
    Add a registry of Review Bot worker tools.
    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.
    b89a2178345c12dea6030f03065ad1ca318e87d8
    Description From Last Updated

    E999 SyntaxError: invalid syntax

    reviewbotreviewbot
    chipx86
    Review request changed
    Change Summary:

    ADded back the error condition in RunTool when a tool couldn't be found.

    Commits:
    Summary ID
    Add a registry of Review Bot worker tools.
    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.
    0614d530dd0b7a9a8d6f71c39150ee596d729d10
    Add a registry of Review Bot worker tools.
    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.
    06a3d3f7d047eb42a3fad78a1b292796cf5d93f7

    Checks run (1 failed, 1 succeeded)

    flake8 failed.
    JSHint passed.

    flake8

    chipx86
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-3.0.x (8e97744)