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

PIP_ROOT_USER_ACTION=ignore ignored: pip still issues error messages about running it as root #930

Open
2 of 5 tasks
RoFz opened this issue Aug 28, 2024 · 2 comments
Open
2 of 5 tasks
Assignees
Labels
bug Something isn't working

Comments

@RoFz
Copy link

RoFz commented Aug 28, 2024

Description:
setup-action@v5 and python-version: 3.11 leads to pip's warnings about running as root, which should have been suppressed by the install script on self-hosted runner and GHES 3.12.8.

Action version:
@v5

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
python 3.11 (3.11.9)

Repro steps:

  1. job running under an ubuntu:jammy container image, as root (without 'options: --user ...)
  2. setup-python step like so:
      - name: Set up python
        uses: actions/setup-python@v5
        with:
          python-version: '3.11'

Expected behavior:
No warnings, since the the install script seems to properly export PIP_ROOT_USER_ACTION=ignore.

Actual behavior:
pip throws the known errors (warnings?) about running it as root:

Error: WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behavior with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
  Error: WARNING: The directory '/github/home/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.

This is related to #513, which, although initially opened as a feature request and closed as such, is still receiving updates from people impacted by the same problem.

@RoFz RoFz added bug Something isn't working needs triage labels Aug 28, 2024
@RoFz
Copy link
Author

RoFz commented Aug 28, 2024

Additional note: also tried with setup-python@v4 and specific python versions 3.11.9 and 3.11.8.

@priyagupta108
Copy link
Contributor

Hello @RoFz 👋,
Thank you for reporting this issue. We will investigate it and get back to you as soon as we have some feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants