Bug 218059

Summary: [webkitpy] Use webkitcorepy's autoinstaller for chrome and gecko drivers
Product: WebKit Reporter: Jonathan Bedard <jbedard>
Component: Tools / TestsAssignee: Jonathan Bedard <jbedard>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, dewei_zhu, ews-watchlist, glenn, slewis, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=214950
Attachments:
Description Flags
Patch
none
Patch
none
Patch for landing none

Description Jonathan Bedard 2020-10-21 16:45:13 PDT
Chrome and Gecko distribute their drivers through some non-standard channels. All our autoinstaller code still works, we just aren't getting the archives from PyPi.
Comment 1 Radar WebKit Bug Importer 2020-10-21 16:45:27 PDT
<rdar://problem/70551255>
Comment 2 Jonathan Bedard 2020-10-21 17:09:24 PDT
Created attachment 412050 [details]
Patch
Comment 3 Jonathan Bedard 2020-10-22 09:26:12 PDT
Created attachment 412108 [details]
Patch
Comment 4 Jonathan Bedard 2020-10-22 10:07:30 PDT
Both of these patches work, I'm just not sure which approach I like better. One is more clear that web drivers are not actually pip packages, at the cost of making accessing the web drivers less portable, while the other pretends that web drivers are pip packages in exchange for making them portable.
Comment 5 Aakash Jain 2020-10-22 13:39:44 PDT
Comment on attachment 412050 [details]
Patch

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

> Tools/Scripts/webkitpy/autoinstalled/chromedriver.py:37
> +            response = requests.get(self.URL + 'LATEST_RELEASE')

Should we handle the case when requests.get throws an exception?

> Tools/Scripts/webkitpy/autoinstalled/chromedriver.py:54
> +            link='{url}{version}/chromedriver_{os}.zip'.format(

How about making it one-liner, like:
link = '{}{}/chromedriver_{}.zip'.format(self.URL, version, os)

> Tools/Scripts/webkitpy/autoinstalled/chromedriver.py:56
> +                version=str(version),

str might not be required here with format()
Comment 6 Aakash Jain 2020-10-22 13:39:58 PDT
rs=me
Comment 7 Jonathan Bedard 2020-10-22 14:33:58 PDT
Created attachment 412133 [details]
Patch for landing
Comment 8 EWS 2020-10-22 15:13:14 PDT
Committed r268896: <https://trac.webkit.org/changeset/268896>

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