WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-213297-20200617112848.patch (text/plain), 9.40 KB, created by
Aakash Jain
on 2020-06-17 08:28:49 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Aakash Jain
Created:
2020-06-17 08:28:49 PDT
Size:
9.40 KB
patch
obsolete
>Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 263147) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,21 @@ >+2020-06-17 Aakash Jain <aakash_jain@apple.com> >+ >+ Delete code for old ews style queue >+ https://bugs.webkit.org/show_bug.cgi?id=213297 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Scripts/webkitpy/tool/bot/stylequeuetask.py: Removed. >+ * Scripts/webkitpy/tool/commands/queues.py: >+ (StyleQueue): Deleted. >+ (StyleQueue.__init__): Deleted. >+ (StyleQueue.review_patch): Deleted. >+ (StyleQueue.run_command): Deleted. >+ (StyleQueue.expected_failures): Deleted. >+ (StyleQueue.refetch_patch): Deleted. >+ * Scripts/webkitpy/tool/commands/queues_unittest.py: >+ (TestReviewQueue): Deleted. >+ > 2020-06-17 Aakash Jain <aakash_jain@apple.com> > > Delete old ews client side code - part 2 >Index: Tools/Scripts/webkitpy/tool/bot/stylequeuetask.py >=================================================================== >--- Tools/Scripts/webkitpy/tool/bot/stylequeuetask.py (revision 263147) >+++ Tools/Scripts/webkitpy/tool/bot/stylequeuetask.py (nonexistent) >@@ -1,78 +0,0 @@ >-# Copyright (c) 2012 Google Inc. All rights reserved. >-# >-# Redistribution and use in source and binary forms, with or without >-# modification, are permitted provided that the following conditions are >-# met: >-# >-# * Redistributions of source code must retain the above copyright >-# notice, this list of conditions and the following disclaimer. >-# * Redistributions in binary form must reproduce the above >-# copyright notice, this list of conditions and the following disclaimer >-# in the documentation and/or other materials provided with the >-# distribution. >-# * Neither the name of Google Inc. nor the names of its >-# contributors may be used to endorse or promote products derived from >-# this software without specific prior written permission. >-# >-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >- >-from webkitpy.tool.bot.patchanalysistask import PatchAnalysisTask, PatchAnalysisTaskDelegate, UnableToApplyPatch, PatchIsNotValid >- >- >-class StyleQueueTaskDelegate(PatchAnalysisTaskDelegate): >- def parent_command(self): >- return "style-queue" >- >- >-class StyleQueueTask(PatchAnalysisTask): >- def validate(self): >- self._patch = self._delegate.refetch_patch(self._patch) >- if self._patch.is_obsolete(): >- self.error = "Patch is obsolete." >- return False >- if self._patch.bug().is_closed(): >- self.error = "Bug is already closed." >- return False >- if self._patch.review() == "-": >- self.error = "Patch is marked r-." >- return False >- return True >- >- def _check_style(self): >- return self._run_command([ >- "check-style-local", >- "--non-interactive", >- "--quiet", >- ], >- "Style checked", >- "Patch did not pass style check") >- >- def _apply_watch_list(self): >- return self._run_command([ >- "apply-watchlist-local", >- self._patch.bug_id(), >- ], >- "Watchlist applied", >- "Unabled to apply watchlist") >- >- def run(self): >- if not self._clean(): >- return False >- if not self._update(): >- return False >- if not self._apply(): >- raise UnableToApplyPatch(self._patch) >- self._apply_watch_list() >- if not self._check_style(): >- return self.report_failure() >- return True >Index: Tools/Scripts/webkitpy/tool/commands/queues.py >=================================================================== >--- Tools/Scripts/webkitpy/tool/commands/queues.py (revision 263147) >+++ Tools/Scripts/webkitpy/tool/commands/queues.py (working copy) >@@ -46,7 +46,6 @@ from webkitpy.tool.bot.flakytestreporter > from webkitpy.tool.bot.layouttestresultsreader import LayoutTestResultsReader > from webkitpy.tool.bot.patchanalysistask import UnableToApplyPatch, PatchIsNotValid > from webkitpy.tool.bot.queueengine import QueueEngine, QueueEngineDelegate >-from webkitpy.tool.bot.stylequeuetask import StyleQueueTask, StyleQueueTaskDelegate > from webkitpy.tool.commands.stepsequence import StepSequenceErrorHandler > from webkitpy.tool.multicommandtool import Command, TryAgain > >@@ -243,37 +242,3 @@ class AbstractReviewQueue(PatchProcessin > @classmethod > def handle_script_error(cls, tool, state, script_error): > _log.error(script_error.output) >- >- >-class StyleQueue(AbstractReviewQueue, StyleQueueTaskDelegate): >- name = "style-queue" >- >- def __init__(self): >- AbstractReviewQueue.__init__(self) >- >- def review_patch(self, patch): >- task = StyleQueueTask(self, patch) >- try: >- style_check_succeeded = task.run() >- return style_check_succeeded >- except UnableToApplyPatch as e: >- return False >- except PatchIsNotValid as error: >- return False >- except ScriptError as e: >- output = re.sub(r'Failed to run .+ exit_code: 1', '', e.output) >- message = "Attachment %s did not pass %s:\n\n%s\n\nIf any of these errors are false positives, please file a bug against check-webkit-style." % (patch.id(), self.name, output) >- self._tool.bugs.post_comment_to_bug(patch.bug_id(), message, cc=self.watchers) >- return False >- return True >- >- # StyleQueueTaskDelegate methods >- >- def run_command(self, command): >- self.run_webkit_patch(command) >- >- def expected_failures(self): >- return None >- >- def refetch_patch(self, patch): >- return self._tool.bugs.fetch_attachment(patch.id()) >Index: Tools/Scripts/webkitpy/tool/commands/queues_unittest.py >=================================================================== >--- Tools/Scripts/webkitpy/tool/commands/queues_unittest.py (revision 263147) >+++ Tools/Scripts/webkitpy/tool/commands/queues_unittest.py (working copy) >@@ -49,10 +49,6 @@ class TestQueue(AbstractPatchQueue): > name = "test-queue" > > >-class TestReviewQueue(AbstractReviewQueue): >- name = "test-review-queue" >- >- > class AbstractQueueTest(CommandsTest): > def test_log_directory(self): > self.assertEqual(TestQueue()._log_directory(), os.path.join("..", "test-queue-logs")) >@@ -112,52 +108,3 @@ Port: mac-highsierra Platform: MockPlat > -- End comment -- > """ > OutputCapture().assert_outputs(self, queue._upload_results_archive_for_patch, [patch, Mock()], expected_logs=expected_logs) >- >- >-class NeedsUpdateSequence(StepSequence): >- def _run(self, tool, options, state): >- raise CheckoutNeedsUpdate([], 1, "", None) >- >- >-class StyleQueueTest(QueuesTest): >- def test_style_queue_with_style_exception(self): >- expected_logs = { >- "begin_work_queue": self._default_begin_work_queue_logs("style-queue"), >- "process_work_item": """Running: webkit-patch clean >-Running: webkit-patch update >-Running: webkit-patch apply-attachment --no-update --non-interactive 10000 >-Running: webkit-patch apply-watchlist-local 50000 >-Running: webkit-patch check-style-local --non-interactive --quiet >-""", >- "handle_unexpected_error": "Mock error message\n", >- "handle_script_error": "MOCK output\n", >- } >- tool = MockTool(executive_throws_when_run=set(['check-style'])) >- self.assert_queue_outputs(StyleQueue(), expected_logs=expected_logs, tool=tool) >- >- def test_style_queue_with_watch_list_exception(self): >- expected_logs = { >- "begin_work_queue": self._default_begin_work_queue_logs("style-queue"), >- "process_work_item": """Running: webkit-patch clean >-Running: webkit-patch update >-Running: webkit-patch apply-attachment --no-update --non-interactive 10000 >-Running: webkit-patch apply-watchlist-local 50000 >-Exception for ['echo', 'apply-watchlist-local', 50000] >- >-MOCK command output >-Running: webkit-patch check-style-local --non-interactive --quiet >-""", >- "handle_unexpected_error": "Mock error message\n", >- "handle_script_error": "MOCK output\n", >- } >- tool = MockTool(executive_throws_when_run=set(['apply-watchlist-local'])) >- self.assert_queue_outputs(StyleQueue(), expected_logs=expected_logs, tool=tool) >- >- def test_non_valid_patch(self): >- tool = MockTool() >- patch = tool.bugs.fetch_attachment(10007) # _patch8, resolved bug, without review flag, not marked obsolete (maybe already landed) >- expected_logs = { >- "begin_work_queue": self._default_begin_work_queue_logs("style-queue"), >- "process_work_item": "", >- } >- self.assert_queue_outputs(StyleQueue(), tool=tool, work_item=patch, expected_logs=expected_logs)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
ap
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 213297
: 402109