Add timeout to Review Bot tools.

Review Request #8532 — Created Nov. 10, 2016 and submitted

Information

ReviewBot
master
85ec48d...

Reviewers

This change adds a timeout to tools for use in the status updates. This makes
it so that if, for some reason, the tool doesn't execute, it will show up as
"timed out" after a period. In production this can happen if there are no
workers that have that tool available, or the broker has decided to stop
passing messages because the disk is filling up.

  • Enabled extension after switching to this branch and saw that the evolution
    was correctly applied (after a couple hours of banging my head against the
    wall because of some .pyc nonsense).
  • Refreshed the tool list and saw that the timeouts defined in the tool
    classes were properly plumbed through into the DB models.
  • Stopped my worker node and triggered some tools by publishing a review
    request. Saw that the new status updates were initially listed as "starting",
    and that after the configured timeout, were then listed as "timed out".
  • Restarted my worker node and saw the tools run and the status update
    change to "passed".
Description From Last Updated

Can we add doc comments to this? It'll be helpful for future tool authors to know what this is for …

chipx86chipx86
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        bot/reviewbot/tasks.py
        extension/reviewbotext/evolutions/tool_timeout.py
        bot/reviewbot/tools/__init__.py
        bot/reviewbot/tools/cppcheck.py
        bot/reviewbot/tools/cpplint.py
        extension/reviewbotext/admin.py
        extension/reviewbotext/integration.py
        bot/reviewbot/tools/pyflakes.py
        extension/reviewbotext/resources.py
        extension/reviewbotext/evolutions/__init__.py
        bot/reviewbot/tools/pep8.py
        bot/reviewbot/tools/jshint.py
        extension/reviewbotext/models.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        bot/reviewbot/tasks.py
        extension/reviewbotext/evolutions/tool_timeout.py
        bot/reviewbot/tools/__init__.py
        bot/reviewbot/tools/cppcheck.py
        bot/reviewbot/tools/cpplint.py
        extension/reviewbotext/admin.py
        extension/reviewbotext/integration.py
        bot/reviewbot/tools/pyflakes.py
        extension/reviewbotext/resources.py
        extension/reviewbotext/evolutions/__init__.py
        bot/reviewbot/tools/pep8.py
        bot/reviewbot/tools/jshint.py
        extension/reviewbotext/models.py
    
    
  2. 
      
chipx86
  1. 
      
  2. bot/reviewbot/tools/__init__.py (Diff revision 1)
     
     

    Can we add doc comments to this? It'll be helpful for future tool authors to know what this is for and what time measurement it's in.

  3. 
      
david
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        bot/reviewbot/tasks.py
        extension/reviewbotext/evolutions/tool_timeout.py
        bot/reviewbot/tools/__init__.py
        bot/reviewbot/tools/cppcheck.py
        bot/reviewbot/tools/cpplint.py
        extension/reviewbotext/admin.py
        extension/reviewbotext/integration.py
        bot/reviewbot/tools/pyflakes.py
        extension/reviewbotext/resources.py
        extension/reviewbotext/evolutions/__init__.py
        bot/reviewbot/tools/pep8.py
        bot/reviewbot/tools/jshint.py
        extension/reviewbotext/models.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        bot/reviewbot/tasks.py
        extension/reviewbotext/evolutions/tool_timeout.py
        bot/reviewbot/tools/__init__.py
        bot/reviewbot/tools/cppcheck.py
        bot/reviewbot/tools/cpplint.py
        extension/reviewbotext/admin.py
        extension/reviewbotext/integration.py
        bot/reviewbot/tools/pyflakes.py
        extension/reviewbotext/resources.py
        extension/reviewbotext/evolutions/__init__.py
        bot/reviewbot/tools/pep8.py
        bot/reviewbot/tools/jshint.py
        extension/reviewbotext/models.py
    
    
  2. 
      
brennie
  1. Ship It!
  2. 
      
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (0aaadb0)
Loading...