[ https://issues.apache.org/jira/browse/AURORA-1717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15446479#comment-15446479 ]
John Sirois commented on AURORA-1717: ------------------------------------- Thanks [~StephanErb]. If this makes forward progress for Aurora that's great. 2 things are slightly off though. For one, the failure was flaky and its not clear to me how PYTHONPATH could have been set to a flaky value before this change; ie: the PYTHONPATH should have made the pants script invisible in the subprocess every time. Clearly there is a variability injection I'm still not seeing. Secondly, this exposes the fact that currently {{./pants test}} for python does not do full isolation with a chroot. Although a chroot is created, the PYTHONPATH is explicitly manipulated to add in code coverage: https://github.com/pantsbuild/pants/blob/master/src/python/pants/backend/python/tasks/pytest_run.py#L284-L321 I've filed https://github.com/pantsbuild/pants/issues/3820 to address the second bit and the 1st I can live with continued uncertainty for now. I have no immediate objections though to you upstreaming your {{pants}} script edit if you add in a TODO that links the pants issue above. > pants fails to run in integration tests (flaky) > ----------------------------------------------- > > Key: AURORA-1717 > URL: https://issues.apache.org/jira/browse/AURORA-1717 > Project: Aurora > Issue Type: Bug > Components: Build > Reporter: John Sirois > Assignee: John Sirois > Attachments: AURORA-1717-XDG_CACHE_HOME.edited.png, > Aurora1555_H10_ws_.home_.cache_pants_plugins.zip, > Aurora1555_H10_ws_.home_.cache_pants_setup_bootstrap-Linux-x86_64_1.1.0-pre6_lib_python2.7_site-packages_pants.zip, > builds.apache.org_job_Aurora_1552_consoleText.txt, pip.zip, pip2.zip > > > As noted by [~StephanErb] in > [IRC|http://wilderness.apache.org/channels/?f=aurora/2016-06-15#1466009185], > python tests occasionally fail like so under AuroraBot: > {noformat} > ... > [1m with temporary_dir() as checkpoint_root:[0m > [1m te = AuroraExecutor([0m > [1m> runner_provider=make_provider(checkpoint_root),[0m > [1m sandbox_provider=DefaultTestSandboxProvider())[0m > src/test/python/apache/aurora/executor/test_thermos_executor.py:580: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > src/test/python/apache/aurora/executor/test_thermos_executor.py:193: in > make_provider > [1m pex_location=thermos_runner_path(),[0m > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > build = True > [1m def thermos_runner_path(build=True):[0m > [1m if not build:[0m > [1m return getattr(thermos_runner_path, 'value', None)[0m > [1m [0m > [1m if not hasattr(thermos_runner_path, 'value'):[0m > [1m pex_dir = safe_mkdtemp()[0m > [1m> assert subprocess.call(["./pants", "--pants-distdir=%s" % > pex_dir, "binary",[0m > [1m "src/main/python/apache/thermos/runner:thermos_runner"]) == > 0[0m > [1m[31mE assert 1 == 0[0m > [1m[31mE + where 1 = <function call at 0x7f39ef905938>(['./pants', > '--pants-distdir=/tmp/user/2396/tmpU8sLiq', 'binary', > 'src/main/python/apache/thermos/runner:thermos_runner'])[0m > [1m[31mE + where <function call at 0x7f39ef905938> = > subprocess.call[0m > src/test/python/apache/aurora/executor/test_thermos_executor.py:185: > AssertionError > -------------- Captured stderr call -------------- > Traceback (most recent call last): > File > "/home/jenkins/.cache/pants/setup/bootstrap-Linux-x86_64/0.0.80/bin/pants", > line 7, in <module> > from pants.bin.pants_exe import main > ImportError: No module named pants.bin.pants_exe > generated xml file: > /home/jenkins/jenkins-slave/workspace/AuroraBot/dist/test-results/415337499eb72578eab327a6487c1f5c9452b3d6.xml > > [1m[31m 16 failed, 638 passed, 6 skipped, 1 warnings, 8 error in 127.24 > seconds [0m > ... > {noformat} > This has all the signs of a race in pants bootstrapping; ie: the {{\[version > symlink]/bin/pants}} script is installed but the interpreter it points to in > its shebang does not have pants fully installed yet. That said, a review of > the pants bootstrap script seems to indicate correct atomicity. -- This message was sent by Atlassian JIRA (v6.3.4#6332)