Repository navigation
Set timeouts on workflow jobs - #3231
Conversation
71a1ead to
9b2682d
Compare
9b2682d to
d3a59cc
Compare
d3a59cc to
14df8bb
Compare
Jobs default to a six hour timeout, so a hung job ties up a runner and delays the merge queue. Limits are well above normal run times.
14df8bb to
117d855
Compare
|
🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-3231.admin.review.forms.service.gov.uk/ It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready For the sign in details and more information, see the review apps wiki page. |
There was a problem hiding this comment.
🟡 Changes recommended
The patch adds only job timeouts and lacks the scheduled, manually dispatchable weekly CI digest workflow promised in the description, so the workflow must be added or the description corrected.
1 open issue
What changed in this PR
This PR adds bounded execution times to existing GitHub Actions jobs so hung CI tasks stop sooner. The supplied changes cover job timeouts within the broader workflow observability effort described in the PR.
Changes:
- Set the build-and-test job timeout to 20 minutes.
- Set the Terraform job timeout to 15 minutes.
| File | Description |
|---|---|
.github/workflows/test.yml |
Adds a 20-minute build-and-test timeout. |
.github/workflows/terraform.yml |
Adds a 15-minute Terraform timeout. |
Review effort: Balanced

What problem does this pull request solve?
Trello card: https://trello.com/c/jPeqHHPu/772-improve-the-observability-of-our-github-workflows
Jobs have no
timeout-minutes, so a hung job runs for GitHub's six hour default. This sets one on every job that runs on a runner. Terraform gets 15 minutes and the test job 20. The limits are well above normal run times and only catch hangs.Jobs that only call a reusable workflow cannot set a timeout; their limits come from forms-deploy. Once govuk-forms/forms-deploy#2332 merges, the shared workflow lint fails any job that has none.
Things to consider when reviewing