pants: remove reporting links even if bad

Review Request #187 — Created April 8, 2014 and submitted

slackhappy
commons
pants-reviews
benjyw, patricklaw
pants: remove reporting links even if bad

fix for this error:

twitter/pants/goal/run_tracker.py", line 82, in __init__
OSError: [Errno 17] File exists

>> import os
>>> os.path.exists('.pants.d/runs/latest')
False
>>> os.path.lexists('.pants.d/runs/latest')
True
built pants and used the new pex, used that pex in the foursquare repo to confirm the issue had been fixed.

A simple repro is:


# set a bad root
PANTS_BUILD_ROOT=. ./pants goals
ValueError: Source root /Users/john/3foursquare.web/3rdparty is not under the build root .


# from now on, unrecoverable
./pants goals
  File "/Users/john/3foursquare.web/.pants.bootstrap/pex/pants-current.pex/twitter/pants/goal/run_tracker.py", line 82, in __init__
OSError: [Errno 17] File exists


# with the fix
PANTS_BUILD_ROOT=. ./pants --pants-binary=/Users/john/extsrc/twitter.gh/commons/pants.pex  goals
ValueError: Source root /Users/john/3foursquare.web/3rdparty is not under the build root .

# recoverable
./pants --pants-binary=/Users/john/extsrc/twitter.gh/commons/pants.pex  goals
# prints the goals




I also tried the CI:


./build-support/bin/ci.sh seems to fail with an unrelated error.  After the self-rebuild:


[== Running pants distribution tests ==]

Build operating on targets: OrderedSet([PythonBinary(src/python/twitter/pants/BUILD.transitional:_pants_transitional_publishable_binary_)])
Building PythonBinary PythonBinary(src/python/twitter/pants/BUILD.transitional:_pants_transitional_publishable_binary_):
Problem executing PythonBuilder for targets OrderedSet([PythonBinary(src/python/twitter/pants/BUILD.transitional:_pants_transitional_publishable_binary_)]): Traceback (most recent call last):
  File "/Users/john/extsrc/twitter.gh/commons/pants.pex/twitter/pants/commands/build.py", line 126, in _python_build
    conn_timeout=self.options.conn_timeout)
  File "/Users/john/extsrc/twitter.gh/commons/pants.pex/twitter/pants/python/python_builder.py", line 61, in build
    conn_timeout=conn_timeout).run()
  File "/Users/john/extsrc/twitter.gh/commons/pants.pex/twitter/pants/python/binary_builder.py", line 65, in run
    env = self.chroot.dump()
  File "/Users/john/extsrc/twitter.gh/commons/pants.pex/twitter/pants/python/python_chroot.py", line 201, in dump
    platforms=platforms)
  File "/Users/john/extsrc/twitter.gh/commons/pants.pex/twitter/pants/python/resolver.py", line 126, in resolve_multi
    distributions[platform] = working_set.resolve(requirements, env=env, installer=installer)
  File "/Users/john/extsrc/twitter.gh/commons/pants.pex/.bootstrap/pkg_resources.py", line 592, in resolve
    raise VersionConflict(dist,req) # XXX put more info here
VersionConflict: (setuptools 3.4.3 (/Users/john/extsrc/twitter.gh/commons/.pants.d/python/eggs/setuptools-3.4.3-py2.6.egg), PythonRequirement(setuptools==2.1.2))
SL
SL
BE
  1. Thanks for the change! Sorry for the hoop-jumping. 
    
    
  2. 
      
PA
  1. Ship It!
  2. 
      
SL
Review request changed

Status: Closed (submitted)

Change Summary:

commit 3b22754613827a905f102d10e82d6d14a49f68d2
Merge: f2bd9b0 2317798
Author: Benjy Weinberger <benjyw@gmail.com>
Date:   Tue Apr 15 10:59:08 2014 -0700

    Merge pull request #57 from slackhappy/pants_rm_bad_links
    
    pants: remove reporting links even if bad
Loading...