[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

eric at webkit.org eric at webkit.org
Wed Dec 22 12:32:23 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 95f68a53e822af07feb0f1ee099aa4f910bb6b37
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Aug 25 05:11:56 2010 +0000

    2010-08-24  Eric Seidel  <eric at 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:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65979 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index a48b408..4227b7e 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -2,6 +2,26 @@
 
         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:
+
+2010-08-24  Eric Seidel  <eric at webkit.org>
+
+        Reviewed by Adam Barth.
+
         Remove HTML5 parser testing infrastructure now that we don't need it
         https://bugs.webkit.org/show_bug.cgi?id=44581
 
diff --git a/WebKitTools/Scripts/webkitpy/common/system/executive.py b/WebKitTools/Scripts/webkitpy/common/system/executive.py
index 6088680..7c00f22 100644
--- a/WebKitTools/Scripts/webkitpy/common/system/executive.py
+++ b/WebKitTools/Scripts/webkitpy/common/system/executive.py
@@ -73,10 +73,10 @@ class ScriptError(Exception):
     def message_with_output(self, output_limit=500):
         if self.output:
             if output_limit and len(self.output) > output_limit:
-                return "%s\nLast %s characters of output:\n%s" % \
+                return u"%s\nLast %s characters of output:\n%s" % \
                     (self, output_limit, self.output[-output_limit:])
-            return "%s\n%s" % (self, self.output)
-        return str(self)
+            return u"%s\n%s" % (self, self.output)
+        return unicode(self)
 
     def command_name(self):
         command_path = self.script_args
diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem.py b/WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem.py
index 750bbfd..432a877 100644
--- a/WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem.py
+++ b/WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem.py
@@ -55,7 +55,8 @@ class AbstractEarlyWarningSystem(AbstractReviewQueue):
                 "--quiet"])
             return True
         except ScriptError, e:
-            self._update_status("Unable to perform a build")
+            failure_log = self._log_from_script_error_for_upload(e)
+            self._update_status("Unable to perform a build", results_file=failure_log)
             return False
 
     def _build(self, patch, first_run=False):
diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/queues.py b/WebKitTools/Scripts/webkitpy/tool/commands/queues.py
index 97c3ddb..4d2a9df 100644
--- a/WebKitTools/Scripts/webkitpy/tool/commands/queues.py
+++ b/WebKitTools/Scripts/webkitpy/tool/commands/queues.py
@@ -120,15 +120,24 @@ class AbstractQueue(Command, QueueEngineDelegate):
         return engine(self.name, self, self.tool.wakeup_event).run()
 
     @classmethod
+    def _log_from_script_error_for_upload(cls, script_error, output_limit=None):
+        # We have seen request timeouts with app engine due to large
+        # log uploads.  Trying only the last 512k.
+        if not output_limit:
+            output_limit = 512 * 1024  # 512k
+        output = script_error.message_with_output(output_limit=output_limit)
+        # We pre-encode the string to a byte array before passing it
+        # to status_server, because ClientForm (part of mechanize)
+        # wants a file-like object with pre-encoded data.
+        return StringIO(output.encode("utf-8"))
+
+    @classmethod
     def _update_status_for_script_error(cls, tool, state, script_error, is_error=False):
         message = str(script_error)
         if is_error:
             message = "Error: %s" % message
-        output = script_error.message_with_output(output_limit=1024*1024) # 1MB
-        # We pre-encode the string to a byte array before passing it
-        # to status_server, because ClientForm (part of mechanize)
-        # wants a file-like object with pre-encoded data.
-        return tool.status_server.update_status(cls.name, message, state["patch"], StringIO(output.encode("utf-8")))
+        failure_log = cls._log_from_script_error_for_upload(script_error)
+        return tool.status_server.update_status(cls.name, message, state["patch"], failure_log)
 
 
 class AbstractPatchQueue(AbstractQueue):
@@ -203,7 +212,8 @@ class CommitQueue(AbstractPatchQueue, StepSequenceErrorHandler):
                 "--build-style=both",
                 "--quiet"])
         except ScriptError, e:
-            self._update_status("Unable to successfully build and test", None)
+            failure_log = self._log_from_script_error_for_upload(e)
+            self._update_status("Unable to successfully build and test", results_file=failure_log)
             return False
         return True
 
diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py b/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py
index f82eb19..99f386e 100644
--- a/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py
@@ -99,6 +99,19 @@ class AbstractQueueTest(CommandsTest):
         self.assertTrue(queue.should_continue_work_queue())
         self.assertTrue(queue.should_continue_work_queue())
 
+    def _assert_log_message(self, script_error, log_message):
+        failure_log = AbstractQueue._log_from_script_error_for_upload(script_error, output_limit=10)
+        self.assertTrue(failure_log.read(), log_message)
+
+    def test_log_from_script_error_for_upload(self):
+        self._assert_log_message(ScriptError("test"), "test")
+        unicode_tor = u"WebKit \u2661 Tor Arne Vestb\u00F8!"
+        utf8_tor = unicode_tor.encode("utf-8")
+        self._assert_log_message(ScriptError(unicode_tor), utf8_tor)
+        script_error = ScriptError(unicode_tor, output=unicode_tor)
+        expected_output = "%s\nLast %s characters of output:\n%s" % (utf8_tor, 10, utf8_tor[-10:])
+        self._assert_log_message(script_error, expected_output)
+
 
 class AbstractReviewQueueTest(CommandsTest):
     def test_patch_collection_delegate_methods(self):

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list