From 5cbb132c1de7fb4c06fd539c347ca0d9ca5cb665 Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Sun, 24 May 2026 18:23:13 -0700 Subject: [PATCH] fix(ci): exclude tests/docker/ from regular test shards; pin read_text encoding MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two CI follow-ups to @benbarclay's #30136 salvage: 1. scripts/run_tests_parallel.py — add 'docker' to _SKIP_PARTS so the new tests/docker/ harness doesn't run in the regular test (N) matrix. The harness builds the real Dockerfile in a session fixture, which can exceed pytest-timeout's 180s ceiling on ubuntu-latest where Docker IS available — it surfaced as 6 identical setup-timeout failures across slices 1–6 on the first CI run. The docker harness has its own dedicated runner via .github/actions/hermes-smoke-test (added in #30136) plus the docker-lint workflow. Same treatment as tests/integration/ and tests/e2e/ — runs separately, not in the main shards. 2. hermes_cli/service_manager.py — pin encoding='utf-8' on the /proc/1/comm read_text call. Ruff PLW1514 enforcement rolled in between Ben's last push and the salvage; pure ruff-fix, no behavior change. --- hermes_cli/service_manager.py | 2 +- scripts/run_tests_parallel.py | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hermes_cli/service_manager.py b/hermes_cli/service_manager.py index 22aa08c4479..b8c2158b8dc 100644 --- a/hermes_cli/service_manager.py +++ b/hermes_cli/service_manager.py @@ -143,7 +143,7 @@ def _s6_running() -> bool: init, or an unrelated process named ``s6-svscan``). """ try: - comm = Path("/proc/1/comm").read_text().strip() + comm = Path("/proc/1/comm").read_text(encoding="utf-8").strip() except OSError: return False if comm != "s6-svscan": diff --git a/scripts/run_tests_parallel.py b/scripts/run_tests_parallel.py index 57178899012..634c6e5e5e9 100755 --- a/scripts/run_tests_parallel.py +++ b/scripts/run_tests_parallel.py @@ -55,7 +55,16 @@ _DEFAULT_ROOTS = ["tests"] # Directories to skip during discovery — the e2e + integration suites # require real services and are run separately. Match exactly the # ``--ignore=`` flags the previous CI command used. -_SKIP_PARTS = {"integration", "e2e"} +# +# ``docker`` joined this list in the salvage of PR #30136: the new +# tests/docker/ harness builds the real Dockerfile in a session +# fixture and runs ``docker run`` against it. On a CI runner where +# Docker IS available (ubuntu-latest), the build can exceed +# pytest-timeout's 180s ceiling and surface as a setup-timeout +# instead of a real test failure. The harness has its own dedicated +# action (.github/actions/hermes-smoke-test) plus the docker-lint +# workflow; it is NOT meant to run in the regular ``test (N)`` shards. +_SKIP_PARTS = {"integration", "e2e", "docker"} # Per-file wall-clock cap. Generous default — pytest-timeout still # enforces per-test caps inside each subprocess; this is just an outer