Skip to content

Commit 3d9ce7c

Browse files
authored
Add timeouts to all GitHub jobs (#2227)
* Add timeouts to all GitHub jobs * Increase merge and push timeouts
1 parent e796b11 commit 3d9ce7c

10 files changed

+51
-2
lines changed

.github/workflows/contributed-recipes.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ on:
2929
jobs:
3030
generate-matrix:
3131
runs-on: ubuntu-24.04
32+
timeout-minutes: 1
3233
outputs:
3334
matrix: ${{ steps.set-matrix.outputs.matrix }}
3435
steps:
@@ -43,6 +44,7 @@ jobs:
4344

4445
test-recipes:
4546
runs-on: ${{ matrix.runs-on }}
47+
timeout-minutes: 5
4648
needs: generate-matrix
4749
if: github.repository_owner == 'jupyter' || github.repository_owner == 'mathbunnyru'
4850

.github/workflows/docker-build-test-upload.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,15 @@ on:
3333
description: GitHub Actions Runner image
3434
required: true
3535
type: string
36+
timeout-minutes:
37+
description: Timeout in minutes
38+
required: true
39+
type: number
3640

3741
jobs:
3842
build-test-upload:
3943
runs-on: ${{ inputs.runs-on }}
44+
timeout-minutes: ${{ inputs.timeout-minutes }}
4045

4146
steps:
4247
- name: Checkout Repo ⚡️

.github/workflows/docker-merge-tags.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ on:
1515
description: Image name
1616
required: true
1717
type: string
18+
timeout-minutes:
19+
description: Timeout in minutes
20+
type: number
21+
default: 25
1822
secrets:
1923
REGISTRY_USERNAME:
2024
required: true
@@ -24,6 +28,7 @@ on:
2428
jobs:
2529
merge-tags:
2630
runs-on: ubuntu-24.04
31+
timeout-minutes: ${{ inputs.timeout-minutes }}
2732

2833
steps:
2934
- name: Checkout Repo ⚡️

.github/workflows/docker-tag-push.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ on:
2020
description: Variant tag prefix
2121
required: true
2222
type: string
23+
timeout-minutes:
24+
description: Timeout in minutes
25+
default: 25
26+
type: number
2327
secrets:
2428
REGISTRY_USERNAME:
2529
required: true
@@ -29,6 +33,7 @@ on:
2933
jobs:
3034
tag-push:
3135
runs-on: ubuntu-24.04
36+
timeout-minutes: ${{ inputs.timeout-minutes }}
3237

3338
steps:
3439
- name: Checkout Repo ⚡️

.github/workflows/docker-wiki-update.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
jobs:
1212
wiki-update:
1313
runs-on: ubuntu-24.04
14+
timeout-minutes: 1
1415

1516
steps:
1617
- name: Checkout Repo ⚡️

.github/workflows/docker.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ jobs:
6767
image: docker-stacks-foundation
6868
platform: aarch64
6969
runs-on: ubuntu-24.04-arm
70+
timeout-minutes: 10
7071

7172
x86_64-foundation:
7273
uses: ./.github/workflows/docker-build-test-upload.yml
@@ -75,6 +76,7 @@ jobs:
7576
image: docker-stacks-foundation
7677
platform: x86_64
7778
runs-on: ubuntu-24.04
79+
timeout-minutes: 10
7880

7981
aarch64-base:
8082
uses: ./.github/workflows/docker-build-test-upload.yml
@@ -83,6 +85,7 @@ jobs:
8385
image: base-notebook
8486
platform: aarch64
8587
runs-on: ubuntu-24.04-arm
88+
timeout-minutes: 15
8689
needs: [aarch64-foundation]
8790

8891
x86_64-base:
@@ -92,6 +95,7 @@ jobs:
9295
image: base-notebook
9396
platform: x86_64
9497
runs-on: ubuntu-24.04
98+
timeout-minutes: 15
9599
needs: [x86_64-foundation]
96100

97101
aarch64-minimal:
@@ -101,6 +105,7 @@ jobs:
101105
image: minimal-notebook
102106
platform: aarch64
103107
runs-on: ubuntu-24.04-arm
108+
timeout-minutes: 15
104109
needs: [aarch64-base]
105110
if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }}
106111

@@ -111,6 +116,7 @@ jobs:
111116
image: minimal-notebook
112117
platform: x86_64
113118
runs-on: ubuntu-24.04
119+
timeout-minutes: 15
114120
needs: [x86_64-base]
115121
if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }}
116122

@@ -121,6 +127,7 @@ jobs:
121127
image: scipy-notebook
122128
platform: aarch64
123129
runs-on: ubuntu-24.04-arm
130+
timeout-minutes: 15
124131
needs: [aarch64-minimal]
125132
if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }}
126133

@@ -131,6 +138,7 @@ jobs:
131138
image: scipy-notebook
132139
platform: x86_64
133140
runs-on: ubuntu-24.04
141+
timeout-minutes: 15
134142
needs: [x86_64-minimal]
135143
if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }}
136144

@@ -141,6 +149,7 @@ jobs:
141149
image: r-notebook
142150
platform: aarch64
143151
runs-on: ubuntu-24.04-arm
152+
timeout-minutes: 15
144153
needs: [aarch64-minimal]
145154
if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }}
146155

@@ -151,6 +160,7 @@ jobs:
151160
image: r-notebook
152161
platform: x86_64
153162
runs-on: ubuntu-24.04
163+
timeout-minutes: 15
154164
needs: [x86_64-minimal]
155165
if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }}
156166

@@ -161,6 +171,8 @@ jobs:
161171
image: julia-notebook
162172
platform: aarch64
163173
runs-on: ubuntu-24.04-arm
174+
# This workflow sometimes takes quite long to build
175+
timeout-minutes: 30
164176
needs: [aarch64-minimal]
165177
if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }}
166178

@@ -171,6 +183,7 @@ jobs:
171183
image: julia-notebook
172184
platform: x86_64
173185
runs-on: ubuntu-24.04
186+
timeout-minutes: 20
174187
needs: [x86_64-minimal]
175188
if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }}
176189

@@ -181,6 +194,7 @@ jobs:
181194
image: tensorflow-notebook
182195
platform: aarch64
183196
runs-on: ubuntu-24.04-arm
197+
timeout-minutes: 15
184198
needs: [aarch64-scipy]
185199
if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }}
186200

@@ -191,6 +205,7 @@ jobs:
191205
image: tensorflow-notebook
192206
platform: x86_64
193207
runs-on: ubuntu-24.04
208+
timeout-minutes: 15
194209
needs: [x86_64-scipy]
195210
if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }}
196211

@@ -202,6 +217,7 @@ jobs:
202217
variant: cuda
203218
platform: x86_64
204219
runs-on: ubuntu-24.04
220+
timeout-minutes: 20
205221
needs: [x86_64-scipy]
206222
if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }}
207223

@@ -212,6 +228,7 @@ jobs:
212228
image: pytorch-notebook
213229
platform: aarch64
214230
runs-on: ubuntu-24.04-arm
231+
timeout-minutes: 20
215232
needs: [aarch64-scipy]
216233
if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }}
217234

@@ -222,6 +239,7 @@ jobs:
222239
image: pytorch-notebook
223240
platform: x86_64
224241
runs-on: ubuntu-24.04
242+
timeout-minutes: 20
225243
needs: [x86_64-scipy]
226244
if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }}
227245

@@ -233,6 +251,7 @@ jobs:
233251
variant: cuda11
234252
platform: x86_64
235253
runs-on: ubuntu-24.04
254+
timeout-minutes: 20
236255
needs: [x86_64-scipy]
237256
if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }}
238257

@@ -244,6 +263,7 @@ jobs:
244263
variant: cuda12
245264
platform: x86_64
246265
runs-on: ubuntu-24.04
266+
timeout-minutes: 20
247267
needs: [x86_64-scipy]
248268
if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }}
249269

@@ -254,6 +274,8 @@ jobs:
254274
image: datascience-notebook
255275
platform: aarch64
256276
runs-on: ubuntu-24.04-arm
277+
# This workflow sometimes takes quite long to build
278+
timeout-minutes: 30
257279
needs: [aarch64-scipy]
258280
if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }}
259281

@@ -264,6 +286,7 @@ jobs:
264286
image: datascience-notebook
265287
platform: x86_64
266288
runs-on: ubuntu-24.04
289+
timeout-minutes: 25
267290
needs: [x86_64-scipy]
268291
if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }}
269292

@@ -274,6 +297,7 @@ jobs:
274297
image: pyspark-notebook
275298
platform: aarch64
276299
runs-on: ubuntu-24.04-arm
300+
timeout-minutes: 20
277301
needs: [aarch64-scipy]
278302
if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }}
279303

@@ -284,6 +308,7 @@ jobs:
284308
image: pyspark-notebook
285309
platform: x86_64
286310
runs-on: ubuntu-24.04
311+
timeout-minutes: 15
287312
needs: [x86_64-scipy]
288313
if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }}
289314

@@ -294,6 +319,7 @@ jobs:
294319
image: all-spark-notebook
295320
platform: aarch64
296321
runs-on: ubuntu-24.04-arm
322+
timeout-minutes: 20
297323
needs: [aarch64-pyspark]
298324
if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }}
299325

@@ -304,6 +330,7 @@ jobs:
304330
image: all-spark-notebook
305331
platform: x86_64
306332
runs-on: ubuntu-24.04
333+
timeout-minutes: 15
307334
needs: [x86_64-pyspark]
308335
if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }}
309336

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ permissions:
1313
jobs:
1414
run-hooks:
1515
runs-on: ubuntu-24.04
16+
timeout-minutes: 5
1617

1718
steps:
1819
- name: Checkout Repo ⚡️

.github/workflows/registry-move.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
update-overview:
2020
# To be able to use the latest skopeo
2121
runs-on: macos-latest
22+
timeout-minutes: 5
2223
if: github.repository_owner == 'jupyter' || github.repository_owner == 'mathbunnyru'
2324

2425
steps:

.github/workflows/registry-overviews.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ on:
1616
jobs:
1717
update-overview:
1818
runs-on: ubuntu-24.04
19+
timeout-minutes: 1
1920
if: github.repository_owner == 'jupyter' || github.repository_owner == 'mathbunnyru'
2021

2122
steps:

.github/workflows/sphinx.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ on:
2424

2525
jobs:
2626
build-docs:
27+
runs-on: ubuntu-24.04
28+
timeout-minutes: 5
29+
if: github.repository_owner == 'jupyter' || github.repository_owner == 'mathbunnyru' || github.event_name != 'schedule'
2730
permissions:
2831
contents: write
29-
if: github.repository_owner == 'jupyter' || github.repository_owner == 'mathbunnyru' || github.event_name != 'schedule'
30-
runs-on: ubuntu-24.04
3132

3233
steps:
3334
- name: Checkout Repo ⚡️

0 commit comments

Comments
 (0)