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

ansible: replace DO debian9-x64-1 with debian12-x64-1 #3560

Merged
merged 7 commits into from
Jan 3, 2024

Conversation

targos
Copy link
Member

@targos targos commented Nov 6, 2023

Refs: #3499

@targos
Copy link
Member Author

targos commented Nov 6, 2023

Draft because the Python setup changed from previous versions and I don't know how to install tap2junit with it.

  cmd: [
    '/usr/bin/python3',
    '-m',
    'pip.__main__',
    'install',
    'tap2junit==0.1.6'
  ],

:stderr: error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.

    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.

    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

@targos
Copy link
Member Author

targos commented Nov 7, 2023

It looks like we want to use pipx ? tap2junit is used as a CLI app, not a library.

/cc @cclauss

@cclauss
Copy link
Contributor

cclauss commented Nov 7, 2023

usr/bin/env python3 -m pip install tap2junit==0.1.6

The .__main__ thing seems like something to delete.

Let's not depend on pipx.

@targos
Copy link
Member Author

targos commented Nov 7, 2023

/usr/bin/env python3 -m pip install tap2junit==0.1.6 prints the same error.

Would it be ok to install with --break-system-packages ?

@targos
Copy link
Member Author

targos commented Dec 20, 2023

With the last commit, tap2junit is installed in a virtualenv:

# ls /home/iojs/venv/bin
activate      activate.fish  activate.ps1      pip	 pip3	  python   python3.11  wheel	   wheel3
activate.csh  activate.nu    activate_this.py  pip-3.11  pip3.11  python3  tap2junit   wheel-3.11  wheel3.11

Now what's the best way to have it activated when jenkins runs?

@targos
Copy link
Member Author

targos commented Dec 20, 2023

/home/iojs/venv/bin/tap2junit is a Python script with hashbang: #!/home/iojs/venv/bin/python

@targos
Copy link
Member Author

targos commented Dec 20, 2023

Updated to use venv instead of virtualenv. Question above is still open.

@targos
Copy link
Member Author

targos commented Dec 21, 2023

I can think of solutions but can't say if they're good:

@targos
Copy link
Member Author

targos commented Dec 22, 2023

/cc @nodejs/build

@cclauss
Copy link
Contributor

cclauss commented Dec 22, 2023

  • Add the location of the venv/bin directory to the PATH

@targos
Copy link
Member Author

targos commented Dec 22, 2023

Subsidiary question: at the start or the end of the PATH?

Another question: the current setup installs the venv as root, so maybe we want to do it in another place than /home/iojs, or we want to install it as the iojs user?

@cclauss
Copy link
Contributor

cclauss commented Dec 22, 2023

https://packages.debian.org/stable/pipx also brings along python3-venv and friends.

@targos
Copy link
Member Author

targos commented Dec 22, 2023

Running with pipx sounds much more involved because we would need to do it conditionally until all CI hosts are setup with it.

@targos targos marked this pull request as ready for review December 24, 2023 10:12
@targos
Copy link
Member Author

targos commented Dec 24, 2023

@targos
Copy link
Member Author

targos commented Dec 24, 2023

@targos
Copy link
Member Author

targos commented Jan 3, 2024

Test run is green.

@targos targos merged commit 957f037 into nodejs:main Jan 3, 2024
1 check passed
@targos targos deleted the do-debian12 branch January 3, 2024 20:52
@targos targos mentioned this pull request Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants