Fix SIGTERM crash in fenics 3.13 CI job by scoping pytest collection#656
Conversation
|
@copilot now more tests are failing.. pretty sure this is not fixing it. |
The The failures you're seeing are in If the project test SIGTERM failures are also a concern, those would need the same approach applied to |
|
I'm impressed 😄 |
|
We also have issues in Heat with pytest failing in the collection step. See e.g. here. This is with Python 3.11 and exit code 15, though. |
|
Yep. It's flaky. Rerunning the tests multiple times leads to different results. |
The
user_cpu_tests_linux (fenics, 3.13)CI job intermittently dies with exit code 143 (SIGTERM) immediately after pytest prints"collecting ...". The process is killed ~1ms into collection — too fast for OOM killer or timeout — caused by memory pressure from importing all 4,194 test modules inpySDC/testswhen only a single fenics-marked test exists.All
@pytest.mark.fenicstests inpySDC/testslive exclusively intest_tutorials/test_step_7.py. The collection breadth is unnecessarily wide: pytest scans the entire test tree, imports every module, then deselects 4,193 items. Python 3.13 + the fenics package stack is sensitive enough to trigger SIGTERM; 3.10/3.11/3.12 survive the same collection on the same runner.Change
.github/workflows/ci_pipeline.yml: For thefenicsmatrix env, scope pytest collection topySDC/tests/test_tutorialsinstead of all ofpySDC/tests:This drops collection from 4,194 items to ~10, eliminating the memory spike. Functionally equivalent: no fenics-marked tests exist outside
test_tutorials/.