Bug 229961 - Gracefully handle security bugs in apply-watchlist
Summary: Gracefully handle security bugs in apply-watchlist
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Aakash Jain
Keywords: InRadar
Depends on:
Reported: 2021-09-06 07:06 PDT by Aakash Jain
Modified: 2021-09-24 15:11 PDT (History)
7 users (show)

See Also:

Patch (1.93 KB, patch)
2021-09-21 16:09 PDT, Aakash Jain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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
Comment 2 Aakash Jain 2021-09-21 16:09:56 PDT
Created attachment 438878 [details]
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].