Skip to content

Set timeouts on workflow jobs - #3231

Merged
whi-tw merged 1 commit into
mainfrom
observe-workflow-failures
Nov 3, 2026
Merged

whi-tw merged 1 commit into
mainfrom
observe-workflow-failures

Conversation

@whi-tw

@whi-tw whi-tw commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Ensure that you consider the wider context.
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Has all relevant documentation been updated?

@whi-tw
whi-tw force-pushed the observe-workflow-failures branch 2 times, most recently from 71a1ead to 9b2682d Compare October 20, 2026 13:16
@whi-tw
whi-tw requested a review from theseanything October 20, 2026 13:21
@whi-tw
whi-tw force-pushed the observe-workflow-failures branch from 9b2682d to d3a59cc Compare October 20, 2026 13:29
@whi-tw
whi-tw force-pushed the observe-workflow-failures branch from d3a59cc to 14df8bb Compare October 29, 2026 13:38
@whi-tw
whi-tw marked this pull request as ready for review November 3, 2026 14:59
theseanything
theseanything previously approved these changes Nov 3, 2026
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.
@whi-tw
whi-tw force-pushed the observe-workflow-failures branch from 14df8bb to 117d855 Compare November 3, 2026 15:10
@whi-tw
whi-tw added this pull request to stack #3275 November 3, 2026 15:11
@whi-tw whi-tw mentioned this pull request Nov 3, 2026
2 tasks
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

🎉 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
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

For the sign in details and more information, see the review apps wiki page.

Copilot AI balanced review requested due to automatic review settings November 3, 2026 15:34
@whi-tw
whi-tw enabled stacked auto-merge November 3, 2026 15:35
@whi-tw
whi-tw requested a review from theseanything November 3, 2026 15:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Comment thread .github/workflows/test.yml Resolved
@whi-tw whi-tw changed the title Improve observability of GitHub workflows Set timeouts on workflow jobs Nov 3, 2026
@whi-tw
whi-tw disabled stacked auto-merge November 3, 2026 16:06
@whi-tw
whi-tw enabled stacked auto-merge November 3, 2026 16:06
@whi-tw
whi-tw disabled stacked auto-merge November 3, 2026 16:07
@whi-tw
whi-tw added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit ab92e2e Nov 3, 2026
13 checks passed
@whi-tw
whi-tw deleted the observe-workflow-failures branch November 3, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants