[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

abarth at webkit.org abarth at webkit.org
Thu Apr 8 00:39:49 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 5a077c5761dd4604f351322451ee3c8e039fdbff
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 17 08:27:25 2009 +0000

    2009-12-17  Adam Barth  <abarth at webkit.org>
    
            Rubber stamp by Seidel.
    
            Clean up exception handling in WorkQueue.  Basically, a bunch of the
            delegate messages can throw exceptions because of network errors.  We
            want the queues to keep on ticking instead of erroring out.  That means
            we want to catch generic exceptions and continue looping.
    
            Also, cleaned up the exception handling in the EWS to properly log
            failures.
    
            * Scripts/modules/commands/early_warning_system.py:
            * Scripts/modules/commands/queues.py:
            * Scripts/modules/workqueue.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52242 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index d306aee..7ca5a6c 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,19 @@
+2009-12-17  Adam Barth  <abarth at webkit.org>
+
+        Rubber stamp by Seidel.
+
+        Clean up exception handling in WorkQueue.  Basically, a bunch of the
+        delegate messages can throw exceptions because of network errors.  We
+        want the queues to keep on ticking instead of erroring out.  That means
+        we want to catch generic exceptions and continue looping.
+
+        Also, cleaned up the exception handling in the EWS to properly log
+        failures.
+
+        * Scripts/modules/commands/early_warning_system.py:
+        * Scripts/modules/commands/queues.py:
+        * Scripts/modules/workqueue.py:
+
 2009-12-16  Adam Barth  <abarth at webkit.org>
 
         Reviewed by Eric Seidel.
diff --git a/WebKitTools/Scripts/modules/commands/early_warning_system.py b/WebKitTools/Scripts/modules/commands/early_warning_system.py
index 3e8fabe..c62bc56 100644
--- a/WebKitTools/Scripts/modules/commands/early_warning_system.py
+++ b/WebKitTools/Scripts/modules/commands/early_warning_system.py
@@ -45,20 +45,23 @@ class AbstractEarlyWarningSystem(AbstractReviewQueue):
         except ScriptError, e:
             self._update_status("Unable to perform a build.")
             return False
-        self._update_status("Building patch %s on bug %s." % (patch["id"], patch["bug_id"]), patch)
         return True
 
     def process_work_item(self, patch):
-        self.run_bugzilla_tool([
-            "build-attachment",
-            self.port.flag(),
-            "--force-clean",
-            "--quiet",
-            "--non-interactive",
-            "--parent-command=%s" % self.name,
-            "--no-update",
-            patch["id"]])
-        self._patches.did_pass(patch)
+        try:
+            self.run_bugzilla_tool([
+                "build-attachment",
+                self.port.flag(),
+                "--force-clean",
+                "--quiet",
+                "--non-interactive",
+                "--parent-command=%s" % self.name,
+                "--no-update",
+                patch["id"]])
+            self._patches.did_pass(patch)
+        except ScriptError, e:
+            self._patches.did_fail(patch)
+            raise e
 
     @classmethod
     def handle_script_error(cls, tool, state, script_error):
@@ -68,7 +71,7 @@ class AbstractEarlyWarningSystem(AbstractReviewQueue):
         patch = state["patch"]
         status_id = tool.status_bot.update_status(cls.name, "patch %s failed: %s" % (patch["id"], script_error.message), patch, StringIO(script_error.output))
         results_link = tool.status_bot.results_url_for_status(status_id)
-        message = "Attachment %s did not build on %s:\nFull output: %s" % (patch["id"], cls.port_name, results_link)
+        message = "Attachment %s did not build on %s:\nBuild output: %s" % (patch["id"], cls.port_name, results_link)
         tool.bugs.post_comment_to_bug(patch["bug_id"], message, cc=cls.watchers)
 
 
diff --git a/WebKitTools/Scripts/modules/commands/queues.py b/WebKitTools/Scripts/modules/commands/queues.py
index 7ffa98b..606636f 100644
--- a/WebKitTools/Scripts/modules/commands/queues.py
+++ b/WebKitTools/Scripts/modules/commands/queues.py
@@ -183,6 +183,7 @@ class AbstractReviewQueue(AbstractQueue, PersistentPatchCollectionDelegate, Step
         patch_id = self._patches.next()
         if patch_id:
             return self.tool.bugs.fetch_attachment(patch_id)
+        self._update_status("Empty queue.")
 
     def should_proceed_with_work_item(self, patch):
         raise NotImplementedError, "subclasses must implement"
diff --git a/WebKitTools/Scripts/modules/workqueue.py b/WebKitTools/Scripts/modules/workqueue.py
index b4fc9e1..314644d 100644
--- a/WebKitTools/Scripts/modules/workqueue.py
+++ b/WebKitTools/Scripts/modules/workqueue.py
@@ -90,8 +90,8 @@ class WorkQueue:
 
         self._delegate.begin_work_queue()
         while (self._delegate.should_continue_work_queue()):
-            self._ensure_work_log_closed()
             try:
+                self._ensure_work_log_closed()
                 work_item = self._delegate.next_work_item()
                 if not work_item:
                     self._sleep("No work item.")
@@ -99,6 +99,19 @@ class WorkQueue:
                 if not self._delegate.should_proceed_with_work_item(work_item):
                     self._sleep("Not proceeding with work item.")
                     continue
+
+                # FIXME: Work logs should not depend on bug_id specificaly.
+                #        This looks fixed, no?
+                self._open_work_log(work_item)
+                try:
+                    self._delegate.process_work_item(work_item)
+                except ScriptError, e:
+                    # Use a special exit code to indicate that the error was already
+                    # handled in the child process and we should just keep looping.
+                    if e.exit_code == self.handled_error_code:
+                        continue
+                    message = "Unexpected failure when landing patch!  Please file a bug against bugzilla-tool.\n%s" % e.message_with_output()
+                    self._delegate.handle_unexpected_error(work_item, message)
             except KeyboardInterrupt, e:
                 log("\nUser terminated queue.")
                 return 1
@@ -106,19 +119,6 @@ class WorkQueue:
                 traceback.print_exc()
                 # Don't try tell the status bot, in case telling it causes an exception.
                 self._sleep("Exception while preparing queue: %s." % e)
-                continue
-
-            # FIXME: Work logs should not depend on bug_id specificaly.
-            self._open_work_log(work_item)
-            try:
-                self._delegate.process_work_item(work_item)
-            except ScriptError, e:
-                # Use a special exit code to indicate that the error was already
-                # handled in the child process and we should just keep looping.
-                if e.exit_code == self.handled_error_code:
-                    continue
-                message = "Unexpected failure when landing patch!  Please file a bug against bugzilla-tool.\n%s" % e.message_with_output()
-                self._delegate.handle_unexpected_error(work_item, message)
         # Never reached.
         self._ensure_work_log_closed()
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list