Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inter-project dependence on self-hosted runners #228

Open
2 of 6 tasks
damian-t opened this issue Aug 6, 2021 · 0 comments
Open
2 of 6 tasks

Inter-project dependence on self-hosted runners #228

damian-t opened this issue Aug 6, 2021 · 0 comments
Labels
bug

Comments

@damian-t
Copy link

@damian-t damian-t commented Aug 6, 2021

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

    steps:
      - uses: actions/checkout@v2
      - name: Set up Python 3.7
        uses: actions/setup-python@v2
        with:
          python-version: 3.7

      - name: Install dependencies
        run: |
          python3.7 -m pip install --upgrade pip
          pip install -r requirements.txt
@damian-t damian-t added the bug label Aug 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug
Projects
None yet
Development

No branches or pull requests

1 participant