Closed juliangruber closed 7 years ago
this seems like it will lead to cascading failure, so that one CDN goes down, and the other CDNs get DDOSed. I think we need to find tools that strongly encourage people to avoid hitting the CDNs in their continuous builds, not hit them harder.
the purpose of a cdn is to deliver content to the masses, isn't it? if each employ their own rate limiting feature (which i'm sure they do) this shouldn't be a problem.
Hi guys,
Any idea when this fix will go in.
We have currently removed phantomjs-prebuilt
from our dependency so it does not fail CI builds
If you are downloading phantomjs as part of a CI process, please stop. Install phantomjs once on PATH. This package will automatically use a pre-installed binary it finds on PATH, and you will be much happier.
This PR will never be merged. This is a tragedy-of-the-common problem, and gobbling up more resources will make the problem worse.
@nicks I'm a bit confused, isn't the purpose of phantomjs-prebuilt
to have a module that doesn't require you to have phantomjs(1)
installed in your $PATH
?
for anyone else who's having issues with this, I just published https://www.npmjs.com/package/phantomjs-prebuilt-that-works with the CDN fallback logic in place.
@nicks
If you are downloading phantomjs as part of a CI process, please stop.
Would a readme note on how to tackle Phantom v2 on Travis-CI help? I use Travis caches to avoid repeat installs:
cache:
directories:
- travis_phantomjs
before_install:
# Upgrade PhantomJS to v2.1.1.
- "export PHANTOMJS_VERSION=2.1.1"
- "export PATH=$PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin:$PATH"
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; fi"
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then wget https://github.com/Medium/phantomjs/releases/download/v$PHANTOMJS_VERSION/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2; fi"
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then tar -xvf $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi"
- "phantomjs --version"
@jdalton cool! I don't know much about travis but that seems reasonable to me. would you like to submit a PR or want me to add it?
I'll submit a PR :D
fixes https://github.com/Medium/phantomjs/issues/595
Here's example output when you provide a faulty cdn: