Commit 71870d4
committed
fix(ci): exclude k8s/live from auto-collection to unblock Providers Tests (k8s) job
The parallel ci-tests-providers target passes -m "not serial" to filter
out tests that require a live cluster. tests/providers/k8s/live/conftest.py
registers a pytest_collection_modifyitems hook that stamps the serial marker
on every item in the session — not just items under live/ — so when pytest
descends into that directory the entire 1261-item collection gets marked
serial and -m "not serial" deselects all of them → exit code 5 (no tests
ran).
Fix 1 (primary): add tests/providers/k8s/live to pyproject.toml
norecursedirs, mirroring the existing tests/providers/aws/live entry.
This prevents pytest from descending into live/ during the parallel leg.
The serial ci-tests-providers-serial target points pytest at the path
explicitly so live tests remain reachable when --run-k8s is passed.
Fix 2 (defensive): scope the pytest_collection_modifyitems hook in
live/conftest.py to items whose path is under the live/ directory.
This ensures that if the directory is ever included in a broader
collection again the hook cannot silently poison non-live tests.
Verified locally: 1217 items collected, 1214 passed, 3 pre-existing
failures in statefulset_handler and coverage_gaps tests unrelated to
this change.1 parent d6eb4ba commit 71870d4
2 files changed
Lines changed: 22 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
476 | 476 | | |
477 | 477 | | |
478 | 478 | | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
479 | 488 | | |
480 | 489 | | |
481 | 490 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
32 | 39 | | |
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
36 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
37 | 47 | | |
38 | 48 | | |
39 | | - | |
| 49 | + | |
| 50 | + | |
40 | 51 | | |
41 | 52 | | |
42 | 53 | | |
| |||
0 commit comments