Skip to content

Commit

Permalink
Time out Buildkite test steps after 10 minutes (#842)
Browse files Browse the repository at this point in the history
Our projects should aim for a shorter duration for testing and linting.
Taking longer than 10 minutes usually indicates a command or request has
hung and will indefinitely hog the build agent, so we define a timeout.
  • Loading branch information
72636c authored Apr 14, 2022
1 parent cded9f0 commit e76c28d
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .changeset/honest-apes-vanish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
'skuba': patch
---

template: Time out Buildkite test steps after 10 minutes

Successful testing and linting should complete within this window. This timeout prevents commands from hanging and indefinitely preoccupying your Buildkite agents.

```diff
steps:
- label: 🧪 Test & Lint
+ timeout_in_minutes: 10
```
1 change: 1 addition & 0 deletions template/express-rest-api/.buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ steps:
- *docker-ecr-cache
- docker-compose#v3.9.0:
run: app
timeout_in_minutes: 10

- label: 📦 Build & Package
depends_on: warm-prod
Expand Down
1 change: 1 addition & 0 deletions template/greeter/.buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ steps:
- *docker-ecr-cache
- docker-compose#v3.9.0:
run: app
timeout_in_minutes: 10
1 change: 1 addition & 0 deletions template/koa-rest-api/.buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ steps:
- *docker-ecr-cache
- docker-compose#v3.9.0:
run: app
timeout_in_minutes: 10

- label: 📦 Build & Package
depends_on: warm-prod
Expand Down
1 change: 1 addition & 0 deletions template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ steps:
- *docker-ecr-cache
- docker-compose#v3.9.0:
run: app
timeout_in_minutes: 10

- agents:
queue: <%- devBuildkiteQueueName %>
Expand Down
1 change: 1 addition & 0 deletions template/lambda-sqs-worker/.buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ steps:
- *docker-ecr-cache
- docker-compose#v3.9.0:
run: app
timeout_in_minutes: 10

- agents:
queue: <%- devBuildkiteQueueName %>
Expand Down

0 comments on commit e76c28d

Please sign in to comment.