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

changed ubuntu from latest to 22.04 #112

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

ckhordiasma
Copy link
Contributor

due to issue https://discourse.ubuntu.com/t/psa-for-folks-using-python-in-github-action-runners-and-ubuntu-latest-label/48654, getting error message:

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.

@jiridanek
Copy link
Member

jiridanek commented Oct 16, 2024

I think better fix is either --break-system-packages, as implemented in skupperproject/skupper-router#1634

or use pipx to install one-off packages if you just run python things, as in red-hat-data-services/ods-ci#1926

edit: or create a venv, possibly with full pyproject.toml and a lock file managed by poetry, and all that, to have the deps versions locked

staying on older ubuntu is unnecessary maintenance debt

edit2: ofc this will work too, I would not mind lgtming what's here, just to unblock things

@ckhordiasma
Copy link
Contributor Author

@jiridanek Thanks for the feedback, I did some further testing and I found some interesting things: https://github.com/ckhordiasma/rhods-devops-infra/actions/workflows/test.yml

if I use ubuntu-latest, I sometimes get 22.04 and other times get 24.04.

The problem with this is that the pip included in 22.04 does not include the --break-system-packages flag, so half the times the build will fail due to that. Because of this, I am thinking that we should include the --break-system-packages flag and pin the runner to ubuntu-24.04 instead, what do you think?

@ckhordiasma ckhordiasma requested a review from riprasad October 16, 2024 12:12
@ckhordiasma ckhordiasma changed the title changed ubuntu from latest to 22.04 draft: changed ubuntu from latest to 22.04 Oct 16, 2024
@ckhordiasma
Copy link
Contributor Author

ckhordiasma commented Oct 16, 2024

actually I am seeing that on my fork it is always using 22.04 if I set the runner to ubuntu-latest. Maybe we can assume that the main repo will stick with using 24.04 when we set the runner to ubuntu-latest, since it has shown a history of using 24.04?

@jiridanek
Copy link
Member

Not using ubuntu-latest and specifying a version is a step in the right direction by itself. Whether you'd prefer to start with this PR, set runner version to Ubuntu 22 first, and then make improvements later, or do Ubuntu 24 version from the start, up to you.

The current PR fixes the issue, so wouldn't mind starting with that.

Also, the ubuntu 24 may have some bugs, for example, all runs (that I checked) in this action of mine https://github.com/jiridanek/notebooks/actions/runs/11331224673 are on ubuntu 24, but some of them failed on internal podman error and some passed, seemingly at random.

pip included in 22.04 does not include the --break-system-packages flag

good point, I did not realize that

@ckhordiasma
Copy link
Contributor Author

ok I'll leave it as-is for now, thanks

@ckhordiasma ckhordiasma changed the title draft: changed ubuntu from latest to 22.04 changed ubuntu from latest to 22.04 Oct 16, 2024
@ckhordiasma ckhordiasma merged commit 1b10112 into red-hat-data-services:main Oct 16, 2024
@ckhordiasma ckhordiasma deleted the ubuntu-2204-fix branch October 16, 2024 12:34
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.

2 participants