Commit Graph

6 Commits

Author SHA1 Message Date
Maciej Lisiewski
0006a5e229 ci: fix PLW1509, PLW1510, PLW2101 linter errors 2026-10-10 15:20:13 +02:00
Teknium
ddfaf76cc6 test(ci): a hung replayed workflow step fails in 30 s instead of hanging the Windows lane
The Windows-only lane killed tests/ci/test_update_ci_routing.py at the
runner's 300 s cap, mid test_replay_rejects_ineffective_required_step, with
no output. workflow_steps._run used subprocess.run(capture_output=True,
timeout=30). On Windows, run() on timeout kills bash and then calls
communicate() with no timeout. Git's bash.exe launcher spawns usr/bin/bash.exe,
which keeps the inherited pipe open, so that read never ends and the
30 s timeout never surfaced.

Capture to files instead of pipes, so the timeout raises and names the step.
A POSIX probe of the same shape (kill the child while a grandchild holds the
pipe) shows the pipe read still blocked after 10 s; the file-backed run
raises at 2 s. On PR #135560, whose diff touches no CI code.
2026-10-09 14:22:08 -07:00
teknium1
effe2ffa14 test(ci): the CI replay names a silent step's exit code
workflow_steps.py is a helper module, not a test module, so pytest does not
rewrite its asserts: a replayed bash step that exits non-zero with empty
stdout/stderr fails as a bare 'AssertionError' with no exit code. Two
Windows arm64 os-tests runs (jobs 112635777217, 112764629268) failed this way
on unmodified baseline replays, and the NTSTATUS needed to tell a crashed
child (0xC0000142 / 0xC0000005) from a bash failure was lost. Put rc (decimal
and hex), the bash used, and both streams in the message.
2026-10-07 07:49:08 -07:00
Teknium
c52a900f13 test: the CI replay puts git on the step's PATH on native Windows too
The replayed steps call git. On Linux os.defpath reaches it; on Windows the
replay's PATH only reached it through the located bash's directory, and Git
for Windows ships a bash.exe in usr\bin with no git.exe beside it. The
Windows arm64 lane resolved that bash and 13 replay cases failed with
"git: command not found" (1e547a814c3 had just put them on the native
Windows lanes). git's own directory now rides along like bash's.
2026-10-06 13:02:14 -07:00
Teknium
855a4b21aa fix: the CI replay starts python3/python and coreutils on native Windows
workflow_steps replaced PATH with the interpreter dir plus os.defpath. A
Windows venv ships only python.exe and os.defpath carries no Git usr/bin,
so replaying the ubuntu `gate-lanes` step (`python3 - <<PY`) died with
`python3: command not found` and the selection steps lost sort/tr/paste/find;
on Linux a missing python3 silently fell through to the host interpreter.

The replay now resolves bash via hermes_platform.resolver, adds that bash's
dir (Git usr/bin on Windows, already on defpath on Linux) after os.defpath,
and drops a disposable python/python3 shim to REPLAY_PYTHON only for a name
the interpreter dir lacks, mirroring setup-python putting both on PATH.
Production YAML is unchanged; on a Linux venv no shim is written.
2026-10-06 13:02:14 -07:00
Teknium
03a8449cd7 test: make update CI replay reject ineffective consumers
Execute gate-lanes and safe selection scripts instead of assuming copied outputs or counting reachable jobs. Check required step conditions, advisory flags, matrix cells, real Windows file enumeration and corpus graph existence. Keep pytest and Playwright at argv-receipt boundaries; no native suites are launched.

(cherry picked from commit d4da1a0266bf2a1ad12309fda35d24302b6b7106)
(cherry picked from commit a295255e8901c57d0c8a768c7b65677553e4f433)
(cherry picked from commit 4fcb270f842c26f05420c2bcfd2d8b69a2f42fa9)
2026-10-06 13:02:14 -07:00