Title: [204382] trunk/Tools
Revision
204382
Author
aakash_j...@apple.com
Date
2016-08-11 12:45:13 -0700 (Thu, 11 Aug 2016)

Log Message

EWS should check if the patch is still valid before executing every major step
https://bugs.webkit.org/show_bug.cgi?id=160739
rdar://problem/27768813

Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/tool/bot/commitqueuetask.py:
(CommitQueueTask.run): validate method is now executed in base class.
* Scripts/webkitpy/tool/bot/earlywarningsystemtask.py:
(EarlyWarningSystemTask.run): validate method is now executed in base class.
* Scripts/webkitpy/tool/bot/stylequeuetask.py:
(StyleQueueTask.validate): Raise an PatchIsNotValid exception instead of returning False.
* Scripts/webkitpy/tool/bot/patchanalysistask.py:
(PatchAnalysisTask._run_command): validate the patch before executing any command. This is to ensure
that we do not waste time on any patch which has become invalid (e.g.: obsolete, r-).
* Scripts/webkitpy/tool/commands/perfalizer.py:
(PerfalizerTask.validate): Added.
* Scripts/webkitpy/tool/commands/queues_unittest.py:
(test_manual_reject_during_processing): Updated test case.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (204381 => 204382)


--- trunk/Tools/ChangeLog	2016-08-11 19:22:26 UTC (rev 204381)
+++ trunk/Tools/ChangeLog	2016-08-11 19:45:13 UTC (rev 204382)
@@ -1,3 +1,25 @@
+2016-08-11  Aakash Jain  <aakash_j...@apple.com>
+
+        EWS should check if the patch is still valid before executing every major step
+        https://bugs.webkit.org/show_bug.cgi?id=160739
+        rdar://problem/27768813
+
+        Reviewed by Alexey Proskuryakov.
+
+        * Scripts/webkitpy/tool/bot/commitqueuetask.py:
+        (CommitQueueTask.run): validate method is now executed in base class.
+        * Scripts/webkitpy/tool/bot/earlywarningsystemtask.py:
+        (EarlyWarningSystemTask.run): validate method is now executed in base class.
+        * Scripts/webkitpy/tool/bot/stylequeuetask.py:
+        (StyleQueueTask.validate): Raise an PatchIsNotValid exception instead of returning False.
+        * Scripts/webkitpy/tool/bot/patchanalysistask.py:
+        (PatchAnalysisTask._run_command): validate the patch before executing any command. This is to ensure
+        that we do not waste time on any patch which has become invalid (e.g.: obsolete, r-).
+        * Scripts/webkitpy/tool/commands/perfalizer.py:
+        (PerfalizerTask.validate): Added.
+        * Scripts/webkitpy/tool/commands/queues_unittest.py:
+        (test_manual_reject_during_processing): Updated test case.
+
 2016-08-11  Alex Christensen  <achristen...@webkit.org>
 
         Add URLParser stub

Modified: trunk/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py (204381 => 204382)


--- trunk/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py	2016-08-11 19:22:26 UTC (rev 204381)
+++ trunk/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py	2016-08-11 19:45:13 UTC (rev 204382)
@@ -72,8 +72,6 @@
         return self._test_patch()
 
     def run(self):
-        if not self.validate():
-            raise PatchIsNotValid(self._patch, self.error)
         if not self._clean():
             return False
         if not self._update():
@@ -89,10 +87,6 @@
                 return self.report_failure()
             if not self._did_pass_tests_recently():
                 return False
-        # Make sure the patch is still valid before landing (e.g., make sure
-        # no one has set commit-queue- since we started working on the patch.)
-        if not self.validate():
-            raise PatchIsNotValid(self._patch, self.error)
         # FIXME: We should understand why the land failure occurred and retry if possible.
         if not self._land():
             return self.report_failure()

Modified: trunk/Tools/Scripts/webkitpy/tool/bot/earlywarningsystemtask.py (204381 => 204382)


--- trunk/Tools/Scripts/webkitpy/tool/bot/earlywarningsystemtask.py	2016-08-11 19:22:26 UTC (rev 204381)
+++ trunk/Tools/Scripts/webkitpy/tool/bot/earlywarningsystemtask.py	2016-08-11 19:45:13 UTC (rev 204382)
@@ -52,8 +52,6 @@
         return True
 
     def run(self):
-        if not self.validate():
-            raise PatchIsNotValid(self._patch, self.error)
         if not self._clean():
             return False
         if not self._update():

Modified: trunk/Tools/Scripts/webkitpy/tool/bot/patchanalysistask.py (204381 => 204382)


--- trunk/Tools/Scripts/webkitpy/tool/bot/patchanalysistask.py	2016-08-11 19:22:26 UTC (rev 204381)
+++ trunk/Tools/Scripts/webkitpy/tool/bot/patchanalysistask.py	2016-08-11 19:45:13 UTC (rev 204382)
@@ -83,8 +83,11 @@
         self._script_error = None
         self._results_archive_from_patch_test_run = None
         self._results_from_patch_test_run = None
+        self.error = None
 
     def _run_command(self, command, success_message, failure_message):
+        if not self.validate():
+            raise PatchIsNotValid(self._patch, self.error)
         try:
             self._delegate.run_command(command)
             self._delegate.command_passed(success_message, patch=self._patch)

Modified: trunk/Tools/Scripts/webkitpy/tool/bot/stylequeuetask.py (204381 => 204382)


--- trunk/Tools/Scripts/webkitpy/tool/bot/stylequeuetask.py	2016-08-11 19:22:26 UTC (rev 204381)
+++ trunk/Tools/Scripts/webkitpy/tool/bot/stylequeuetask.py	2016-08-11 19:45:13 UTC (rev 204382)
@@ -66,8 +66,6 @@
         "Unabled to apply watchlist")
 
     def run(self):
-        if not self.validate():
-            raise PatchIsNotValid(self._patch, self.error)
         if not self._clean():
             return False
         if not self._update():

Modified: trunk/Tools/Scripts/webkitpy/tool/commands/perfalizer.py (204381 => 204382)


--- trunk/Tools/Scripts/webkitpy/tool/commands/perfalizer.py	2016-08-11 19:22:26 UTC (rev 204381)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/perfalizer.py	2016-08-11 19:45:13 UTC (rev 204382)
@@ -62,6 +62,9 @@
         except:
             return False
 
+    def validate(self):
+        return True
+
     def run(self):
         if not self._patch.committer() and not self._patch.attacher().can_commit:
             self._logger('The patch %d is not authorized by a commmitter' % self._patch.id())

Modified: trunk/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py (204381 => 204382)


--- trunk/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py	2016-08-11 19:22:26 UTC (rev 204381)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py	2016-08-11 19:45:13 UTC (rev 204382)
@@ -411,16 +411,6 @@
         queue._options.port = None
         expected_logs = """Running: webkit-patch --status-host=example.com clean --port=mac
 MOCK: update_status: commit-queue Cleaned working directory
-Running: webkit-patch --status-host=example.com update --port=mac
-MOCK: update_status: commit-queue Updated working directory
-Running: webkit-patch --status-host=example.com apply-attachment --no-update --non-interactive 10000 --port=mac
-MOCK: update_status: commit-queue Applied patch
-Running: webkit-patch --status-host=example.com validate-changelog --check-oops --non-interactive 10000 --port=mac
-MOCK: update_status: commit-queue ChangeLog validated
-Running: webkit-patch --status-host=example.com build --no-clean --no-update --build-style=release --port=mac
-MOCK: update_status: commit-queue Built patch
-Running: webkit-patch --status-host=example.com build-and-test --no-clean --no-update --test --non-interactive --build-style=release --port=mac
-MOCK: update_status: commit-queue Passed tests
 MOCK: update_status: commit-queue Error: commit-queue did not process patch. Reason: Patch is obsolete.
 MOCK: release_work_item: commit-queue 10000
 """
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to