Skip to content

Commit 00a3f8b

Browse files
ci: add per-step timeouts to fail fast on apt/registry hangs (#20031)
Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
1 parent 5ea4edd commit 00a3f8b

35 files changed

Lines changed: 142 additions & 0 deletions

.github/workflows/check_make_vtadmin_authz_testgen.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
5151
- name: Tune the OS
5252
if: steps.changes.outputs.vtadmin_changes == 'true'
53+
timeout-minutes: 5
5354
uses: ./.github/actions/tune-os
5455

5556
- name: Set up Go
@@ -61,6 +62,7 @@ jobs:
6162

6263
- name: Get dependencies
6364
if: steps.changes.outputs.vtadmin_changes == 'true'
65+
timeout-minutes: 5
6466
run: |
6567
sudo apt-get update
6668
sudo apt-get install -y make unzip g++ etcd-client etcd-server curl git wget
@@ -70,6 +72,7 @@ jobs:
7072
7173
- name: Run make minimaltools
7274
if: steps.changes.outputs.vtadmin_changes == 'true'
75+
timeout-minutes: 5
7376
run: |
7477
make minimaltools
7578

.github/workflows/check_make_vtadmin_web_proto.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
persist-credentials: 'false'
3434

3535
- name: Tune the OS
36+
timeout-minutes: 5
3637
uses: ./.github/actions/tune-os
3738

3839
- name: Check for changes in relevant files

.github/workflows/cluster_endtoend.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,20 +138,24 @@ jobs:
138138

139139
- name: Tune the OS
140140
if: steps.changes.outputs.end_to_end == 'true'
141+
timeout-minutes: 5
141142
uses: ./.github/actions/tune-os
142143

143144
- name: Setup MySQL
144145
if: steps.changes.outputs.end_to_end == 'true' && !contains(matrix.needs, 'xtrabackup')
146+
timeout-minutes: 8
145147
uses: ./.github/actions/setup-mysql
146148
with:
147149
flavor: mysql-8.4
148150

149151
- name: Setup Percona Apt repository
150152
if: steps.changes.outputs.end_to_end == 'true' && contains(matrix.needs, 'xtrabackup')
153+
timeout-minutes: 5
151154
uses: ./.github/actions/setup-percona-repo
152155

153156
- name: Setup Percona Server and XtraBackup
154157
if: steps.changes.outputs.end_to_end == 'true' && contains(matrix.needs, 'xtrabackup')
158+
timeout-minutes: 5
155159
run: |
156160
sudo percona-release setup pdps8.0
157161
sudo percona-release setup pxb-80
@@ -178,10 +182,12 @@ jobs:
178182
179183
- name: Install Minio
180184
if: steps.changes.outputs.end_to_end == 'true' && contains(matrix.needs, 'minio')
185+
timeout-minutes: 5
181186
uses: ./.github/actions/setup-minio
182187

183188
- name: Install Consul and ZooKeeper
184189
if: steps.changes.outputs.end_to_end == 'true' && contains(matrix.needs, 'consul')
190+
timeout-minutes: 5
185191
run: make BUILD_PROTOC=0 tools
186192

187193
- name: Setup launchable dependencies

.github/workflows/codecov.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,19 @@ jobs:
111111

112112
- name: Tune the OS
113113
if: steps.mode.outputs.is_full_run == 'true' || (steps.changes.outputs.changed_files == 'true' && steps.packages.outputs.packages != '')
114+
timeout-minutes: 5
114115
uses: ./.github/actions/tune-os
115116

116117
- name: Setup MySQL
117118
if: steps.mode.outputs.is_full_run == 'true' || (steps.changes.outputs.changed_files == 'true' && steps.packages.outputs.packages != '')
119+
timeout-minutes: 8
118120
uses: ./.github/actions/setup-mysql
119121
with:
120122
flavor: mysql-8.4
121123

122124
- name: Get dependencies
123125
if: steps.mode.outputs.is_full_run == 'true' || (steps.changes.outputs.changed_files == 'true' && steps.packages.outputs.packages != '')
126+
timeout-minutes: 5
124127
run: |
125128
export DEBIAN_FRONTEND="noninteractive"
126129
sudo apt-get update
@@ -132,6 +135,7 @@ jobs:
132135
133136
- name: Run make tools
134137
if: steps.mode.outputs.is_full_run == 'true' || (steps.changes.outputs.changed_files == 'true' && steps.packages.outputs.packages != '')
138+
timeout-minutes: 10
135139
run: |
136140
make BUILD_JAVA=0 BUILD_PROTOC=0 tools
137141

.github/workflows/codeql_analysis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,12 @@ jobs:
4343
cache: ${{ (github.base_ref == 'main' || (github.base_ref == '' && github.ref_name == 'main')) && 'true' || 'false' }}
4444

4545
- name: Tune the OS
46+
timeout-minutes: 5
4647
uses: ./.github/actions/tune-os
4748

4849
# Initializes the CodeQL tools for scanning.
4950
- name: Initialize CodeQL
51+
timeout-minutes: 5
5052
uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
5153
with:
5254
languages: ${{ matrix.language }}
@@ -58,6 +60,7 @@ jobs:
5860
# queries: security-extended,security-and-quality
5961

6062
- name: Setup MySQL
63+
timeout-minutes: 8
6164
uses: ./.github/actions/setup-mysql
6265
with:
6366
flavor: mysql-8.4
@@ -79,6 +82,7 @@ jobs:
7982
make build
8083
8184
- name: Perform CodeQL Analysis
85+
timeout-minutes: 15
8286
uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
8387

8488
- name: Slack Workflow Notification

.github/workflows/create_release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ jobs:
3535
cache: 'false'
3636

3737
- name: Tune the OS
38+
timeout-minutes: 5
3839
uses: ./.github/actions/tune-os
3940

4041
- name: Get dependencies
42+
timeout-minutes: 5
4143
run: |
4244
sudo apt-get update
4345
sudo apt-get install -y make ruby ruby-dev

.github/workflows/docker_build_images.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747
4848
- name: Build and push on main
4949
if: startsWith(github.ref, 'refs/tags/') == false
50+
timeout-minutes: 15
5051
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
5152
with:
5253
context: .
@@ -68,6 +69,7 @@ jobs:
6869
6970
- name: Build and push on tags
7071
if: startsWith(github.ref, 'refs/tags/')
72+
timeout-minutes: 15
7173
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
7274
with:
7375
context: .
@@ -107,6 +109,7 @@ jobs:
107109
108110
- name: Build and push on main
109111
if: startsWith(github.ref, 'refs/tags/') == false
112+
timeout-minutes: 15
110113
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
111114
with:
112115
context: .
@@ -132,6 +135,7 @@ jobs:
132135
133136
- name: Build and push on tags
134137
if: startsWith(github.ref, 'refs/tags/')
138+
timeout-minutes: 15
135139
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
136140
with:
137141
context: .
@@ -170,6 +174,7 @@ jobs:
170174
171175
- name: Build and push on main latest tag
172176
if: startsWith(github.ref, 'refs/tags/') == false && matrix.debian == 'bookworm'
177+
timeout-minutes: 15
173178
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
174179
with:
175180
context: ${{ env.DOCKER_CTX }}
@@ -181,6 +186,7 @@ jobs:
181186
182187
- name: Build and push on main debian specific tag
183188
if: startsWith(github.ref, 'refs/tags/') == false
189+
timeout-minutes: 15
184190
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
185191
with:
186192
context: ${{ env.DOCKER_CTX }}
@@ -213,6 +219,7 @@ jobs:
213219
# Build and Push component image to DOCKER_TAG, applies to both debian version
214220
- name: Build and push on tags using Debian extension
215221
if: startsWith(github.ref, 'refs/tags/')
222+
timeout-minutes: 15
216223
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
217224
with:
218225
context: ${{ env.DOCKER_CTX }}
@@ -226,6 +233,7 @@ jobs:
226233
# It is fine to build a second time here when "matrix.debian == 'bookworm'" as we have cached the first build already
227234
- name: Build and push on tags without Debian extension
228235
if: startsWith(github.ref, 'refs/tags/') && matrix.debian == 'bookworm'
236+
timeout-minutes: 15
229237
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
230238
with:
231239
context: ${{ env.DOCKER_CTX }}

.github/workflows/docker_ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ jobs:
6969
7070
- name: Build bootstrap images
7171
if: steps.changes.outputs.end_to_end == 'true'
72+
timeout-minutes: 15
7273
uses: ./.github/actions/build-bootstrap
7374
with:
7475
bootstrap-version: ${{ env.BOOTSTRAP_VERSION }}
@@ -83,9 +84,11 @@ jobs:
8384

8485
- name: Tune the OS
8586
if: steps.changes.outputs.end_to_end == 'true'
87+
timeout-minutes: 5
8688
uses: ./.github/actions/tune-os
8789

8890
- name: Run docker tests - ${{ matrix.shard }}
8991
if: steps.changes.outputs.end_to_end == 'true'
92+
timeout-minutes: 20
9093
run: |
9194
go run test.go -docker=true -pull=false -flavor=${{ env.BOOTSTRAP_FLAVOR }} -bootstrap-version=${{ env.BOOTSTRAP_VERSION }} --follow -shard ${{ matrix.shard }}

.github/workflows/docker_lite_build_check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
persist-credentials: 'false'
5858

5959
- name: Build lite image
60+
timeout-minutes: 15
6061
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
6162
with:
6263
context: .

.github/workflows/e2e_race.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,19 @@ jobs:
5959

6060
- name: Tune the OS
6161
if: steps.changes.outputs.end_to_end == 'true'
62+
timeout-minutes: 5
6263
uses: ./.github/actions/tune-os
6364

6465
- name: Setup MySQL
6566
if: steps.changes.outputs.end_to_end == 'true'
67+
timeout-minutes: 8
6668
uses: ./.github/actions/setup-mysql
6769
with:
6870
flavor: mysql-8.4
6971

7072
- name: Get dependencies
7173
if: steps.changes.outputs.end_to_end == 'true'
74+
timeout-minutes: 5
7275
run: |
7376
sudo apt-get update
7477
@@ -81,6 +84,7 @@ jobs:
8184
8285
- name: Run make minimaltools
8386
if: steps.changes.outputs.end_to_end == 'true'
87+
timeout-minutes: 5
8488
run: |
8589
make minimaltools
8690

0 commit comments

Comments
 (0)