• 
      

    Convert Review Bot to use an integration and status updates.

    Review Request #8442 — Created Sept. 26, 2016 and submitted — Latest diff uploaded

    Information

    ReviewBot
    master
    1ce3133...

    Reviewers

    This change is a massive refactor to the interface between Review Board and
    Review Bot. It involves two major pieces:

    Integration: Review Bot configuration now uses the new integration framework.
    When the Review Bot extension is enabled, it offers a configuration page that
    only has the celery broker URL and the user who Review Bot should operate as.
    Other configuration is then done by creating "integration configurations". Each
    configuration allows selecting a tool to run, conditions for when that tool
    should be run (which can be as simple as "Always" or as complicated as rules
    for specific branches or authors. The tool-specific options are then merged
    into this form, rather than just giving people an opaque JSON blob to edit.

    Status Updates: Instead of creating regular reviews, Review Bot will now create
    a review and associate it with a status update. Status updates are a new
    feature that will batch the items together and give the whole thing a summary
    status (such as "done-success" or "pending"). This eliminates the need to post
    a review that shows that Review Bot ran but ignored all the files, since we now
    have another feedback mechanism to show that Review Bot isn't wedged. It also
    means we don't need to have any kind of coordination between the tools to batch
    things together.

    As part of this, I've removed a bunch of code. A lot of this code was stuff
    that only existed on the master branch and was never really used in production.
    This includes:

    • Review Bot can no longer give a "Ship It!" This is partly because status
      update reviews don't show the ship-it state, and partly because we don't
      think anyone was using it (having your automated tools tell people to ship
      their code is sketchy).
    • Reviews no longer have the default header which shows what files were
      processed or ignored.
    • The ToolExecution model has been completely removed, along with APIs. This
      was never really used that much, and is supplanted by the status update
      state.
    • The Profile and AutomaticRunGroup models have been removed, since their
      functionality is now in the integration configurations.
    • The ManualPermission model has been removed, since it was just an unfinished
      feature. We'll be figuring out manual execution of tools later.
    • Removed a bunch of other dead code.
    • Enabled the extension and created some integration configurations.
    • Verified that the configurations executed correctly based on their configured
      conditions and settings.
    • Published a bunch of diffs on different review requests and saw the Review
      Bot workers get notified, run their tools, and report their results.
    • Verified the appearance of Review Bot reviews within the new status updates.