Bug 187195

Summary: teach bisect-builds to fetch supported platforms from the rest api
Product: WebKit Reporter: Lucas Forschler <lforschler>
Component: Tools / TestsAssignee: Lucas Forschler <lforschler>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, lforschler, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 11   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch for review aakash_jain: review+

Description Lucas Forschler 2018-06-29 14:43:28 PDT
We now have an api endpoint to get a list of available builds.
teach bisect-builds to use it.
Comment 1 Radar WebKit Bug Importer 2018-06-29 14:49:37 PDT
<rdar://problem/41653798>
Comment 2 Lucas Forschler 2018-06-29 15:19:17 PDT
Created attachment 343951 [details]
patch for review
Comment 3 Aakash Jain 2018-06-29 15:39:35 PDT
Comment on attachment 343951 [details]
patch for review

View in context: https://bugs.webkit.org/attachment.cgi?id=343951&action=review

> Tools/Scripts/bisect-builds:202
> +    r = urllib2.urlopen(platform_url)

You can consider making a separate method to fetching data from url, e.g.: fetch_data_from_url(url). That method can be used in fetch_revision_list() as well.
But that can be done later on in a separate patch as well.

> Tools/Scripts/bisect-builds:206
> +    for platform in data['Items']:

Is data guaranteed to have 'Items' key. what if data is empty? Do we want to crash here?

You might consider using data.get('Items')
Comment 4 Lucas Forschler 2018-06-29 15:52:13 PDT
Committed revision 233373.