-
Notifications
You must be signed in to change notification settings - Fork 2
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
Stop using webdrivers gem #43
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ollietreend
commented
Feb 25, 2022
kevindew
added a commit
to alphagov/govuk_publishing_components
that referenced
this pull request
Feb 28, 2022
In the time since PR 2625 [1] was merged we've learnt that the webdrivers gem is going to cause a problem for the GOV.UK development environment, govuk-docker, when running on M1 macs. We have decided to change tact and focus on installing a chromedriver on the underlying machine rather than using webdrivers as a source of this software [2] [3]. This seems extra pragmatic now that we have Javascript dependencies also using chromedriver. A step towards this is removing this intertwining of Ruby webdriver dependency from this repo's yarn tests. The effect merging this will have is: - The build will continue to pass in GitHub Actions CI - chromedriver is installed - Users running jasmine tests in govuk-docker will need to be using [2] - Users running jasmine tests on their local machine will have to install chromedriver manually (there is a helpful prompt) [1]: #2625 [2]: alphagov/govuk-docker#577 [3]: alphagov/govuk_test#43
kevindew
approved these changes
Mar 7, 2022
We've traditionally used the gem [`webdrivers`][webdrivers] to automagically install ChromeDriver on the system at runtime, so that it's available for use by Capybara and headless Jasmine tests. However this approach is beginning to cause us some problems because Google Chrome and ChromeDriver aren't currently available as Linux ARM binaries. This means that developers on Apple M1 MacBooks are unable to run tests when working in the [govuk-docker] development environment. We've therefore made the decision to change how we install and use Chrome and its associated WebDriver. Instead of applications being responsible for installing ChromeDriver via this gem's use of `webdrivers`, we've made it the responsibility of the underlying operating system to provide a compatible browser and WebDriver. In everyday use, this change should be unnoticeable because we've prepared our tooling ahead of time: - govuk-docker now comes with ChromeDriver (see alphagov/govuk-docker#577) - Jasmine CI workers also have ChromeDriver (see alphagov/govuk-puppet#11568) - The GitHub Actions `ubuntu-latest` image has ChromeDriver pre-installed (see [the docs][ubuntu-latest]) However, if you're running tests in another environment (e.g. local development on bare metal), you'll need to make sure ChromeDriver is available. This is usually as simple as running: ``` $ brew install chromedriver ``` [webdrivers]: https://rubygems.org/gems/webdrivers [govuk-docker]: https://github.com/alphagov/govuk-docker [ubuntu-latest]: https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md#browsers-and-drivers
ollietreend
force-pushed
the
drop-webdrivers-gem
branch
from
March 7, 2022 15:36
659d515
to
03ca912
Compare
kevindew
added a commit
to alphagov/maslow
that referenced
this pull request
Mar 7, 2022
This repo doesn't make any direct references to it and, as per alphagov/govuk_test#43 GOV.UK is preferring webdrivers to be installed on the OS rather than by Ruby.
kevindew
added a commit
to alphagov/travel-advice-publisher
that referenced
this pull request
Mar 7, 2022
This repo doesn't make any direct references to it and, as per alphagov/govuk_test#43 GOV.UK is preferring webdrivers to be installed on the OS rather than by Ruby.
kevindew
added a commit
to alphagov/manuals-publisher
that referenced
this pull request
Mar 7, 2022
This repo doesn't make any direct references to it and, as per alphagov/govuk_test#43 GOV.UK is preferring webdrivers to be installed on the OS rather than by Ruby.
kevindew
added a commit
to alphagov/transition
that referenced
this pull request
Mar 8, 2022
This repo doesn't make any direct references to it and, as per alphagov/govuk_test#43 GOV.UK is preferring webdrivers to be installed on the OS rather than by Ruby.
kevindew
added a commit
to alphagov/publisher
that referenced
this pull request
Mar 8, 2022
This repo doesn't make any direct references to it and, as per alphagov/govuk_test#43 GOV.UK is preferring webdrivers to be installed on the OS rather than by Ruby.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We've traditionally used the gem
webdrivers
to automagically install ChromeDriver on the system at runtime, so that it's available for use by Capybara and headless Jasmine tests.However this approach is beginning to cause us some problems because Google Chrome and ChromeDriver aren't currently available as Linux ARM binaries. This means that developers on Apple M1 MacBooks are unable to run tests when working in the govuk-docker development environment.
We've therefore made the decision to change how we install and use Chrome and its associated WebDriver. Instead of applications being responsible for installing ChromeDriver via this gem's use of
webdrivers
, we've made it the responsibility of the underlying operating system to provide a compatible browser and WebDriver.In everyday use, this change should be unnoticeable because we've prepared our tooling ahead of time:
ubuntu-latest
image has ChromeDriver pre-installed (see the docs)However, if you're running tests in another environment (e.g. local development on bare metal), you'll need to make sure ChromeDriver is available. This is usually as simple as running: