Changeset 203830 in webkit
- Timestamp:
- Jul 28, 2016 1:12:31 PM (8 years ago)
- Location:
- trunk/Tools
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r203811 r203830 1 2016-07-28 Aakash Jain <aakash_jain@apple.com> 2 3 EWS error message "Error: * did not process patch" should include explanation 4 https://bugs.webkit.org/show_bug.cgi?id=159903 5 <rdar://problem/27410788> 6 7 Reviewed by Alexey Proskuryakov. 8 9 * QueueStatusServer/handlers/statusbubble.py: 10 (StatusBubble._build_bubble): Display more detailed error message on bubbles when patch 11 is not processed. 12 * QueueStatusServer/handlers/processingtimesjson.py: 13 (ProcessingTimesJSON._resultFromFinalStatus): Updated error message to match with rest 14 of the code. 15 * Scripts/webkitpy/tool/bot/commitqueuetask.py: 16 (CommitQueueTask.validate): Add more information about validation failure. 17 (CommitQueueTask.run): Pass the error details in the PatchIsNotValid exception. 18 * Scripts/webkitpy/tool/bot/earlywarningsystemtask.py: 19 (EarlyWarningSystemTask.validate): Add more information about validation failure. 20 (EarlyWarningSystemTask.run): Pass the error details in the PatchIsNotValid exception. 21 * Scripts/webkitpy/tool/bot/patchanalysistask.py: 22 (PatchIsNotValid.__init__): Add the failure_message argument. 23 * Scripts/webkitpy/tool/commands/earlywarningsystem.py: 24 (AbstractEarlyWarningSystem.review_patch): Re-word the error message and include 25 failure details. 26 * Scripts/webkitpy/tool/commands/queues.py: 27 (CommitQueue.process_work_item): Same. 28 (StyleQueue.review_patch): Same. 29 * Scripts/webkitpy/tool/commands/queues_unittest.py: 30 (test_non_valid_patch): Updated test-cases messages to match the above changes. 31 1 32 2016-07-27 Alexey Proskuryakov <ap@apple.com> 2 33 -
trunk/Tools/QueueStatusServer/handlers/processingtimesjson.py
r174622 r203830 41 41 elif status_message == "Fail": 42 42 return "fail" 43 elif status_message == "Error: " + queue_name + " did not process patch.":43 elif "did not process patch" in status_message: 44 44 return "not processed" 45 45 elif status_message == "Error: " + queue_name + " unable to apply patch.": -
trunk/Tools/QueueStatusServer/handlers/statusbubble.py
r174343 r203830 141 141 message_to_display = statuses[1].message if len(statuses) > 1 else statuses[0].message 142 142 bubble["details_message"] = message_to_display + "\n\n" + self._iso_time(statuses[0].date) 143 elif statuses[0].message == "Error: " + queue.name() + " did not process patch.":143 elif "did not process patch" in statuses[0].message: 144 144 bubble["state"] = "none" 145 145 bubble["details_message"] = "The patch is no longer eligible for processing." 146 147 if "Bug is already closed" in statuses[0].message: 148 bubble["details_message"] += " Bug was already closed when EWS attempted to process it." 149 elif "Patch is marked r-" in statuses[0].message: 150 bubble["details_message"] += " Patch was already marked r- when EWS attempted to process it." 151 elif "Patch is obsolete" in statuses[0].message: 152 bubble["details_message"] += " Patch was obsolete when EWS attempted to process it." 153 elif "No patch committer found" in statuses[0].message: 154 bubble["details_message"] += " Patch was not authorized by a commmitter." 155 146 156 if len(statuses) > 1: 147 157 if len(statuses) == 2: 148 bubble["details_message"] += " 158 bubble["details_message"] += "\nOne message was logged while the patch was still eligible:\n\n" 149 159 else: 150 bubble["details_message"] += " 160 bubble["details_message"] += "\nSome messages were logged while the patch was still eligible:\n\n" 151 161 bubble["details_message"] += "\n".join([status.message for status in statuses[1:]]) + "\n\n" + self._iso_time(statuses[0].date) 152 162 elif statuses[0].message == "Error: " + queue.name() + " unable to apply patch.": -
trunk/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py
r174408 r203830 44 44 self._patch = self._delegate.refetch_patch(self._patch) 45 45 if self._patch.is_obsolete(): 46 self.error = "Patch is obsolete." 46 47 return False 47 48 if self._patch.bug().is_closed(): 49 self.error = "Bug is already closed." 48 50 return False 49 51 if not self._patch.committer(): 52 self.error = "No patch committer found." 50 53 return False 51 54 if self._patch.review() == "-": 55 self.error = "Patch is marked r-." 52 56 return False 53 57 return True … … 70 74 def run(self): 71 75 if not self.validate(): 72 raise PatchIsNotValid(self._patch )76 raise PatchIsNotValid(self._patch, self.error) 73 77 if not self._clean(): 74 78 return False … … 89 93 # no one has set commit-queue- since we started working on the patch.) 90 94 if not self.validate(): 91 raise PatchIsNotValid(self._patch )95 raise PatchIsNotValid(self._patch, self.error) 92 96 # FIXME: We should understand why the land failure occurred and retry if possible. 93 97 if not self._land(): -
trunk/Tools/Scripts/webkitpy/tool/bot/earlywarningsystemtask.py
r174408 r203830 42 42 self._patch = self._delegate.refetch_patch(self._patch) 43 43 if self._patch.is_obsolete(): 44 self.error = "Patch is obsolete." 44 45 return False 45 46 if self._patch.bug().is_closed(): 47 self.error = "Bug is already closed." 46 48 return False 47 49 if self._patch.review() == "-": 50 self.error = "Patch is marked r-." 48 51 return False 49 52 return True … … 51 54 def run(self): 52 55 if not self.validate(): 53 raise PatchIsNotValid(self._patch )56 raise PatchIsNotValid(self._patch, self.error) 54 57 if not self._clean(): 55 58 return False -
trunk/Tools/Scripts/webkitpy/tool/bot/patchanalysistask.py
r191036 r203830 38 38 39 39 class PatchIsNotValid(Exception): 40 def __init__(self, patch ):40 def __init__(self, patch, failure_message): 41 41 Exception.__init__(self) 42 42 self.patch = patch 43 self.failure_message = failure_message 43 44 44 45 -
trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py
r190924 r203830 88 88 self._unlock_patch(patch) 89 89 return succeeded 90 except PatchIsNotValid :91 self._did_error(patch, "%s did not process patch. " % self.name)90 except PatchIsNotValid as error: 91 self._did_error(patch, "%s did not process patch. Reason: %s" % (self.name, error.failure_message)) 92 92 return False 93 93 except UnableToApplyPatch, e: -
trunk/Tools/Scripts/webkitpy/tool/commands/queues.py
r203386 r203830 346 346 self._unlock_patch(patch) 347 347 return False 348 except PatchIsNotValid :349 self._did_error(patch, "%s did not process patch. " % self.name)348 except PatchIsNotValid as error: 349 self._did_error(patch, "%s did not process patch. Reason: %s" % (self.name, error.failure_message)) 350 350 return False 351 351 except ScriptError, e: … … 486 486 self._did_error(patch, "%s unable to apply patch." % self.name) 487 487 return False 488 except PatchIsNotValid :489 self._did_error(patch, "%s did not process patch. " % self.name)488 except PatchIsNotValid as error: 489 self._did_error(patch, "%s did not process patch. Reason: %s" % (self.name, error.failure_message)) 490 490 return False 491 491 except ScriptError, e: -
trunk/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py
r203386 r203830 390 390 expected_logs = { 391 391 "begin_work_queue": self._default_begin_work_queue_logs("commit-queue"), 392 "process_work_item": """MOCK: update_status: commit-queue Error: commit-queue did not process patch. 392 "process_work_item": """MOCK: update_status: commit-queue Error: commit-queue did not process patch. Reason: Bug is already closed. 393 393 MOCK: release_work_item: commit-queue 10007 394 394 """, … … 432 432 Running: webkit-patch --status-host=example.com build-and-test --no-clean --no-update --test --non-interactive --build-style=release --port=mac 433 433 MOCK: update_status: commit-queue Passed tests 434 MOCK: update_status: commit-queue Error: commit-queue did not process patch. 434 MOCK: update_status: commit-queue Error: commit-queue did not process patch. Reason: Patch is obsolete. 435 435 MOCK: release_work_item: commit-queue 10000 436 436 """
Note: See TracChangeset
for help on using the changeset viewer.