Cleanup after custom options bootstrapping in reflect.

Review Request #1468 - Created Dec. 11, 2014 and submitted

Information
John Sirois
pants
jsirois/reflect/fix
861
26da40d...
Reviewers
pants-reviews
benjyw, lahosken

The custom bootstrapping to get a symbolic buildroot for
doc generation was affecting global state and leaving a
buildroot of <buildroot> laying around for subsequent code
to pick up and unwittingly try to use.

src/python/pants/backend/core/tasks/reflect.py | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

Locally this was failing before, passed after:

$ PANTS_DEV=1 ./pants goal test tests/python/pants_test/tasks:reflect tests/python/pants_test/backend/python:test_builder

Also generated docs and confirmed the intended symbolic <buildroot> was being interpolated: http://pantsbuild.github.io/jsirois/goals_reference.html#Common

Installed python 3.2.5 after which the following failed but then passed after diff 3:

$ PATH=/home/jsirois/.pyenv/versions/3.2.5/bin:$PATH pants.dev goal test tests/python/pants_test/tasks:reflect tests/python/pants_test/backend/python:test_builder

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

John Sirois
John Sirois
Larry Hosken
David Turner
Benjy Weinberger
Ity Kaul
John Sirois
John Sirois
John Sirois
John Sirois
John Sirois
John Sirois
John Sirois
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

John Sirois

Nice. This did not fix OSX CI because ... unlike linux, which has defaulted to relatime for mounts for a while now, OSX defaults to atime and so...:

cached _binary_stat
posix.stat_result(st_mode=33261, st_ino=2726319, st_dev=16777218L, st_nlink=2, st_uid=0, st_gid=0, st_size=58608, st_atime=1418359951, st_mtime=1411335907, st_ctime=1411336406)

current _binary_stat
posix.stat_result(st_mode=33261, st_ino=2726319, st_dev=16777218L, st_nlink=2, st_uid=0, st_gid=0, st_size=58608, st_atime=1418359791, st_mtime=1411335907, st_ctime=1411336406)

I'll fixup the cached == current check to use the binary path instead like it used to and send up an RB to pex to change the PythonInterpreter.__eq__ impl - since the atime setting is system dependent I don't think Wickman intended the current behavior.

  1. pex.PythonInterpreter fix: https://rbcommons.com/s/twitter/r/1477/

  2. temporary pantsbuild/pants test_test_builder workaround fix: https://rbcommons.com/s/twitter/r/1478/

  3. Why does atime interfere? Not seeing the connection.

  4. Oh never mind, seeing the other RB now.

Loading...