WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
212906
[webkitpy] Check 'bug-search' returns a non null result before parsing
https://bugs.webkit.org/show_bug.cgi?id=212906
Summary
[webkitpy] Check 'bug-search' returns a non null result before parsing
Diego Pino
Reported
2020-06-08 09:28:58 PDT
[webkitpy] Check 'bug-search' returns a non null result before parsing
Attachments
Patch
(2.01 KB, patch)
2020-06-08 09:33 PDT
,
Diego Pino
no flags
Details
Formatted Diff
Diff
Patch
(2.97 KB, patch)
2020-06-08 09:57 PDT
,
Diego Pino
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Diego Pino
Comment 1
2020-06-08 09:33:17 PDT
Created
attachment 401345
[details]
Patch
Diego Pino
Comment 2
2020-06-08 09:41:13 PDT
For instance, the following query in master returns the following stacktrace: ``` $ Tools/Scripts/webkit-patch bug-search
creator=dpino@igalia.com
Logging in as
dpino@igalia.com
... Traceback (most recent call last): File "Tools/Scripts/webkit-patch", line 80, in <module> main() File "Tools/Scripts/webkit-patch", line 75, in main WebKitPatch(os.path.abspath(__file__)).main() File "/home/dpino/workspace/webkit/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 305, in main result = command.check_arguments_and_execute(options, args, self) File "/home/dpino/workspace/webkit/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 123, in check_arguments_and_execute return self.execute(options, args, tool) or 0 File "/home/dpino/workspace/webkit/Tools/Scripts/webkitpy/tool/commands/bugsearch.py", line 45, in execute bugs = tool.bugs.queries.fetch_bugs_matching_quicksearch(search_string) File "/home/dpino/workspace/webkit/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 238, in fetch_bugs_matching_quicksearch return self._fetch_bugs_from_advanced_query(quicksearch_url) File "/home/dpino/workspace/webkit/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 169, in _fetch_bugs_from_advanced_query if not self._parse_result_count(results_page): File "/home/dpino/workspace/webkit/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 143, in _parse_result_count result_count_text = BeautifulSoup(results_page).find(attrs={'class': 'bz_result_count'}).string AttributeError: 'NoneType' object has no attribute 'string' ``` The syntax of query is not valid (the 'creator' field doesn't exist). The same query with the patch applied returns: ``` $ Tools/Scripts/webkit-patch bug-search
creator=dpino@igalia.com
Logging in as
dpino@igalia.com
... BeautifulSoup returned None while finding class: bz_result_count in: <response_seek_wrapper at 0x7f5b712bda50 whose wrapped object = <closeable_response at 0x7f5b712df0f0 whose fp = <socket._fileobject object at 0x7f5b712dc1d0>>> Failed to find bugs for
https://bugs.webkit.org/buglist.cgi?quicksearch=creator%3Ddpino%40igalia.com&list_id=5962028
No bugs found matching '
creator=dpino@igalia.com
' ``` The correct query would be: ``` $ Tools/Scripts/webkit-patch bug-search
reporter=dpino@igalia.com
``` A valid query that returns no results would be: ``` Tools/Scripts/webkit-patch bug-search
reporter=xyz@igalia.com
Logging in as
dpino@igalia.com
... BeautifulSoup returned None while finding class: bz_result_count in: <response_seek_wrapper at 0x7fb3dcaad9b0 whose wrapped object = <closeable_response at 0x7fb3dcab7050 whose fp = <socket._fileobject object at 0x7fb3dcab32d0>>> Failed to find bugs for
https://bugs.webkit.org/buglist.cgi?quicksearch=reporter%3Dxyz%40igalia.com&list_id=5962045
No bugs found matching '
reporter=xyz@igalia.com
' ```
Diego Pino
Comment 3
2020-06-08 09:57:42 PDT
Created
attachment 401349
[details]
Patch
EWS
Comment 4
2020-06-08 22:37:24 PDT
Committed
r262775
: <
https://trac.webkit.org/changeset/262775
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 401349
[details]
.
Radar WebKit Bug Importer
Comment 5
2020-06-08 22:38:15 PDT
<
rdar://problem/64150351
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug