cool-easter-32542
05/27/2023, 2:02 AM./pants test src/python/pants/backend/python/providers/pyenv/rules_integration_test.py consistently errors with the underlying issue being:
E pants.engine.process.ProcessExecutionFailure: Process 'Install Python 3.9' failed with exit code 1.
E stdout:
E
E stderr:
E pyenv: /Users/benjyw/.cache/pants/named_caches/pyenv/44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a/versions/3.9.16 already exists
E Traceback (most recent call last):
E File "/private/tmp/pants-sandbox-TjtzIT/install_python_shim.py", line 29, in <module>
E main()
E File "/private/tmp/pants-sandbox-TjtzIT/install_python_shim.py", line 21, in main
E subprocess.run(["./pyenv-2.3.13/bin/pyenv", "install", SPECIFIC_VERSION], check=True)
E File "/Users/benjyw/.pyenv/versions/3.10.6/lib/python3.10/subprocess.py", line 524, in run
E raise CalledProcessError(retcode, process.args,
E subprocess.CalledProcessError: Command '['./pyenv-2.3.13/bin/pyenv', 'install', '3.9.16']' returned non-zero exit status 1.
The key line is /Users/benjyw/.cache/pants/named_caches/pyenv/44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a/versions/3.9.16 already exists - which is true! In fact it has to be true since we create the DONE file and its lock file in there.
In that dir there is a DONE.lock but no DONE. SO I guess a previous pyenv install failed and left things in an intermediate state.
Probably we need to keep the DONE and lockfile outside that dir, so we can clean it prior to attempting to pyenv-install into it?
pantsbuild/pantscool-easter-32542
05/30/2023, 11:16 PM