Repository navigation
Commit 01da132
fix: Resolve kserve with pip --dry-run instead of installing it
test_install_kserve_with_feast installed kserve into the interpreter
running the suite, with no isolation and no cleanup, so it mutated the
environment every other test was using.
Feast pins psutil==5.9.0 and kserve requires psutil>=5.9.6, so pip could
not leave the installed version alone: it uninstalled psutil before
reinstalling 5.9.8. The unit suite runs pytest -n 8 against one
environment, so any test importing psutil in that window failed,
including every test that shells out to the CLI, since feast.metrics
imports it at module scope. That is how an unrelated docs PR got a red
unit-test-python job on test_3rd_party_providers with ModuleNotFoundError:
No module named 'psutil'. Being timing-dependent, it read as flake.
kserve also pulled protobuf down to 4.25.x, which left the environment
broken for the next run: the installed grpcio-health-checking ships
protobuf 6.x gencode importing google.protobuf.runtime_version. The first
run passed because collection imports precede the mid-run install; the
second failed at collection.
--dry-run performs the same resolution and still exits non-zero when the
versions cannot be satisfied together, which is what the test guards
against, without installing anything. Verified both directions: a clean
resolution exits 0 and leaves psutil at 5.9.0 with kserve not importable,
and 'pip install --dry-run kserve==0.15.2 psutil==5.9.0' exits 1 with
conflicting dependencies.
Also replaces the conflict assertion, which was inverted - it was only
true when pip reported conflicts without an error, so a loud failure set
it to False. The exit code was already doing the real work; it now
carries pip's output for diagnosis.
The full unit suite now passes twice in a row: 2529 passed, 20 skipped
both times, with psutil and protobuf unchanged after the first.
Closes #6732
Signed-off-by: Larry Singleton <[email protected]>1 parent a9219d9 commit 01da132
1 file changed
Lines changed: 29 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
13 | 25 | | |
14 | | - | |
15 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
16 | 34 | | |
17 | 35 | | |
18 | 36 | | |
| |||
26 | 44 | | |
27 | 45 | | |
28 | 46 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
0 commit comments