Add more tracking of tool executions.
Review Request #6238 — Created Aug. 16, 2014 and submitted
This change adds basic logging of tool executions (more work should be done
later on determining when a tool execution has timed out, etc.). Review Bot
workers will now update their corresponding tool execution with their status
whenever there is a failure or when they have just begun 'running'.
For an error, the tool execution will be updated with the status 'failed' and a
result containing the error message.
Manually executed a tool profile with errors, and saw a PUT with with the
'failed' status and the error message. Verified that the tool execution object
had the correct contents and that the tool profile was still executable. A
review was not published.
Manually executed a tool profile that had no errors, and saw a PUT that updated
the tool execution's status to 'running', followed by a PUT with the
'succeeded' status and JSON review results. A review was published.
for each run of a tool we're calling _get_extension_resource(...) a number of times, which always makes an HTTP request. We …
bot/reviewbot/tasks.py (Diff revision 1)
for each run of a tool we're calling
_get_extension_resource(...)a number of times, which always makes an HTTP request.
We never actually read anything off of the resource, just use it to link out to sub resources; It might be worth caching this to save on some requests.
This is probably just premature optimization though, so if you'd prefer to just leave a TODO saying we should cache it somewhere that's fine.