No subject


Fri Nov 22 17:22:33 PST 2013


* Scripts/webkitpy/tool/bot/queueengine.py:
(QueueEngine.run): If the build and tests pass, there is no ScriptError r=
aised,
there is nothing to log. Open the log file only if a ScriptError was rais=
ed to
avoid to make empty log files for bugs.
(QueueEngine._open_work_log): Does not need to tee STDOUT to log file any=
more,
because of changes in <a href=3D"http://trac.webkit.org/projects/webkit/c=
hangeset/138264">r138264</a>. 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 ou=
tput
teeing anymore. It is a necessary change because of QueueEngine._open_wor=
k_log
change.
* Scripts/webkitpy/tool/bot/queueengine_unittest.py:
(LoggingDelegate): The order of the callbacks was changed by this patch.
(QueueEngineTest.test_trivial): Won't create log file if the queue was te=
rminated,
so we have to update this test.
(QueueEngineTest.test_unexpected_error): The order of the callbacks was c=
hanged by
this patch.
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(AbstractEarlyWarningSystem.review_patch): Raise again the captured Scrip=
tError
to be able to handle it in QueueEngine.run. Without this change, the exis=
ting
exception handler never run (the process_work_item method never raise Scr=
iptError)
We can get the error message only from the ScriptError at this point.</pr=
e>

<h3>Modified Paths</h3>
<ul>
<li><a href=3D"#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href=3D"#trunkToolsScriptswebkitpytoolbotqueueenginepy">trunk/Tool=
s/Scripts/webkitpy/tool/bot/queueengine.py</a></li>
<li><a href=3D"#trunkToolsScriptswebkitpytoolbotqueueengine_unittestpy">t=
runk/Tools/Scripts/webkitpy/tool/bot/queueengine_unittest.py</a></li>
<li><a href=3D"#trunkToolsScriptswebkitpytoolcommandsearlywarningsystempy=
">trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py</a></l=
i>
</ul>

</div>
<div id=3D"patch">
<h3>Diff</h3>
<a id=3D"trunkToolsChangeLog"></a>
<div class=3D"modfile"><h4>Modified: trunk/Tools/ChangeLog (159748 =3D> 1=
59749)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Tools/ChangeLog	2013-11-25 15:28:45 UTC (r=
ev 159748)
+++ trunk/Tools/ChangeLog	2013-11-25 15:48:07 UTC (rev 159749)
</span><span class=3D"lines">@@ -1,3 +1,38 @@
</span><ins>+2013-11-25  L=C3=A1szl=C3=B3 Lang=C3=B3  &lt;lango at inf.u-sze=
ged.hu&gt;
+
+        EWS creates 0 byte sized log files
+        https://bugs.webkit.org/show_bug.cgi?id=3D107606
+
+        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 bui=
ld.
+        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 Scri=
ptError 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 testin=
g 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/bot/queueengine_unittest.py:
+        (LoggingDelegate): The order of the callbacks was changed by thi=
s patch.
+        (QueueEngineTest.test_trivial): Won't create log file if the que=
ue was terminated,
+        so we have to update this test.
+        (QueueEngineTest.test_unexpected_error): The order of the callba=
cks was changed by
+        this patch.
+        * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+        (AbstractEarlyWarningSystem.review_patch): Raise again the captu=
red 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 p=
oint.
+
</ins><span class=3D"cx"> 2013-11-22  Dean Jackson  &lt;dino at apple.com&gt=
;
</span><span class=3D"cx">=20
</span><span class=3D"cx">         Speculative Mountain Lion build fix.
</span></span></pre></div>
<a id=3D"trunkToolsScriptswebkitpytoolbotqueueenginepy"></a>
<div class=3D"modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/bo=
t/queueengine.py (159748 =3D> 159749)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Tools/Scripts/webkitpy/tool/bot/queueengin=
e.py	2013-11-25 15:28:45 UTC (rev 159748)
+++ trunk/Tools/Scripts/webkitpy/tool/bot/queueengine.py	2013-11-25 15:48=
:07 UTC (rev 159749)
</span><span class=3D"lines">@@ -97,14 +97,13 @@
</span><span class=3D"cx">                     self._sleep(&quot;No work =
item.&quot;)
</span><span class=3D"cx">                     continue
</span><span class=3D"cx">=20
</span><del>-                # FIXME: Work logs should not depend on bug_=
id specificaly.
-                #        This looks fixed, no?
-                self._open_work_log(work_item)
</del><span class=3D"cx">                 try:
</span><span class=3D"cx">                     if not self._delegate.proc=
ess_work_item(work_item):
</span><span class=3D"cx">                         _log.warning(&quot;Una=
ble to process work item.&quot;)
</span><span class=3D"cx">                         continue
</span><span class=3D"cx">                 except ScriptError, e:
</span><ins>+                    self._open_work_log(work_item)
+                    self._work_log.write(e.message_with_output())
</ins><span class=3D"cx">                     # Use a special exit code t=
o indicate that the error was already
</span><span class=3D"cx">                     # handled in the child pro=
cess and we should just keep looping.
</span><span class=3D"cx">                     if e.exit_code =3D=3D self=
.handled_error_code:
</span><span class=3D"lines">@@ -139,12 +138,12 @@
</span><span class=3D"cx">         work_item_log_path =3D self._delegate.=
work_item_log_path(work_item)
</span><span class=3D"cx">         if not work_item_log_path:
</span><span class=3D"cx">             return
</span><del>-        self._work_log =3D self._output_tee.add_log(work_ite=
m_log_path)
</del><ins>+        self._work_log =3D self._output_tee._open_log_file(wo=
rk_item_log_path)
</ins><span class=3D"cx">=20
</span><span class=3D"cx">     def _ensure_work_log_closed(self):
</span><span class=3D"cx">         # If we still have a bug log open, clo=
se it.
</span><span class=3D"cx">         if self._work_log:
</span><del>-            self._output_tee.remove_log(self._work_log)
</del><ins>+            self._work_log.close()
</ins><span class=3D"cx">             self._work_log =3D None
</span><span class=3D"cx">=20
</span><span class=3D"cx">     def _now(self):
</span></span></pre></div>
<a id=3D"trunkToolsScriptswebkitpytoolbotqueueengine_unittestpy"></a>
<div class=3D"modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/bo=
t/queueengine_unittest.py (159748 =3D> 159749)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Tools/Scripts/webkitpy/tool/bot/queueengin=
e_unittest.py	2013-11-25 15:28:45 UTC (rev 159748)
+++ trunk/Tools/Scripts/webkitpy/tool/bot/queueengine_unittest.py	2013-11=
-25 15:48:07 UTC (rev 159749)
</span><span class=3D"lines">@@ -50,8 +50,8 @@
</span><span class=3D"cx">         'begin_work_queue',
</span><span class=3D"cx">         'should_continue_work_queue',
</span><span class=3D"cx">         'next_work_item',
</span><ins>+        'process_work_item',
</ins><span class=3D"cx">         'work_item_log_path',
</span><del>-        'process_work_item',
</del><span class=3D"cx">         'should_continue_work_queue',
</span><span class=3D"cx">         'stop_work_queue',
</span><span class=3D"cx">     ]
</span><span class=3D"lines">@@ -119,20 +119,21 @@
</span><span class=3D"cx"> class QueueEngineTest(unittest.TestCase):
</span><span class=3D"cx">     def test_trivial(self):
</span><span class=3D"cx">         delegate =3D LoggingDelegate(self)
</span><ins>+        expected_callbacks =3D LoggingDelegate.expected_call=
backs[:]
+        expected_callbacks.remove('work_item_log_path')
</ins><span class=3D"cx">         self._run_engine(delegate)
</span><span class=3D"cx">         self.assertEqual(delegate.stop_message=
, &quot;Delegate terminated queue.&quot;)
</span><del>-        self.assertEqual(delegate._callbacks, LoggingDelegat=
e.expected_callbacks)
</del><ins>+        self.assertEqual(delegate._callbacks, expected_callba=
cks)
</ins><span class=3D"cx">         self.assertTrue(os.path.exists(os.path.=
join(self.temp_dir, &quot;queue_log_path&quot;)))
</span><del>-        self.assertTrue(os.path.exists(os.path.join(self.tem=
p_dir, &quot;work_log_path&quot;, &quot;work_item.log&quot;)))
</del><span class=3D"cx">=20
</span><span class=3D"cx">     def test_unexpected_error(self):
</span><span class=3D"cx">         delegate =3D RaisingDelegate(self, Scr=
iptError(exit_code=3D3))
</span><span class=3D"cx">         self._run_engine(delegate)
</span><span class=3D"cx">         expected_callbacks =3D LoggingDelegate=
.expected_callbacks[:]
</span><del>-        work_item_index =3D expected_callbacks.index('proces=
s_work_item')
</del><ins>+        work_item_log_path_index =3D expected_callbacks.index=
('work_item_log_path')
</ins><span class=3D"cx">         # The unexpected error should be handle=
d right after process_work_item starts
</span><span class=3D"cx">         # but before any other callback.  Othe=
rwise callbacks should be normal.
</span><del>-        expected_callbacks.insert(work_item_index + 1, 'hand=
le_unexpected_error')
</del><ins>+        expected_callbacks.insert(work_item_log_path_index + =
1, 'handle_unexpected_error')
</ins><span class=3D"cx">         self.assertEqual(delegate._callbacks, e=
xpected_callbacks)
</span><span class=3D"cx">=20
</span><span class=3D"cx">     def test_handled_error(self):
</span></span></pre></div>
<a id=3D"trunkToolsScriptswebkitpytoolcommandsearlywarningsystempy"></a>
<div class=3D"modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/co=
mmands/earlywarningsystem.py (159748 =3D> 159749)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Tools/Scripts/webkitpy/tool/commands/early=
warningsystem.py	2013-11-25 15:28:45 UTC (rev 159748)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py	2013=
-11-25 15:48:07 UTC (rev 159749)
</span><span class=3D"lines">@@ -92,10 +92,7 @@
</span><span class=3D"cx">             if results_archive:
</span><span class=3D"cx">                 self._upload_results_archive_f=
or_patch(patch, results_archive)
</span><span class=3D"cx">             self._did_fail(patch)
</span><del>-            # FIXME: We're supposed to be able to raise e ag=
ain 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
</del><ins>+            raise e
</ins><span class=3D"cx">=20
</span><span class=3D"cx">     # EarlyWarningSystemDelegate methods
</span><span class=3D"cx">=20
</span></span></pre>
</div>
</div>

</body>
</html>


More information about the webkit-changes mailing list