-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/#94 resolve download url dynamically for chrome driver #95
Feat/#94 resolve download url dynamically for chrome driver #95
Conversation
…ind the specific download url for a version
$driver->version()->toBuildString(), | ||
$this->getBinaryName($driver) | ||
) | ||
$this->downloadUrlResolver->byDriver($driver, $this->getBinaryName($driver)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getBinaryName()
is only used here. I'd move it to the implementation of the DownloadUrlResolver
, so it doesn't need to be passed here. Then the interface for DownloadUrlResolver::byDriver($driver)
also makes more sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've moved the logic to the DownloadUrlResolver, and split it up. So the distinction between binary and platform is clearer.
if ($operatingSystem->equals(OperatingSystem::WINDOWS())) { | ||
return 'win32/' . self::BINARY_WINDOWS_JSON; | ||
return 'win32'; | ||
} | ||
|
||
if ($operatingSystem->equals(OperatingSystem::MACOS())) { | ||
return 'mac-x64/' . self::BINARY_MAC_JSON; | ||
return 'mac-x64'; | ||
} | ||
|
||
if ($operatingSystem->equals(OperatingSystem::LINUX())) { | ||
return 'linux64/' . self::BINARY_LINUX_JSON; | ||
return 'linux64'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this is correct? This was working before, did it not change in some major version again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit of an odd one tbh. As it's not really a binary you need to resolve anymore for the new api that i've used. But instead you need to specify the platform. From which you can then fetch the URL.
Edit: But this is actually logic that should be in the downloader, so i'll seperate it for clarity.
…rsion on the old and new download endpoint
Fixes #94
A rewrite of the logic for the chrome downloader, so the new chrome versions are now based on an api response. And we should no longer be able to run into the situation where the fetching breaks, if they suddenly change the download url.