Bug 187195 - teach bisect-builds to fetch supported platforms from the rest api
Summary: teach bisect-builds to fetch supported platforms from the rest api
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Safari 11
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Lucas Forschler
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-06-29 14:43 PDT by Lucas Forschler
Modified: 2018-06-29 15:52 PDT (History)
3 users (show)

See Also:


Attachments
patch for review (5.47 KB, patch)
2018-06-29 15:19 PDT, Lucas Forschler
aakash_jain: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.