Changeset 52216 in webkit


Ignore:
Timestamp:
Dec 16, 2009 1:17:00 PM (14 years ago)
Author:
eric@webkit.org
Message:

2009-12-16 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

[bzt] Add error handling to the early warning system
https://bugs.webkit.org/show_bug.cgi?id=32594

This should be the last step in making the EWS operational. When we
have a build error, we post the log to QueueStatusServer and add a link
to the bug.

  • Scripts/modules/commands/early_warning_system.py:
  • Scripts/modules/commands/queues.py:
  • Scripts/modules/executive.py:
Location:
trunk/WebKitTools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r52194 r52216  
     12009-12-16  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        [bzt] Add error handling to the early warning system
     6        https://bugs.webkit.org/show_bug.cgi?id=32594
     7
     8        This should be the last step in making the EWS operational.  When we
     9        have a build error, we post the log to QueueStatusServer and add a link
     10        to the bug.
     11
     12        * Scripts/modules/commands/early_warning_system.py:
     13        * Scripts/modules/commands/queues.py:
     14        * Scripts/modules/executive.py:
     15
    1162009-12-16  Simon Hausmann  <simon.hausmann@nokia.com>
    217
  • trunk/WebKitTools/Scripts/modules/commands/early_warning_system.py

    r51889 r52216  
    2828# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2929
     30from StringIO import StringIO
     31
    3032from modules.commands.queues import AbstractReviewQueue
    3133from modules.executive import ScriptError
    3234from modules.webkitport import WebKitPort
     35
    3336
    3437class AbstractEarlyWarningSystem(AbstractReviewQueue):
     
    4144            self.run_bugzilla_tool(["build", self.port.flag(), "--force-clean", "--quiet"])
    4245        except ScriptError, e:
    43             return (False, "Unable to perform a build.", None)
    44         return (True, "Building patch %s on bug %s." % (patch["id"], patch["bug_id"]), patch)
     46            self._update_status("Unable to perform a build.")
     47            return False
     48        self._update_status("Building patch %s on bug %s." % (patch["id"], patch["bug_id"]), patch)
     49        return True
    4550
    4651    def process_work_item(self, patch):
     
    5661        self._patches.did_pass(patch)
    5762
     63    @classmethod
     64    def handle_script_error(cls, tool, state, script_error):
     65        # FIXME: This won't be right for ports that don't use build-webkit!
     66        if not script_error.command_name() == "build-webkit":
     67            return
     68        patch = state["patch"]
     69        status_id = tool.status_bot.update_status(cls.name, "patch %s failed: %s" % (patch["id"], script_error.message), patch, StringIO(script_error.output))
     70        results_link = tool.status_bot.results_url_for_status(status_id)
     71        message = "Attachment %s did not build on %s:\nFull output: %s" % (patch["id"], cls.port_name, results_link)
     72        tool.bugs.post_comment_to_bug(patch["bug_id"], message, cc=cls.watchers)
     73
    5874
    5975class QtEWS(AbstractEarlyWarningSystem):
  • trunk/WebKitTools/Scripts/modules/commands/queues.py

    r52188 r52216  
    3030
    3131import os
    32 import re
    3332
    3433from datetime import datetime
     
    223222    @classmethod
    224223    def handle_script_error(cls, tool, state, script_error):
    225         command = script_error.script_args
    226         if type(command) is list:
    227             command = command[0]
    228         # FIXME: We shouldn't need to use a regexp here.  ScriptError should
    229         #        have a better API.
    230         if re.search("check-webkit-style", command):
    231             message = "Attachment %s did not pass %s:\n\n%s" % (state["patch"]["id"], cls.name, script_error.message_with_output(output_limit=5*1024))
    232             tool.bugs.post_comment_to_bug(state["patch"]["bug_id"], message, cc=cls.watchers)
     224        if not script_error.command_name() == "check-webkit-style":
     225            return
     226        message = "Attachment %s did not pass %s:\n\n%s" % (state["patch"]["id"], cls.name, script_error.message_with_output(output_limit=5*1024))
     227        tool.bugs.post_comment_to_bug(state["patch"]["bug_id"], message, cc=cls.watchers)
  • trunk/WebKitTools/Scripts/modules/executive.py

    r51969 r52216  
    5757            return "%s\n%s" % (self, self.output)
    5858        return str(self)
     59
     60    def command_name(self):
     61        command_path = self.script_args
     62        if type(command_path) is list:
     63            command_path = command_path[0]
     64        return os.path.basename(command_path)
    5965
    6066
Note: See TracChangeset for help on using the changeset viewer.