WebKit Bugzilla
Attachment 343767 Details for
Bug 187120
: style-queue "AttributeError: 'NoneType' object has no attribute 'is_obsolete'" when processing security patch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-187120-20180627163225.patch (text/plain), 5.94 KB, created by
Daniel Bates
on 2018-06-27 16:32:25 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Daniel Bates
Created:
2018-06-27 16:32:25 PDT
Size:
5.94 KB
patch
obsolete
>Subversion Revision: 233262 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index a2e36865e16e29b43032c35b95e7dbcea2e0bc41..b399b9a02113569e35aed8a23831af1ba1791c14 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,23 @@ >+2018-06-27 Daniel Bates <dabates@apple.com> >+ >+ style-queue "AttributeError: 'NoneType' object has no attribute 'is_obsolete'" when processing security patch >+ https://bugs.webkit.org/show_bug.cgi?id=187120 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Teach the style queue how to refetch a patch from the status server as we did for non-Style >+ EWS queues. >+ >+ * Scripts/webkitpy/tool/bot/stylequeuetask.py: >+ (StyleQueueTask.validate): Similar to change made to EarlyWarningSystemTask.validate() in r233107, >+ only check if the bug associated with the patch we are processing is closed if the attachment has a >+ non-None Bug object. >+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py: >+ (AbstractEarlyWarningSystem.refetch_patch): Extract logic to refetch a patch from here... >+ * Scripts/webkitpy/tool/commands/queues.py: >+ (PatchProcessingQueue._refetch_patch): ... to here. >+ (StyleQueue.refetch_patch): Turn around and call PatchProcessingQueue._refetch_patch(). >+ > 2018-06-27 Daniel Bates <dabates@apple.com> > > webkit-patch should ignore non-ASCII characters in the status server API key >diff --git a/Tools/Scripts/webkitpy/tool/bot/stylequeuetask.py b/Tools/Scripts/webkitpy/tool/bot/stylequeuetask.py >index 85ede072d6485a30d4525c1123fa06de951ef088..16cb69f7bedbfd4d5300d2401f6fa7d493319aca 100644 >--- a/Tools/Scripts/webkitpy/tool/bot/stylequeuetask.py >+++ b/Tools/Scripts/webkitpy/tool/bot/stylequeuetask.py >@@ -36,11 +36,15 @@ class StyleQueueTaskDelegate(PatchAnalysisTaskDelegate): > > class StyleQueueTask(PatchAnalysisTask): > def validate(self): >+ # FIXME: Need a way to ask the status server for latest status of a security bug. >+ # Attachments downloaded from the status server do not have an associated bug and >+ # reflect the Bugzilla state at the time they were uploaded to the status server. >+ # See <https://bugs.webkit.org/show_bug.cgi?id=186817>. > 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(): >+ if self._patch.bug() and self._patch.bug().is_closed(): > self.error = "Bug is already closed." > return False > if self._patch.review() == "-": >diff --git a/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py b/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py >index 74ffe8e81cc1fc069aa032b90f0711aad1c4858f..6bb6be20dcff51e027fc5839f674d150f187da9b 100644 >--- a/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py >+++ b/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py >@@ -34,7 +34,6 @@ from optparse import make_option > > from webkitpy.common.config.committers import CommitterList > from webkitpy.common.config.ports import DeprecatedPort >-from webkitpy.common.net.bugzilla import Bugzilla > from webkitpy.common.system.filesystem import FileSystem > from webkitpy.common.system.executive import ScriptError > from webkitpy.tool.bot.earlywarningsystemtask import EarlyWarningSystemTask, EarlyWarningSystemTaskDelegate >@@ -153,16 +152,7 @@ class AbstractEarlyWarningSystem(AbstractReviewQueue, EarlyWarningSystemTaskDele > return self._group > > def refetch_patch(self, patch): >- patch_id = patch.id() >- try: >- patch = self._tool.bugs.fetch_attachment(patch_id, throw_on_access_error=True) >- except Bugzilla.AccessError as e: >- # FIXME: Need a way to ask the status server to fetch the patch again. For now >- # we return the attachment as it was when it was originally uploaded to the >- # status server. See <https://bugs.webkit.org/show_bug.cgi?id=186817>. >- if e.error_code == Bugzilla.AccessError.NOT_PERMITTED: >- patch = self._tool.status_server.fetch_attachment(patch_id) >- return patch >+ return super(AbstractEarlyWarningSystem, self)._refetch_patch(patch) > > def report_flaky_tests(self, patch, flaky_test_results, results_archive): > pass >diff --git a/Tools/Scripts/webkitpy/tool/commands/queues.py b/Tools/Scripts/webkitpy/tool/commands/queues.py >index 2b33f980e9c60f0cd8063d4fcfb459a4dea56a3f..7fd24306c533f8a6239ef2411a115c33ceab7040 100644 >--- a/Tools/Scripts/webkitpy/tool/commands/queues.py >+++ b/Tools/Scripts/webkitpy/tool/commands/queues.py >@@ -328,6 +328,18 @@ class PatchProcessingQueue(AbstractPatchQueue): > if self._can_access_bug(patch.bug_id()): > self._tool.bugs.add_attachment_to_bug(patch.bug_id(), results_archive_file, description, filename="layout-test-results.zip", comment_text=comment_text) > >+ def _refetch_patch(self, patch): >+ patch_id = patch.id() >+ try: >+ patch = self._tool.bugs.fetch_attachment(patch_id, throw_on_access_error=True) >+ except Bugzilla.AccessError as e: >+ # FIXME: Need a way to ask the status server to fetch the patch again. For now >+ # we return the attachment as it was when it was originally uploaded to the >+ # status server. See <https://bugs.webkit.org/show_bug.cgi?id=186817>. >+ if e.error_code == Bugzilla.AccessError.NOT_PERMITTED: >+ patch = self._tool.status_server.fetch_attachment(patch_id) >+ return patch >+ > > class CommitQueue(PatchProcessingQueue, StepSequenceErrorHandler, CommitQueueTaskDelegate): > def __init__(self, commit_queue_task_class=CommitQueueTask): >@@ -523,4 +535,4 @@ class StyleQueue(AbstractReviewQueue, StyleQueueTaskDelegate): > return None > > def refetch_patch(self, patch): >- return self._tool.bugs.fetch_attachment(patch.id()) >+ return super(StyleQueue, self)._refetch_patch(patch)
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:
ddkilzer
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 187120
: 343767