Skip to content

No workflow job sets timeout-minutes, so a hung job holds a PR blocked for six hours #531

Closed

Description

@scttfrdmn

grep -c timeout-minutes .github/workflows/*.yml returns 0 for all five files. Every job in
ci.yml, security.yml, release.yml, pages.yml and dependabot-automerge.yml therefore
inherits GitHub's default job timeout of 360 minutes.

That default is the wrong shape for a gate. A job that hangs rather than fails does not report, and a
required status check that never reports blocks the merge — so one wedged job holds a pull request for
six hours, and it holds a runner for six hours while doing it. The jobs that can hang without failing
are the ones that wait on something outside the runner:

  • install-script (ci.yml:1272) pulls and runs distro containers and installs packages from a
    mirror. A mirror that accepts the connection and then stalls is a hang, not an error.
  • packaging (ci.yml:827) runs goreleaser, which fetches modules and can shell out to docker.
  • test, coverage and the fuzz-smoke matrix run Go tests. A deadlocked test under -race does
    hit go test's own 10-minute panic, but a test that blocks on a network dial does not.
  • Security Scan in security.yml is a required check and downloads vulnerability databases.

The fix is a timeout-minutes on every job, set from what each one actually takes rather than one
number everywhere — the observed wall times are mostly 1-2 minutes, coverage and packaging
longer. A generous multiple of the observed time still turns a six-hour block into a red check in
minutes, which is the useful outcome: a hung gate should fail so the next push can retry it.

Worth coupling to a test, in the shape of internal/config/labels_test.go: walk
.github/workflows/ and fail on a job with no timeout-minutes. Walked rather than enumerated, for
the same reason TestNoPullRequestTriggerFiltersItsBaseBranch walks — the next workflow to arrive
without one is exactly the case a hard-coded file list cannot see.

Found while watching #136's checks: nothing had hung, but install-script's container pull is the
kind of step that can, and the absence turned out to be repository-wide rather than one job's
oversight.

Activity

  1. added
    type: ci-cd
    priority: medium
    effort: small
    area: ci-cd
    on Sep 18, 2026
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

    area: ci-cdeffort: smallpriority: mediumtype: ci-cd

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions