Skip to content

CI: bound the test run so a hung container engine names the stuck test - #54

Draft
Deep-Sixed wants to merge 1 commit into
mainfrom
claude/sweet-bardeen-ci-timeouts
Draft

Deep-Sixed wants to merge 1 commit into
mainfrom
claude/sweet-bardeen-ci-timeouts

Conversation

@Deep-Sixed

Copy link
Copy Markdown
Owner

Why

linux-containment hung twice on one PR (#45). Each time it stopped inside a docker process after an hour with no output, and had to be cancelled by hand. The log couldn't say which test was stuck, so the cause had to be guessed. About 20 other runs that day finished in 3–4 minutes.

Changes

  • pytest-timeout (new dev dependency) with --timeout=600 on both test jobs. A test running longer than 10 minutes fails with its name and a stack dump, and the run carries on with the rest. The longest real test takes seconds.
  • timeout-minutes: 30 on linux-containment and portability (the suite takes about 4 minutes). This bounds whatever a test timeout can't catch, such as a hung install or image pull.
  • Not -v: the job's "no skips allowed" guard reads SKIPPED lines, and verbose output would print one per skipped test.
  • Left alone: parser-images.yml, which already has timeout-minutes: 120 and runs long model tests on purpose.

Checked

  • A throwaway test that blocks on a child process (sleep 60, standing in for a docker call that never answers) with --timeout=3 fails alone, names itself with Failed: Timeout (>3.0s) from pytest-timeout, and the tests around it pass. Nothing is left running afterwards.
  • The full suite passes with --timeout=600 (864 passed, 89 skipped).

🤖 Generated with Claude Code

https://claude.ai/code/session_013p3FU6gUJ1MGinnmEgvHsm


Generated by Claude Code

linux-containment hung twice on one PR (an hour with no output, cancelled by
hand), stopping inside a docker process with nothing to say which test it
was. Now:
- pytest-timeout (dev dependency): --timeout=600 fails a test that runs
  longer than 10 minutes, with its name and a stack dump, and the run
  carries on. The longest real test takes seconds. Not -v, which would make
  every skip line trip the job's "no skips" guard.
- timeout-minutes: 30 on linux-containment and portability (the suite takes
  about 4 minutes), bounding whatever a test timeout cannot catch.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013p3FU6gUJ1MGinnmEgvHsm

Copy link
Copy Markdown
Owner Author

#54 overlaps with #50, which looks like the better PR. I suggest closing this one in favour of it; I haven't closed it myself.

#50 (opened 2026-09-26) reproduced the linux-containment hang and found the cause. gVisor's default systrap platform hangs on some runners, and docker rm -f can't remove the stuck sandbox. #50 probes the platform per runner and falls back to ptrace. It also adds everything this PR does: pytest-timeout, a job timeout-minutes: 30 and a per-test timeout (120s, stricter than my 600s), plus the regenerated uv.lock that this PR lacks.

The two touch the same lines of .github/workflows/test.yml and pyproject.toml, so they conflict with each other. This PR only bounds the damage of a hang. #50 prevents it.

This PR's --timeout=600 run did pass in CI (all 5 checks, Linux job in 4 minutes), so the timeout mechanism itself works.


Generated by Claude Code


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants