Actually not sure if this is a bug or a feature :)
When using the same self-hosted runner(s) for various python projects (with individual GH action workflows and jobs), the Python distribution which is used by the setup-python action is the cached /opt/hostedtoolcache/Python/3.7.9/x64. If then packages are installed subsequently with pip, they will be installed to the /opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages. This is problematic, as the same environment may be subsequently used by another Python project in another job causing pip resolver problems at runtime of the action.
Imo expected behaviour of setup-python in a job would be a "clean state" python distribution, (e.g. by using venv).
Which version of the action are you using?
v1
v2
Environment
self-hosted (Ubuntu)
Linux
Windows
Mac
Python Versions
Python 3.7.9
To Reproduce
Code to reproduce: Have two python projects/repos with two GH action workflows and conflicting packages (between the two projects). In each workflow, have a job with the following steps
Actually not sure if this is a bug or a feature :)
When using the same self-hosted runner(s) for various python projects (with individual GH action workflows and jobs), the Python distribution which is used by the setup-python action is the cached
/opt/hostedtoolcache/Python/3.7.9/x64. If then packages are installed subsequently with pip, they will be installed to the/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages. This is problematic, as the same environment may be subsequently used by another Python project in another job causing pip resolver problems at runtime of the action.Imo expected behaviour of
setup-pythonin a job would be a "clean state" python distribution, (e.g. by using venv).Which version of the action are you using?
v1v2Environment
Python Versions
Python 3.7.9
To Reproduce
Code to reproduce: Have two python projects/repos with two GH action workflows and conflicting packages (between the two projects). In each workflow, have a job with the following steps
The text was updated successfully, but these errors were encountered: