Bug 180303

Summary: Add docstring in EarlyWarningSystemTask to explain return values
Product: WebKit Reporter: Aakash Jain <aakash_jain>
Component: Tools / TestsAssignee: Aakash Jain <aakash_jain>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, ap, dbates, dean_johnson, ews-watchlist, glenn, jbedard, lforschler, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Proposed patch dbates: review+

Aakash Jain
Reported 2017-12-01 18:20:48 PST
EarlyWarningSystemTask run() method has return value which are slightly non-intuitive. False does not indicate that patch failed EWS, it indicates that EWS is not sure. Patch failure is indicated by an exception. We should document these values in order to avoid confusion. Having this comment could have prevented https://bugs.webkit.org/show_bug.cgi?id=180302
Attachments
Proposed patch (1.34 KB, patch)
2017-12-01 18:23 PST, Aakash Jain
dbates: review+
Aakash Jain
Comment 1 2017-12-01 18:23:59 PST
Created attachment 328202 [details] Proposed patch
Daniel Bates
Comment 2 2017-12-01 21:52:46 PST
Comment on attachment 328202 [details] Proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=328202&action=review > Tools/Scripts/webkitpy/tool/bot/earlywarningsystemtask.py:61 > + """ Could named constants help make this clearer And let us simplify this comment to just explain that an exception indicates patch failure (e.g. RETRY = False, PASS => True)? If you have your heart set on this comment then “would be” => “will be”. Also does the formatting of this docstring match the formatting of other docstrings that explain return values and/or exceptions?
Aakash Jain
Comment 3 2017-12-04 16:05:05 PST
Radar WebKit Bug Importer
Comment 4 2017-12-04 16:06:40 PST
Note You need to log in before you can comment on or make changes to this bug.