Skip to content
This repository has been archived by the owner on Jan 2, 2020. It is now read-only.

Ship our local version of google-chrome and chromedriver #1080

Merged
merged 3 commits into from Jun 6, 2017

Conversation

tuliocasagrande
Copy link
Collaborator

@tuliocasagrande tuliocasagrande commented Jun 5, 2017

Fix functional test step Then I should see the fancy interstitial, that's not working properly with newer versions of chromedriver.

Since the debian repo doesn't provide old versions of chromium, we're shipping our own local copies:

$ chromedriver --version
ChromeDriver 2.27.440175 (9bc1d90b8bfa4dd181fbbf769a5eb5e575574320)
$ google-chrome --version
Google Chrome 54.0.2840.100

@thaissiqueira
Copy link
Member

thaissiqueira commented Jun 5, 2017

Using the chromedriver branch I were able to run 'make tests_all' in a smoothly way.
Looks good to merge for me 👍

@@ -0,0 +1,36 @@
# install chromedriver for functional tests
# we ship our local copy of chromedriver
# because latest versions aren't working very well
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to be more specific here (i.e. point to a github issue or explain why)

class chromedriver {

file { '/tmp/google-chrome-stable_54.0.2840.100-1_amd64.deb':
source => 'puppet:///modules/chromedriver/google-chrome-stable_54.0.2840.100-1_amd64.deb',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't put big binaries into git. We decided to not do this wuth the useragent debs and rather put them at github releases for downloading. Could you do the same for chrome/-driver pls ?
see https://github.com/pixelated/puppet-pixelated/blob/master/manifests/install.pp

mode => '0755',
}

exec { 'install_google_chrome':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of an exec you can use the Package resource like in https://github.com/pixelated/puppet-pixelated/blob/master/manifests/install.pp#L22

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure we can force a /usr/bin/apt-get -y -f install with this resource?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, you're right, I oversaw that one. I don't know if this is possible, so we can stick to an exec here.
To don't run the exec every time pls add sth like this:

    unless => '/usr/bin/dpkg -l chromedriver > /dev/null 2>&1'

]
}

exec { 'unpack_chromedriver':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without a creates file attribute this exec would be called every time the provisioning is run. Please add a creates to avoid this.

see https://share.riseup.net/#8S3wNXRY5b1RwjZFrDCRvQ

Tulio Casagrande added 2 commits June 6, 2017 11:55
The latest chromedriver version is getting recurring errors when
running login.feature from functional tests
Copy link
Contributor

@varac varac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great besides my two comments. I'm just testing it and if it works, pls just add the two requires, test it and merge it !

exec { 'unpack_chromedriver':
command => "/usr/bin/unzip ${chromedriver} -d /usr/local/bin/",
cwd => '/var/tmp/',
creates => '/usr/local/bin/chromedriver',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This resource depends on Exec['fetch_chromedriver'] so pls add a require here.

command => "/usr/bin/dpkg -i ${google_chrome} || /usr/bin/apt-get -y -f install",
cwd => '/var/tmp/',
unless => '/usr/bin/dpkg -l google-chrome-stable > /dev/null 2>&1',
require => [ Exec['apt_get_update'] ],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This resource depends on Exec['fetch_google_chrome'] so pls add it to the require array here.

@tuliocasagrande tuliocasagrande merged commit dc78601 into master Jun 6, 2017
@tuliocasagrande tuliocasagrande deleted the chromedriver branch June 6, 2017 18:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants