-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Problem
The CI test verify_validity_of_discovered_envs in crates/pet/tests/ci_test.rs consistently fails because the pyenv Python version installed in the CI runner no longer matches the version PET detects from the directory name.
PET detects version 3.12.13 from the pyenv directory path /home/runner/.pyenv/versions/3.12.13/bin/python, but when the test spawns the binary to verify via sys.version, it reports 3.12.12.
This means the CI runner's pyenv 3.12.13 directory contains a stale 3.12.12 binary — or more likely, the CI workflow pins a pyenv version that was updated upstream. Since the CPython 3.12 minor version has incremented, this will fail on every run.
Error
thread 'verify_validity_of_discovered_envs' panicked at crates/pet/tests/ci_test.rs:324:9:
Version mismatch for (expected "3.12.12 (main, Oct 10 2025, 01:01:16) [GCC 13.3.0]" to start with "3.12.13") for PythonEnvironment {
display_name: None, name: None,
executable: Some("/home/runner/.pyenv/versions/3.12.13/bin/python"),
kind: Some(Pyenv), version: Some("3.12.13"),
prefix: Some("/home/runner/.pyenv/versions/3.12.13"),
...
}
Root cause
The test at ci_test.rs:324 asserts that sys.version starts with the version PET detected from the directory name. When pyenv installs a new patch version (e.g. 3.12.13) but the CI runner image still has the old binary (3.12.12), or the CI workflow specifies 3.12.13 but pyenv hasn't released it yet, the directory/binary mismatch causes a persistent failure.
Suggested fix
Update the CI workflow to install a pyenv Python version that matches the currently available CPython release, or make the version list dynamic so it tracks the latest available patch for each minor version.