From e18d246f429b3553edd8c8a82d37251db6c28678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Sat, 26 Sep 2026 11:23:24 -0400 Subject: [PATCH] CI: Test pytest with all third-party plugins disabled (not for merge) pytest auto-loads every installed plugin's entry_points at startup regardless of which command-line flags are used, meaning pytest-xdist, pytest-randomly, and pytest-timeout (and execnet, pytest-xdist's own transport dependency) all get imported and register their hooks even in a plain, single-process, no-"-n" pytest run that never actually uses xdist workers, randomization, or a timeout. Every other angle has been ruled out in this investigation: xdist itself, the pytest.exe launcher stub vs python -m pytest, pytest-timeout's watchdog thread (checked directly in its source: it does not start until after collection succeeds), fd-level output capturing (--capture=no), environment changes from the pip install step (a plain python import still succeeds afterwards), and GRASS's own source code (the crash reproduces identically on both the stale diagnostic base and the current main tip). This disables every third-party plugin explicitly via -p no:X, to see whether bare, plugin-free pytest core collection alone still crashes, or whether one of these auto-loaded plugins is actually responsible. Temporary, for CI investigation only. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/osgeo4w.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/osgeo4w.yml b/.github/workflows/osgeo4w.yml index 96b5a6bb9aa..c7fec50ed0e 100644 --- a/.github/workflows/osgeo4w.yml +++ b/.github/workflows/osgeo4w.yml @@ -133,6 +133,28 @@ jobs: pytest-randomly # Obfuscated usage of GitHub Actions features, Windows CMD shell limits analysis shell: cmd /D /E:ON /V:OFF /S /C "CALL C:/OSGeo4W/OSGeo4W.bat "{0}"" # zizmor: ignore[misfeature] + + - name: "[CI diagnostic, not for merge] pytest with all third-party plugins disabled" + # pytest auto-loads every installed plugin's entry_points at + # startup regardless of which command-line flags are used -- + # meaning pytest-xdist, pytest-randomly, and pytest-timeout + # (and execnet, pytest-xdist's own dependency) all get imported + # and register their hooks even in a plain, single-process, + # no-"-n" pytest run. Every other angle (xdist, the exe + # launcher stub, pytest-timeout's watchdog thread, fd-level + # capture, environment changes from pip install, GRASS's own + # source at both the stale test base and current main) has been + # ruled out in this investigation. This disables every + # third-party plugin explicitly via -p no:X, to see whether + # bare, plugin-free pytest core collection alone still crashes. + run: | + call %OSGEO4W_ROOT%\opt\grass\etc\env.bat + set PYTHONPATH=%GISBASE%\etc\python;%PYTHONPATH% + path %GISBASE%\lib;%GISBASE%\bin;%PATH% + pytest -v -p no:xdist -p no:randomly -p no:timeout -p no:cacheprovider imagery/i.gensig/testsuite/test_i_gensig.py lib/arraystats/tests + # Obfuscated usage of GitHub Actions features, Windows CMD shell limits analysis + shell: cmd /D /E:ON /V:OFF /S /C "CALL C:/OSGeo4W/OSGeo4W.bat "{0}"" # zizmor: ignore[misfeature] + - name: Run pytest with multiple workers in parallel run: | call %OSGEO4W_ROOT%\opt\grass\etc\env.bat