Skip to content

fix(ci): give the test row and the index build own timeouts #4683

Description

@dan-petty

Problem or Motivation

The devops ci check timeout of 1800 s (src/devops_cli/config/defaults.py:353) cannot fire in CI, because the 30-min job limit includes about 30 s of setup. Service Image Tests start pytest.main with no check timeout (.github/workflows/ci.yml:653).

pytest-timeout does not end a hung teardown: a probe ran until the outer kill, rc 124 (measured). docs/TESTING.md:153 says otherwise.

The coverage-index build took 1,627 s of its 1,800 s timeout (measured once), so one 600 s hang makes the index stale.

The owner rule of 2026-11-11 says that each inner timeout is shorter than the one around it (test < step < job).

Saving: None on a green run. A hang gives a clear failure line.

Found by the CI and test audit of 2026-11-11. The account runs at most 20 hosted jobs at one time (measured), so each job that does no work makes the queue of each pull request longer.

Proposed Solution & Architectural Design

  • Add an optional timeout_seconds to CheckSpec (src/devops_cli/commands/ci.py:144-163).
  • Use 900 s for the test row of a --shard run, inside the 20-min job limit of fix(ci): set job timeouts from the measured run times #4677.
  • Wrap the Service Image Tests docker run in timeout --kill-after=30 900 (coreutils).
  • Give the index build its own constant of 3600 s, with a comment that gives the measured time.
  • In docs/TESTING.md:153, say that the row timeout and the job timeout bound a hung teardown.

Risk: Low.

Target Subsystem

SDLC, Git & PR Governance (src/devops_cli/commands/ci.py, src/devops_cli/config/defaults.py, .github/workflows/ci.yml, docs/TESTING.md).

Existing Tool Considered

coreutils timeout and the existing pytest-timeout. No new tool. Cost: about 30,000 tokens and 2 hours.

Acceptance Criteria

  • In a shard run, a probe test with a hung teardown ends at 900 s with a 'timed out' line from devops ci, before the job limit.
  • Service Image Tests end a hung run at 900 s.
  • The index build uses 3600 s.
  • docs/TESTING.md gives the bound.

Dependencies

Depends on #4677.

Alternatives check of 2026-11-14: partly.
Tool: coreutils/coreutils (https://github.com/coreutils/coreutils), GPL-3.0, last activity 2026-11-13, maintained.

Activity

  1. added
    source/agent
    type/bug
    scope/ci
    status/new
    value/medium
    effort/low
    on Nov 11, 2026
  2. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: scope/ci. The (ci) scope of the title gives the scope.
    • Priority: P2-Medium. It prevents hung tests from holding a runner for the full job limit, but it depends on #4677 and does not block a release.
    • Value: Medium. It frees a runner slot within 900 s instead of 30 min, shortening the queue for other pull requests.
    • Effort: Low. The change adds one optional field, two constants, one coreutils wrapper, and one docs line; the candidate estimates about 2 hours.
    • Related: fix(ci): set job timeouts from the measured run times #4677, which asks for a different change. Both implement the owner rule that inner timeouts are shorter than the job timeout, but #4677 sets the job bound and the candidate adds the test-row and index-build bounds inside it.
  3. added
    priority/p2-medium
    on Nov 11, 2026
  4. devops-cli-service commented on Nov 14, 2026

    @devops-cli-service
    Contributor

    Alternatives check: partly

    Reason: The searches turned up no tool that provides a per-check timeout for devops ci or a separate index-build budget; the only candidates are pytest-timeout, which the issue measured as unable to end a hung teardown, and GNU coreutils timeout, which the issue already names. timeout with --kill-after does supply the hard kill that two of the acceptance criteria need, so it covers that part, but the CheckSpec.timeout_seconds field, the 3600 s index-build constant and the docs/TESTING.md bound stay repository work.

    Tool: coreutils/coreutils (https://github.com/coreutils/coreutils)

    • License: GPL-3.0
    • Last activity: 2026-11-13
    • Maintained: yes

    Covers:

    • Ends a hung process at a fixed wall-clock limit, which is what the Service Image Tests docker run needs at 900 s
    • --kill-after=30 sends SIGKILL after the grace period, so a process that ignores SIGTERM still ends
    • The same wrapper bounds the coverage-index build at 3600 s

    Lacks:

    • No per-check timeout_seconds in CheckSpec, so a shard run cannot report its own 'timed out' line from devops ci
    • No separate timeout constant for the index build; the value still has to be added in defaults.py
    • No bound documented in docs/TESTING.md
    • Only bounds a process from outside; it cannot change how pytest-timeout behaves during a hung teardown

    Tools considered:

    Searches run:

    • pytest-timeout does not kill hung teardown, results: 5
    • pytest plugin per-test timeout with hard kill of teardown, results: 5
    • GNU coreutils timeout command kill-after, results: 5
    • pytest-timeout PyPI, results: 5
    • coreutils/coreutils GitHub, results: 5
    • GNU coreutils timeout invocation manual, results: 5

    Sources:

    Checked on 2026-11-14. A person decides what this means for the item. The check changes no label and closes no issue.

  5. added
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 14, 2026
  6. removed
    status/in-review
    on Nov 14, 2026
  7. added a commit that references this issue on Nov 14, 2026
  8. devops-cli-service commented on Nov 14, 2026

    @devops-cli-service
    Contributor
  9. devops-cli-service commented on Nov 14, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-14 15:02 UTC

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/cisource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions