Skip to content

CI: full pytest suite at 39 of the 45 minute timeout (runtime creep) #2044

Description

@jaylfc

The test jobs now run 10063 tests in about 39 minutes under xdist (-n auto) against a 45 minute job timeout. Two more minutes of growth and every run starts dying by timeout, which reads as a hang (this already caused one false incident today).

Scope:

  1. Profile: run pytest --durations=50 in CI once and attach the output; find the slow tail (suspects: full-app fixtures, real sleeps, subprocess waits).
  2. Quick wins: convert real sleeps to fake clocks where trivial, cache the uv venv across runs if not already, check xdist distribution (worksteal scheduler).
  3. Structural: if the tail resists, shard tests into 2 parallel jobs (for example by directory hash) so wall time halves; keep the 45 minute timeout.
  4. Guardrail: add a soft alert (log line or annotation) when suite wall time exceeds 30 minutes.

Acceptance: suite wall time under 25 minutes per job, or sharded so each job is, and the timeout margin is at least 40 percent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    github_actionsPull requests that update GitHub Actions codeinfrastructureBuild system, CI, deploymentkilo-auto-fixAuto-generated label by Kilokilo-triagedAuto-generated label by Kilopython:uvPull requests that update python:uv codetestingTesting and QA

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions