Bug 218059 - [webkitpy] Use webkitcorepy's autoinstaller for chrome and gecko drivers
Summary: [webkitpy] Use webkitcorepy's autoinstaller for chrome and gecko drivers
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Bedard
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-10-21 16:45 PDT by Jonathan Bedard
Modified: 2020-10-22 15:13 PDT (History)
6 users (show)

See Also:


Attachments
Patch (13.72 KB, patch)
2020-10-21 17:09 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (10.89 KB, patch)
2020-10-22 09:26 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch for landing (14.50 KB, patch)
2020-10-22 14:33 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff

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