Add manual run and retry for status updates.

Review Request #11129 — Created Aug. 10, 2020 and submitted — Latest diff uploaded

Information

Review Board
release-3.0.x
baa7313...

Reviewers

One common request for the status updates feature has been to allow
manual or deferred running of tools. This is desirable for a few
different situations, such as infrequently-run or expensive checkers,
test builds, etc. This change adds the framework for that.

The StatusUpdate model has a new state, NOT_YET_RUN, which will show
a button that will trigger the action. This requires that the caller (an
extension) listen to the new status_update_request_run signal to
actually run the tool.

Because it is very similar in its implementation, this additionally adds
an ability for the creator of the status update to indicate that it can
be retried. The Retry action will be shown if the status update is
marked as retryable (via extra_data), and the result of the status
update is in either error or timeout states. Like the "Run" action,
this requires handling the new signal to actually run the tool when the
user clicks the button.

The StatusUpdate API can now accept request-run in the state field,
which will trigger the new signal. This allows the frontend (or
third-party callers) to trigger the run/retry action.

Based on work by Alex Klemenchuk at /r/10311/

  • Ran python and JS unit tests.
  • Used in conjunction with a Review Bot change to use these features.
    Loading...