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

Tests fail if python3.8 is not installed #498

Closed
tcompa opened this issue Feb 9, 2023 · 5 comments
Closed

Tests fail if python3.8 is not installed #498

tcompa opened this issue Feb 9, 2023 · 5 comments

Comments

@tcompa
Copy link
Collaborator

tcompa commented Feb 9, 2023

No description provided.

@tcompa
Copy link
Collaborator Author

tcompa commented Feb 9, 2023

The issue comes from this line in a fixture

check_python_has_venv("python3.8", python_test_path)

@ychiucco

@tcompa tcompa added the testing testing label Feb 14, 2023
@tcompa
Copy link
Collaborator Author

tcompa commented Feb 21, 2023

Ref #520

@tcompa
Copy link
Collaborator Author

tcompa commented Feb 23, 2023

This should be fixed via 3a2e47a

@tcompa
Copy link
Collaborator Author

tcompa commented Feb 23, 2023

After some digging, it turns out that this is hard to solve due to the twofold use of our tests (testing tasks running locally or via slurm on a docker slurm cluster).
The install_dummy_packages fixture is where the problem appears explicitly:

  • Setting python_version=3.9 for tasks will lead to failures if python3.9 or its venv module are not installed.
  • Setting it to None will lead to failures when running in the slurm docker, because it may point to (e.g.) python3.10 which is then not available in the slurm docker containers.

The goal (letting someone without python3.9 run the CI) is not worth the effort (splitting the fixture into two functions, one for each case), IMHO.

Won't fix.

@tcompa
Copy link
Collaborator Author

tcompa commented May 2, 2023

For the record, this is how we would add python3.11 from the Dockerfile

RUN apt-get update
RUN apt-get update
RUN apt-get install software-properties-common -y
RUN add-apt-repository ppa:deadsnakes/ppa -y
RUN apt-get update
RUN apt-get install python3.11 -y
RUN apt-get install python3-venv -y

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant