Changeset 65979 in webkit


Ignore:
Timestamp:
Aug 24, 2010 10:11:56 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-08-24 Eric Seidel <eric@webkit.org>

Reviewed by Adam Barth.

commit-queue and EWS bots should report all failures
https://bugs.webkit.org/show_bug.cgi?id=41820

Right now commit-queue/EWS only report failures when the
patch under testing fails. We should report all failures
to the status server so that we can diagnose when the bots
are wedged w/o needing to log into the machines.

I also reduced the amount of data we upload since we've seen
timeouts during status upload.

  • Scripts/webkitpy/common/system/executive.py:
  • Scripts/webkitpy/tool/commands/earlywarningsystem.py:
  • Scripts/webkitpy/tool/commands/queues.py:
  • Scripts/webkitpy/tool/commands/queues_unittest.py:
Location:
trunk/WebKitTools
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r65978 r65979  
     12010-08-24  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        commit-queue and EWS bots should report all failures
     6        https://bugs.webkit.org/show_bug.cgi?id=41820
     7
     8        Right now commit-queue/EWS only report failures when the
     9        patch under testing fails.  We should report all failures
     10        to the status server so that we can diagnose when the bots
     11        are wedged w/o needing to log into the machines.
     12
     13        I also reduced the amount of data we upload since we've seen
     14        timeouts during status upload.
     15
     16        * Scripts/webkitpy/common/system/executive.py:
     17        * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
     18        * Scripts/webkitpy/tool/commands/queues.py:
     19        * Scripts/webkitpy/tool/commands/queues_unittest.py:
     20
    1212010-08-24  Eric Seidel  <eric@webkit.org>
    222
  • trunk/WebKitTools/Scripts/webkitpy/common/system/executive.py

    r63041 r65979  
    7474        if self.output:
    7575            if output_limit and len(self.output) > output_limit:
    76                 return "%s\nLast %s characters of output:\n%s" % \
     76                return u"%s\nLast %s characters of output:\n%s" % \
    7777                    (self, output_limit, self.output[-output_limit:])
    78             return "%s\n%s" % (self, self.output)
    79         return str(self)
     78            return u"%s\n%s" % (self, self.output)
     79        return unicode(self)
    8080
    8181    def command_name(self):
  • trunk/WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem.py

    r64995 r65979  
    5656            return True
    5757        except ScriptError, e:
    58             self._update_status("Unable to perform a build")
     58            failure_log = self._log_from_script_error_for_upload(e)
     59            self._update_status("Unable to perform a build", results_file=failure_log)
    5960            return False
    6061
  • trunk/WebKitTools/Scripts/webkitpy/tool/commands/queues.py

    r62923 r65979  
    121121
    122122    @classmethod
     123    def _log_from_script_error_for_upload(cls, script_error, output_limit=None):
     124        # We have seen request timeouts with app engine due to large
     125        # log uploads.  Trying only the last 512k.
     126        if not output_limit:
     127            output_limit = 512 * 1024  # 512k
     128        output = script_error.message_with_output(output_limit=output_limit)
     129        # We pre-encode the string to a byte array before passing it
     130        # to status_server, because ClientForm (part of mechanize)
     131        # wants a file-like object with pre-encoded data.
     132        return StringIO(output.encode("utf-8"))
     133
     134    @classmethod
    123135    def _update_status_for_script_error(cls, tool, state, script_error, is_error=False):
    124136        message = str(script_error)
    125137        if is_error:
    126138            message = "Error: %s" % message
    127         output = script_error.message_with_output(output_limit=1024*1024) # 1MB
    128         # We pre-encode the string to a byte array before passing it
    129         # to status_server, because ClientForm (part of mechanize)
    130         # wants a file-like object with pre-encoded data.
    131         return tool.status_server.update_status(cls.name, message, state["patch"], StringIO(output.encode("utf-8")))
     139        failure_log = cls._log_from_script_error_for_upload(script_error)
     140        return tool.status_server.update_status(cls.name, message, state["patch"], failure_log)
    132141
    133142
     
    204213                "--quiet"])
    205214        except ScriptError, e:
    206             self._update_status("Unable to successfully build and test", None)
     215            failure_log = self._log_from_script_error_for_upload(e)
     216            self._update_status("Unable to successfully build and test", results_file=failure_log)
    207217            return False
    208218        return True
  • trunk/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py

    r61831 r65979  
    100100        self.assertTrue(queue.should_continue_work_queue())
    101101
     102    def _assert_log_message(self, script_error, log_message):
     103        failure_log = AbstractQueue._log_from_script_error_for_upload(script_error, output_limit=10)
     104        self.assertTrue(failure_log.read(), log_message)
     105
     106    def test_log_from_script_error_for_upload(self):
     107        self._assert_log_message(ScriptError("test"), "test")
     108        unicode_tor = u"WebKit \u2661 Tor Arne Vestb\u00F8!"
     109        utf8_tor = unicode_tor.encode("utf-8")
     110        self._assert_log_message(ScriptError(unicode_tor), utf8_tor)
     111        script_error = ScriptError(unicode_tor, output=unicode_tor)
     112        expected_output = "%s\nLast %s characters of output:\n%s" % (utf8_tor, 10, utf8_tor[-10:])
     113        self._assert_log_message(script_error, expected_output)
     114
    102115
    103116class AbstractReviewQueueTest(CommandsTest):
Note: See TracChangeset for help on using the changeset viewer.