Improve CI caching.

Review Request #1538 - Created Dec. 22, 2014 and submitted

Information
John Sirois
pants
jsirois/travis/cache/improve
888
8e4262c...
Reviewers
pants-reviews
davidt, patricklaw, zundel

Add an option to skip pants bootstrap pre-clean
allowing cached build-support/pants_dev_deps.venv
to survive and be utilized.

.travis.yml | 2 +-
build-support/bin/ci.sh | 11 ++++++++---
2 files changed, 9 insertions(+), 4 deletions(-)

I missed this cleaning going on in ci.sh when 1st enabling caching in https://rbcommons.com/s/twitter/r/1537/
This change actually uses the build-support/pants_dev_deps.venv now to avoid pip installing pants deps unless they change as evidenced by logs.

CI went green here: https://travis-ci.org/pantsbuild/pants/builds/44795443

Note - unlike master when the cache enabling in https://rbcommons.com/s/twitter/r/1537/ 1st hit: https://travis-ci.org/pantsbuild/pants/jobs/44794372

...
[== Bootstrapping pants ==]
*** Running pants in dev mode from /home/travis/build/pantsbuild/pants/src/python/pants/bin/pants_exe.py ***
Bootstrapping pants_deps with requirements:
  /home/travis/build/pantsbuild/pants/3rdparty/python/requirements.txt
  /home/travis/build/pantsbuild/pants/3rdparty/python/internal_backend/requirements.txt
  /home/travis/build/pantsbuild/pants/3rdparty/python/twitter/commons/requirements.txt
Using /home/travis/virtualenv/python2.7.9/bin/python2.7
Using real prefix '/opt/python/2.7.9'
New python executable in /home/travis/build/pantsbuild/pants/build-support/pants_dev_deps.venv/bin/python2.7
Also creating executable in /home/travis/build/pantsbuild/pants/build-support/pants_dev_deps.venv/bin/python
Installing setuptools, pip...done.
Downloading/unpacking ansicolors==1.0.2 (from -r /home/travis/build/pantsbuild/pants/3rdparty/python/requirements.txt (line 1))
  Downloading ansicolors-1.0.2.tar.gz
  Running setup.py (path:/home/travis/build/pantsbuild/pants/build-support/pants_dev_deps.venv/build/ansicolors/setup.py) egg_info for package ansicolors

Downloading/unpacking antlr-python-runtime==3.1.3 (from -r /home/travis/build/pantsbuild/pants/3rdparty/python/requirements.txt (line 3))
  antlr-python-runtime an externally hosted file and may be unreliable
  antlr-python-runtime is potentially insecure and unverifiable.
  Downloading antlr_python_runtime-3.1.3.tar.gz (76kB): 76kB downloaded
  Running setup.py (path:/home/travis/build/pantsbuild/pants/build-support/pants_dev_deps.venv/build/antlr-python-runtime/setup.py) egg_info for package antlr-python-runtime

...

Successfully installed twitter.common.collections twitter.common.config twitter.common.confluence twitter.common.decorators twitter.common.dirutil twitter.common.lang twitter.common.log twitter.common.options twitter.common.process twitter.common.string twitter.common.threading twitter.common.util twitter.common.contextutil
Cleaning up...
/home/travis/build/pantsbuild/pants/build-support/pants_dev_deps.venv/lib/python2.7/site-packages/pkg_resources.py:1049: UserWarning: /home/travis/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
  warnings.warn(msg, UserWarning)
06:46:15 00:00 [main]
               (To run a reporting server: ./pants server)
...

We now get: https://travis-ci.org/pantsbuild/pants/jobs/44795444

...
[== Bootstrapping pants ==]
*** Running pants in dev mode from /home/travis/build/pantsbuild/pants/src/python/pants/bin/pants_exe.py ***
/home/travis/build/pantsbuild/pants/build-support/pants_dev_deps.venv/lib/python2.7/site-packages/pkg_resources.py:1049: UserWarning: /home/travis/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
  warnings.warn(msg, UserWarning)
07:03:03 00:00 [main]
               (To run a reporting server: ./pants server)
...
Eric Ayers
Eric Ayers
John Sirois
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Loading...