Changeset 52242 in webkit
- Timestamp:
- Dec 17, 2009 12:27:25 AM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r52241 r52242 1 2009-12-17 Adam Barth <abarth@webkit.org> 2 3 Rubber stamp by Seidel. 4 5 Clean up exception handling in WorkQueue. Basically, a bunch of the 6 delegate messages can throw exceptions because of network errors. We 7 want the queues to keep on ticking instead of erroring out. That means 8 we want to catch generic exceptions and continue looping. 9 10 Also, cleaned up the exception handling in the EWS to properly log 11 failures. 12 13 * Scripts/modules/commands/early_warning_system.py: 14 * Scripts/modules/commands/queues.py: 15 * Scripts/modules/workqueue.py: 16 1 17 2009-12-16 Adam Barth <abarth@webkit.org> 2 18 -
trunk/WebKitTools/Scripts/modules/commands/early_warning_system.py
r52240 r52242 46 46 self._update_status("Unable to perform a build.") 47 47 return False 48 self._update_status("Building patch %s on bug %s." % (patch["id"], patch["bug_id"]), patch)49 48 return True 50 49 51 50 def process_work_item(self, patch): 52 self.run_bugzilla_tool([ 53 "build-attachment", 54 self.port.flag(), 55 "--force-clean", 56 "--quiet", 57 "--non-interactive", 58 "--parent-command=%s" % self.name, 59 "--no-update", 60 patch["id"]]) 61 self._patches.did_pass(patch) 51 try: 52 self.run_bugzilla_tool([ 53 "build-attachment", 54 self.port.flag(), 55 "--force-clean", 56 "--quiet", 57 "--non-interactive", 58 "--parent-command=%s" % self.name, 59 "--no-update", 60 patch["id"]]) 61 self._patches.did_pass(patch) 62 except ScriptError, e: 63 self._patches.did_fail(patch) 64 raise e 62 65 63 66 @classmethod … … 69 72 status_id = tool.status_bot.update_status(cls.name, "patch %s failed: %s" % (patch["id"], script_error.message), patch, StringIO(script_error.output)) 70 73 results_link = tool.status_bot.results_url_for_status(status_id) 71 message = "Attachment %s did not build on %s:\n Fulloutput: %s" % (patch["id"], cls.port_name, results_link)74 message = "Attachment %s did not build on %s:\nBuild output: %s" % (patch["id"], cls.port_name, results_link) 72 75 tool.bugs.post_comment_to_bug(patch["bug_id"], message, cc=cls.watchers) 73 76 -
trunk/WebKitTools/Scripts/modules/commands/queues.py
r52238 r52242 184 184 if patch_id: 185 185 return self.tool.bugs.fetch_attachment(patch_id) 186 self._update_status("Empty queue.") 186 187 187 188 def should_proceed_with_work_item(self, patch): -
trunk/WebKitTools/Scripts/modules/workqueue.py
r52145 r52242 91 91 self._delegate.begin_work_queue() 92 92 while (self._delegate.should_continue_work_queue()): 93 self._ensure_work_log_closed()94 93 try: 94 self._ensure_work_log_closed() 95 95 work_item = self._delegate.next_work_item() 96 96 if not work_item: … … 100 100 self._sleep("Not proceeding with work item.") 101 101 continue 102 103 # FIXME: Work logs should not depend on bug_id specificaly. 104 # This looks fixed, no? 105 self._open_work_log(work_item) 106 try: 107 self._delegate.process_work_item(work_item) 108 except ScriptError, e: 109 # Use a special exit code to indicate that the error was already 110 # handled in the child process and we should just keep looping. 111 if e.exit_code == self.handled_error_code: 112 continue 113 message = "Unexpected failure when landing patch! Please file a bug against bugzilla-tool.\n%s" % e.message_with_output() 114 self._delegate.handle_unexpected_error(work_item, message) 102 115 except KeyboardInterrupt, e: 103 116 log("\nUser terminated queue.") … … 107 120 # Don't try tell the status bot, in case telling it causes an exception. 108 121 self._sleep("Exception while preparing queue: %s." % e) 109 continue110 111 # FIXME: Work logs should not depend on bug_id specificaly.112 self._open_work_log(work_item)113 try:114 self._delegate.process_work_item(work_item)115 except ScriptError, e:116 # Use a special exit code to indicate that the error was already117 # handled in the child process and we should just keep looping.118 if e.exit_code == self.handled_error_code:119 continue120 message = "Unexpected failure when landing patch! Please file a bug against bugzilla-tool.\n%s" % e.message_with_output()121 self._delegate.handle_unexpected_error(work_item, message)122 122 # Never reached. 123 123 self._ensure_work_log_closed()
Note: See TracChangeset
for help on using the changeset viewer.