Bug 229961

Summary: Gracefully handle security bugs in apply-watchlist
Product: WebKit Reporter: Aakash Jain <aakash_jain>
Component: Tools / TestsAssignee: Aakash Jain <aakash_jain>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, ap, ews-watchlist, glenn, jbedard, ryanhaddad, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Aakash Jain 2021-09-06 07:06:01 PDT
Currently security bugs fails in apply-watchlist ews with a misleading exception which doesn't really indicate the reason for failure. e.g.: https://ews-build.webkit.org/#/builders/21/builds/52652/steps/9/logs/stdio

  File "/Volumes/Data/worker/Apply-WatchList-EWS/build/Tools/Scripts/webkitpy/tool/commands/stepsequence.py", line 67, in _run
    step(tool, options).run(state)
  File "/Volumes/Data/worker/Apply-WatchList-EWS/build/Tools/Scripts/webkitpy/tool/steps/applywatchlist.py", line 53, in run
    bug = self._tool.bugs.fetch_bug(bug_id)
  File "/Volumes/Data/worker/Apply-WatchList-EWS/build/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 493, in fetch_bug
    return Bug(self.fetch_bug_dictionary(bug_id), self)
  File "/Volumes/Data/worker/Apply-WatchList-EWS/build/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 486, in fetch_bug_dictionary
    return self._parse_bug_dictionary_from_xml(self._fetch_bug_page(bug_id))
  File "/Volumes/Data/worker/Apply-WatchList-EWS/build/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 462, in _parse_bug_dictionary_from_xml
    bug["title"] = self._string_contents(soup.find("short_desc"))
  File "/Volumes/Data/worker/Apply-WatchList-EWS/build/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 402, in _string_contents
    return unicode(soup.string)
AttributeError: 'NoneType' object has no attribute 'string'


The real reason is that the bots which run the webkitpy command to apply watchlist do not have access to security bugs. We should gracefully handle this case and improve the error message to clearly indicate what's happening.
Comment 1 Radar WebKit Bug Importer 2021-09-13 07:06:27 PDT
<rdar://problem/83053278>
Comment 2 Aakash Jain 2021-09-21 16:09:56 PDT
Created attachment 438878 [details]
Patch
Comment 3 EWS 2021-09-24 15:11:48 PDT
Committed r283061 (242119@main): <https://commits.webkit.org/242119@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 438878 [details].