Repository navigation
Description
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 todocker.test,coverageand thefuzz-smokematrix run Go tests. A deadlocked test under-racedoes
hitgo test's own 10-minute panic, but a test that blocks on a network dial does not.Security Scaninsecurity.ymlis 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
fix(ci): bound every workflow job with a timeout-minutes (#531) (#534)
refactor(test): one workflow parser for internal/config (#504) (#540)