Redo the Review Bot extension configuration.

Review Request #8487 — Created Oct. 24, 2016 and submitted — Latest diff uploaded

Information

ReviewBot
master
4334144...

Reviewers

Most of the Review Bot "configuration" now exists in integration configs (which
specify which tools should run under which conditions), but there are two
pieces of global configuration for the extension that still need to happen.
Specifically, Review Bot needs a user account (to use for posting reviews and
other API requests), and the URL of the AMQP broker.

We had an existing settings form that was capable of doing that, but it was
kind of terrible. It used a <select> widget pre-populated with all the users
on the system, which isn't scalable, plus it required people to manually create
a user account through the database UI first. It also had no feedback about
whether the broker URL was correct.

This change replaces that with a new form which is submitted asynchronously.
The user selector uses selectize with similar styling to the new multi-user
select field that we added recently, and includes a "create" option for making
a new Review Bot user. Once the settings are configured, it will attempt to
refresh the tools list on each worker, to show some feedback. Right now the
feedback includes the connection state and the list of workers (but not what
tools are available). If everything is configured correctly (the user and
broker are set, the broker is available, and there are running workers), this
will then link to the integration list to set up individual tool
configurations.

  • Loaded the form with various states of configuration. Saw that the form
    fields were always properly populated.
  • Created a reviewbot user through the form and saw that the User was created
    and properly set in the extension settings.
  • Updated the user through the form and saw that the extension settings were
    changed.
  • Filled out the broker URL field and saw that the extension settings were
    changed.
  • Verified that the broker status was updated on initial page load and any
    time the configuration settings changed.
  • Tested broker status (and worker status) feedback for the different cases of
    "unable to connect", "connected without workers", and "connected with
    workers".

    Loading...