Title: [159690] trunk/Tools
Revision
159690
Author
[email protected]
Date
2013-11-22 08:26:27 -0800 (Fri, 22 Nov 2013)

Log Message

EWS creates 0 byte sized log files
https://bugs.webkit.org/show_bug.cgi?id=107606

Patch by László Langó <[email protected]> on 2013-11-22
Reviewed by Ryosuke Niwa.

There was a modification in r138264, that tried to make less log,
because some of the messeges were duplicated. After this the EWS
created the log file (with the same name as the bugID) but doesn't
write anything into it, even if there were errors during the build.
>From now only creates the log file only if there is some error.

* Scripts/webkitpy/tool/bot/queueengine.py:
(QueueEngine.run): If the build and tests pass, there is no ScriptError raised,
there is nothing to log. Open the log file only if a ScriptError was raised to
avoid to make empty log files for bugs.
(QueueEngine._open_work_log): Does not need to tee STDOUT to log file anymore,
because of changes in r138264. Teeing is used for locally testing purposes and
this feature is not used anymore.
(QueueEngine._ensure_work_log_closed): Close the logfile. We don't use output
teeing anymore. It is a necessary change because of QueueEngine._open_work_log
change.
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(AbstractEarlyWarningSystem.review_patch): Raise again the captured ScriptError
to be able to handle it in QueueEngine.run. Without this change, the existing
exception handler never run (the process_work_item method never raise ScriptError)
We can get the error message only from the ScriptError at this point.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (159689 => 159690)


--- trunk/Tools/ChangeLog	2013-11-22 16:07:31 UTC (rev 159689)
+++ trunk/Tools/ChangeLog	2013-11-22 16:26:27 UTC (rev 159690)
@@ -1,3 +1,32 @@
+2013-11-22  László Langó  <[email protected]>
+
+        EWS creates 0 byte sized log files
+        https://bugs.webkit.org/show_bug.cgi?id=107606
+
+        Reviewed by Ryosuke Niwa.
+
+        There was a modification in r138264, that tried to make less log, 
+        because some of the messeges were duplicated. After this the EWS 
+        created the log file (with the same name as the bugID) but doesn't 
+        write anything into it, even if there were errors during the build. 
+        From now only creates the log file only if there is some error.
+
+        * Scripts/webkitpy/tool/bot/queueengine.py:
+        (QueueEngine.run): If the build and tests pass, there is no ScriptError raised,
+        there is nothing to log. Open the log file only if a ScriptError was raised to
+        avoid to make empty log files for bugs.
+        (QueueEngine._open_work_log): Does not need to tee STDOUT to log file anymore,
+        because of changes in r138264. Teeing is used for locally testing purposes and
+        this feature is not used anymore.
+        (QueueEngine._ensure_work_log_closed): Close the logfile. We don't use output 
+        teeing anymore. It is a necessary change because of QueueEngine._open_work_log
+        change.
+        * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+        (AbstractEarlyWarningSystem.review_patch): Raise again the captured ScriptError
+        to be able to handle it in QueueEngine.run. Without this change, the existing
+        exception handler never run (the process_work_item method never raise ScriptError)
+        We can get the error message only from the ScriptError at this point.
+
 2013-11-21  Peter Molnar  <[email protected]>
 
         Remove ENABLE_WORKERS

Modified: trunk/Tools/Scripts/webkitpy/tool/bot/queueengine.py (159689 => 159690)


--- trunk/Tools/Scripts/webkitpy/tool/bot/queueengine.py	2013-11-22 16:07:31 UTC (rev 159689)
+++ trunk/Tools/Scripts/webkitpy/tool/bot/queueengine.py	2013-11-22 16:26:27 UTC (rev 159690)
@@ -97,14 +97,13 @@
                     self._sleep("No work item.")
                     continue
 
-                # FIXME: Work logs should not depend on bug_id specificaly.
-                #        This looks fixed, no?
-                self._open_work_log(work_item)
                 try:
                     if not self._delegate.process_work_item(work_item):
                         _log.warning("Unable to process work item.")
                         continue
                 except ScriptError, e:
+                    self._open_work_log(work_item)
+                    self._work_log.write(e.message_with_output())
                     # 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:
@@ -139,12 +138,12 @@
         work_item_log_path = self._delegate.work_item_log_path(work_item)
         if not work_item_log_path:
             return
-        self._work_log = self._output_tee.add_log(work_item_log_path)
+        self._work_log = self._output_tee._open_log_file(work_item_log_path)
 
     def _ensure_work_log_closed(self):
         # If we still have a bug log open, close it.
         if self._work_log:
-            self._output_tee.remove_log(self._work_log)
+            self._work_log.close()
             self._work_log = None
 
     def _now(self):

Modified: trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py (159689 => 159690)


--- trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py	2013-11-22 16:07:31 UTC (rev 159689)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py	2013-11-22 16:26:27 UTC (rev 159690)
@@ -92,10 +92,7 @@
             if results_archive:
                 self._upload_results_archive_for_patch(patch, results_archive)
             self._did_fail(patch)
-            # FIXME: We're supposed to be able to raise e again here and have
-            # one of our base classes mark the patch as fail, but there seems
-            # to be an issue with the exit_code.
-            return False
+            raise e
 
     # EarlyWarningSystemDelegate methods
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to