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

libvirt: Support Ubuntu 23.04+ #2005

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

stevenhorsman
Copy link
Member

In newer versions of Ubuntu running pip3 install kcli results in the following error:

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.
...

Solutions seem to be either use a virtual environment, install the package with apt (which isn't available for us as we need), or use pipx if installing an application, which we are.

This attempts to use the logic to install with pipx, including a shell reload at the end of the script to force the PATH to be updated

@stevenhorsman stevenhorsman added the test_e2e_libvirt Run Libvirt e2e tests label Aug 14, 2024
@stevenhorsman
Copy link
Member Author

I've manually tested this on 22.04 and 24.04 and it all (non-kbs) test passed for me

@stevenhorsman
Copy link
Member Author

stevenhorsman commented Aug 14, 2024

It looks like in the CI the shell reload to pick up the new path isn't working, which might be to do with GHA isolating PATH between steps, so we might need some PATH update in the workflow, so putting this in draft for now.

@stevenhorsman stevenhorsman marked this pull request as draft August 14, 2024 12:41
@stevenhorsman
Copy link
Member Author

stevenhorsman commented Aug 14, 2024

It looks like in the CI the shell reload to pick up the new path isn't working, which might be to do with GHA isolating PATH between steps, so we might need some PATH update in the workflow, so putting this in draft for now.

I hope my workflow commit will do the trick. I'm not sure we can test it though, so maybe the best plan is to split out the workflow change and deliver it separately?

In newer versions of Ubuntu running `pip3 install kcli` results in
the following error:
```
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.
...
```
Solutions seem to be either use a virtual environment,
install the package with apt (which isn't available for us as we need),
or use pipx if installing an application, which we are.

This attempts to use the logic to install with pipx, including a
shell reload at the end of the script to force the PATH to be updated

Signed-off-by: stevenhorsman <[email protected]>
With pipx to install kcli, we now need `${HOME}/.local/bin`
to be added to `PATH`, so that we can pick up the install,
so try exporting this to $GITHUB_PATH

Signed-off-by: stevenhorsman <[email protected]>
@stevenhorsman
Copy link
Member Author

Now we can run the libvirt x86 tests on a github hosted runner. I'm able to test this in my fork and it passes: https://github.com/stevenhorsman/cloud-api-adaptor/actions/runs/12047365356/job/33590586948, so this is ready to review and merge directly.

@stevenhorsman stevenhorsman marked this pull request as ready for review November 27, 2024 10:09
@stevenhorsman stevenhorsman requested a review from a team as a code owner November 27, 2024 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test_e2e_libvirt Run Libvirt e2e tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant