Skip to content
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

Don't pointlessly install PhantomJS on Travis #11929

Merged
merged 1 commit into from
Oct 14, 2016

Conversation

chrisarcand
Copy link
Member

@chrisarcand chrisarcand commented Oct 13, 2016

  • The gemified version of Jasmine uses the gemified version of PhantomJS which auto-installs it if it can't find your installation in ~/.phantomjs. Travis already has a version of PhantomJS installed in a different location, so the gem will auto-install even if it's pointless.
  • Also, the gemified PhantomJS hardcodes install URLs from BitBucket which times out
    and causes failed builds:
Phantomjs does not appear to be installed in
/home/travis/.phantomjs/2.1.1/x86_64-linux/bin/phantomjs, installing!
% Total    % Received % Xferd  Average Speed   Time    Time     Time
Current
Dload  Upload   Total   Spent    Left
Speed
0     0    0     0    0     0
0      0 --:--:-- --:--:-- --:--:--
0
0     0    0   333    0     0
2955      0 --:--:-- --:--:--
--:--:--  2955
bunzip2: phantomjs-2.1.1-linux-x86_64.tar.bz2 is not a bzip2 file.
tar: phantomjs-2.1.1-linux-x86_64.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now rake aborted!
TypeError: no implicit conversion of nil into String
/home/travis/build/ManageIQ/manageiq/vendor/bundle/ruby/2.3.0/gems/phantomjs-2.1.1.0/lib/phantomjs/platform.rb:72:in 'block in install!'

TLDR: Don't install auto-install PhantomJS on CI. In Travis we trust.

Links

@chrisarcand
Copy link
Member Author

chrisarcand commented Oct 14, 2016

Ugh. This workaround might only exist in the npm distribution from Medium, not the Jasmine gem. Work in progress. (referring to the PHANTOMJS_CDNURL variable that is present in the npm package but not in the gem versions we use 😭 )

@chessbyte chessbyte changed the title Use cnpmjs.org mirror for PhantomJS installs on CI [WIP] Use cnpmjs.org mirror for PhantomJS installs on CI Oct 14, 2016
@chrisarcand chrisarcand force-pushed the alternate-phantomjs-cdn branch 5 times, most recently from dbe2142 to 412f97b Compare October 14, 2016 20:57
The gemified version of Jasmine uses the gemified version of PhantomJS
which auto-installs it if it can't find your installation in ~/.phantomjs
Travis already has a version of PhantomJS installed in a different
location, so the gem will auto-install even if it's pointless.  Also,
gemified PhantomJS hardcodes install URLs from BitBucket which times out
and causes failed builds.

TLDR: Don't install auto-install PhantomJS on CI. In Travis we trust.
@chrisarcand chrisarcand changed the title [WIP] Use cnpmjs.org mirror for PhantomJS installs on CI Don't pointlessly install PhantomJS on Travis Oct 14, 2016
@chrisarcand chrisarcand removed the wip label Oct 14, 2016
@chrisarcand
Copy link
Member Author

Ran this change in Travis 3-4 times, hasn't failed yet (and is faster, as we're not installing PhantomJS needlessly...) Calling it good.

cc/ @chessbyte @dclarizio @himdel

@NickLaMuro
Copy link
Member

NickLaMuro commented Oct 14, 2016

So much yes with this! I can't believe that the jasmine gem did this, nice catch!

I guess what I didn't realize (which was a great link to include in this PR, thanks Chris) is that we would be using an older version of Phantom.js (1.9.8 I believe), so that might be of concern. Not my area of expertise, but something for the reviewers to definitely make note of.

@bdunne
Copy link
Member

bdunne commented Oct 14, 2016

👍 LGTM

@bdunne bdunne merged commit 284fd0a into ManageIQ:master Oct 14, 2016
@chrisarcand chrisarcand deleted the alternate-phantomjs-cdn branch October 14, 2016 22:14
@chessbyte chessbyte added this to the Sprint 48 Ending Oct 24, 2016 milestone Oct 15, 2016
@chrisarcand
Copy link
Member Author

I guess what I didn't realize (which was a great link to include in this PR, thanks Chris) is that we would be using an older version of Phantom.js (1.9.8 I believe)

Yup, CI will run an older version of Phantom than what's installed on the gem. As long as the tests pass I see no problems for now. There are other ways you can manually install v2 on Travis but we might as well wait and see, if ever, Travis just eventually makes v2 available.

chessbyte pushed a commit that referenced this pull request Oct 18, 2016
Don't pointlessly install PhantomJS on Travis
(cherry picked from commit 284fd0a)
@chessbyte
Copy link
Member

Euwe Backport details:

$ git log -1
commit 6ed2876fbed142011c730a6fcc71abf3d789bd5e
Author: Brandon Dunne <[email protected]>
Date:   Fri Oct 14 17:53:28 2016 -0400

    Merge pull request #11929 from chrisarcand/alternate-phantomjs-cdn

    Don't pointlessly install PhantomJS on Travis
    (cherry picked from commit 284fd0a5e6d268de4b3619acd050ddc02abb953b)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants