Skip to content

Commit 6008835

Browse files
committed
Add job runtime caps
1 parent c95a387 commit 6008835

19 files changed

Lines changed: 222 additions & 1 deletion

.github/workflows/_release-build.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161
github.event_name == 'push'
6262
&& startsWith(github.event.head_commit.message, 'Release `v')
6363
runs-on: ubuntu-26.04
64+
timeout-minutes: 15
6465
permissions:
6566
issues: write
6667
steps:
@@ -108,6 +109,7 @@ jobs:
108109
metadata:
109110
name: 🧬 Project metadata
110111
runs-on: ubuntu-26.04
112+
timeout-minutes: 15
111113
outputs:
112114
metadata: ${{ steps.metadata.outputs.metadata }}
113115
steps:
@@ -146,6 +148,7 @@ jobs:
146148
- metadata
147149
if: fromJSON(needs.metadata.outputs.metadata).is_python_project
148150
runs-on: ubuntu-26.04
151+
timeout-minutes: 15
149152
steps:
150153
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
151154
with:
@@ -182,6 +185,8 @@ jobs:
182185
${{ fromJSON(needs.metadata.outputs.metadata).release_commits_matrix
183186
|| fromJSON(needs.metadata.outputs.metadata).new_commits_matrix }}
184187
runs-on: ubuntu-26.04
188+
# Wider than the default: this job provisions a toolchain, so its runtime tracks how much it has to install.
189+
timeout-minutes: 30
185190
permissions:
186191
id-token: write
187192
steps:

.github/workflows/_release-engine.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
metadata:
4545
name: 🧬 Project metadata
4646
runs-on: ubuntu-26.04
47+
timeout-minutes: 15
4748
outputs:
4849
has_virustotal_key: ${{ steps.check-vt-key.outputs.has_key }}
4950
metadata: ${{ steps.metadata.outputs.metadata }}
@@ -486,6 +487,7 @@ jobs:
486487
strategy:
487488
matrix: ${{ fromJSON(needs.metadata.outputs.metadata).release_commits_matrix }}
488489
runs-on: ubuntu-26.04
490+
timeout-minutes: 15
489491
permissions:
490492
contents: write
491493
steps:
@@ -522,6 +524,7 @@ jobs:
522524
strategy:
523525
matrix: ${{ fromJSON(needs.metadata.outputs.metadata).release_commits_matrix }}
524526
runs-on: ubuntu-26.04
527+
timeout-minutes: 15
525528
permissions:
526529
# Allow project without REPOMATIC_PAT to create a GitHub release.
527530
contents: write
@@ -598,6 +601,7 @@ jobs:
598601
strategy:
599602
matrix: ${{ fromJSON(needs.metadata.outputs.metadata).release_commits_matrix }}
600603
runs-on: ubuntu-26.04
604+
timeout-minutes: 15
601605
permissions:
602606
attestations: write
603607
contents: write
@@ -684,6 +688,7 @@ jobs:
684688
strategy:
685689
matrix: ${{ fromJSON(needs.metadata.outputs.metadata).release_commits_matrix }}
686690
runs-on: ubuntu-26.04
691+
timeout-minutes: 15
687692
permissions:
688693
attestations: write
689694
contents: write
@@ -781,6 +786,7 @@ jobs:
781786
strategy:
782787
matrix: ${{ fromJSON(needs.metadata.outputs.metadata).release_commits_matrix }}
783788
runs-on: ubuntu-26.04
789+
timeout-minutes: 15
784790
permissions:
785791
contents: write
786792
steps:
@@ -950,6 +956,7 @@ jobs:
950956
group: sync-dev-release-${{ github.repository }}
951957
cancel-in-progress: false
952958
runs-on: ubuntu-26.04
959+
timeout-minutes: 15
953960
permissions:
954961
contents: write
955962
steps:
@@ -982,6 +989,7 @@ jobs:
982989
fromJSON(needs.metadata.outputs.metadata).is_python_project
983990
&& fromJSON(needs.metadata.outputs.metadata).release_commits_matrix
984991
runs-on: ubuntu-26.04
992+
timeout-minutes: 15
985993
permissions:
986994
contents: write
987995
pull-requests: write

.github/workflows/autofix.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
(github.event_name == 'push' || github.event_name == 'workflow_dispatch')
5151
&& !startsWith(github.event.head_commit.message || '', '[changelog] ')
5252
runs-on: ubuntu-26.04
53+
timeout-minutes: 15
5354
permissions:
5455
issues: write
5556
steps:
@@ -75,6 +76,7 @@ jobs:
7576
# repomatic/runner_images.py for why the announcement feed is the source.
7677
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
7778
runs-on: ubuntu-26.04
79+
timeout-minutes: 15
7880
permissions:
7981
issues: write
8082
steps:
@@ -105,6 +107,7 @@ jobs:
105107
github.head_ref)
106108
&& !startsWith(github.event.head_commit.message || '', '[changelog] ')
107109
runs-on: ubuntu-26.04
110+
timeout-minutes: 15
108111
outputs:
109112
metadata: ${{ steps.metadata.outputs.metadata }}
110113
steps:
@@ -131,6 +134,7 @@ jobs:
131134
# Ruff can format code in both Python and Markdown files.
132135
if: fromJSON(needs.metadata.outputs.metadata).python_files || fromJSON(needs.metadata.outputs.metadata).doc_files
133136
runs-on: ubuntu-26.04
137+
timeout-minutes: 15
134138
permissions:
135139
contents: write
136140
pull-requests: write
@@ -172,6 +176,7 @@ jobs:
172176
- metadata
173177
if: fromJSON(needs.metadata.outputs.metadata).is_python_project
174178
runs-on: ubuntu-26.04
179+
timeout-minutes: 15
175180
permissions:
176181
contents: write
177182
pull-requests: write
@@ -209,6 +214,7 @@ jobs:
209214
# way: `repomatic run mdformat` provisions that through mdformat's
210215
# `path_tools` instead of apt. See docs/test-matrix.md.
211216
runs-on: ubuntu-26.04
217+
timeout-minutes: 15
212218
permissions:
213219
contents: write
214220
pull-requests: write
@@ -251,6 +257,7 @@ jobs:
251257
- metadata
252258
if: fromJSON(needs.metadata.outputs.metadata).shfmt_files
253259
runs-on: ubuntu-26.04
260+
timeout-minutes: 15
254261
permissions:
255262
contents: write
256263
pull-requests: write
@@ -285,6 +292,7 @@ jobs:
285292
- metadata
286293
if: fromJSON(needs.metadata.outputs.metadata).json_files
287294
runs-on: ubuntu-26.04
295+
timeout-minutes: 15
288296
permissions:
289297
contents: write
290298
pull-requests: write
@@ -321,6 +329,7 @@ jobs:
321329
if: >
322330
!startsWith(github.event.head_commit.message || '', '[changelog] ')
323331
runs-on: ubuntu-26.04
332+
timeout-minutes: 15
324333
permissions:
325334
contents: write
326335
pull-requests: write
@@ -357,6 +366,7 @@ jobs:
357366
- metadata
358367
if: fromJSON(needs.metadata.outputs.metadata).is_python_project
359368
runs-on: ubuntu-26.04
369+
timeout-minutes: 15
360370
permissions:
361371
contents: write
362372
pull-requests: write
@@ -392,6 +402,7 @@ jobs:
392402
if: >
393403
!startsWith(github.event.head_commit.message || '', '[changelog] ')
394404
runs-on: ubuntu-26.04
405+
timeout-minutes: 15
395406
permissions:
396407
contents: write
397408
pull-requests: write
@@ -422,6 +433,7 @@ jobs:
422433
- metadata
423434
if: fromJSON(needs.metadata.outputs.metadata).image_files
424435
runs-on: ubuntu-26.04
436+
timeout-minutes: 15
425437
permissions:
426438
contents: write
427439
pull-requests: write
@@ -465,6 +477,7 @@ jobs:
465477
- metadata
466478
if: fromJSON(needs.metadata.outputs.metadata).gitignore_exists
467479
runs-on: ubuntu-26.04
480+
timeout-minutes: 15
468481
permissions:
469482
contents: write
470483
pull-requests: write
@@ -489,6 +502,7 @@ jobs:
489502
# ([tool.uv] package = false) has a [project] table but nothing to version.
490503
if: fromJSON(needs.metadata.outputs.metadata).is_python_package
491504
runs-on: ubuntu-26.04
505+
timeout-minutes: 15
492506
permissions:
493507
contents: write
494508
pull-requests: write
@@ -511,6 +525,7 @@ jobs:
511525
- metadata
512526
if: fromJSON(needs.metadata.outputs.metadata).mailmap_exists
513527
runs-on: ubuntu-26.04
528+
timeout-minutes: 15
514529
permissions:
515530
contents: write
516531
pull-requests: write
@@ -558,6 +573,7 @@ jobs:
558573
needs:
559574
- metadata
560575
runs-on: ubuntu-26.04
576+
timeout-minutes: 15
561577
permissions:
562578
contents: write
563579
pull-requests: write
@@ -704,6 +720,7 @@ jobs:
704720
fromJSON(needs.metadata.outputs.metadata).is_python_project
705721
&& fromJSON(needs.metadata.outputs.metadata).active_autodoc
706722
runs-on: ubuntu-26.04
723+
timeout-minutes: 15
707724
permissions:
708725
contents: write
709726
pull-requests: write

.github/workflows/autolock.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
lock:
2828
name: 🔒 Lock inactive threads
2929
runs-on: ubuntu-26.04
30+
# Wider than the default: this job provisions a toolchain, so its runtime tracks how much it has to install.
31+
timeout-minutes: 30
3032
permissions:
3133
contents: read
3234
issues: write

.github/workflows/cancel-runs.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
name: ✂️ Cancel PR runs
3333
if: github.event.pull_request.number
3434
runs-on: ubuntu-26.04
35+
timeout-minutes: 15
3536
permissions:
3637
actions: write
3738
steps:

.github/workflows/changelog.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ jobs:
7272
github.event_name == 'push' ||
7373
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
7474
runs-on: ubuntu-26.04
75+
timeout-minutes: 15
7576
outputs:
7677
metadata: ${{ steps.metadata.outputs.metadata }}
7778
steps:
@@ -103,6 +104,7 @@ jobs:
103104
github.event_name == 'workflow_run'
104105
|| !fromJSON(needs.metadata.outputs.metadata).release_commits_matrix
105106
runs-on: ubuntu-26.04
107+
timeout-minutes: 15
106108
permissions:
107109
contents: write
108110
pull-requests: write
@@ -134,6 +136,7 @@ jobs:
134136
- metadata
135137
# Always run since metadata already filters appropriate events.
136138
runs-on: ubuntu-26.04
139+
timeout-minutes: 15
137140
permissions:
138141
contents: write
139142
pull-requests: write
@@ -218,6 +221,7 @@ jobs:
218221
# the branch is already current, so the extra run is cheap and idempotent.
219222
if: github.event_name != 'schedule'
220223
runs-on: ubuntu-26.04
224+
timeout-minutes: 15
221225
permissions:
222226
contents: write
223227
pull-requests: write

.github/workflows/debug.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
metadata:
4242
name: 🧬 Project metadata
4343
runs-on: ubuntu-26.04
44+
timeout-minutes: 15
4445
outputs:
4546
build_targets: ${{ steps.extend-matrix.outputs.targets }}
4647
steps:
@@ -75,6 +76,8 @@ jobs:
7576
matrix:
7677
include: ${{ fromJSON(needs.metadata.outputs.build_targets) }}
7778
runs-on: ${{ matrix.os }}
79+
# Wider than the default: this job provisions a toolchain, so its runtime tracks how much it has to install.
80+
timeout-minutes: 30
7881
steps:
7982
# `toJSON()` already pretty-prints, so each context reaches the log
8083
# readable with no jq in the way, which also keeps this step identical on

.github/workflows/docs.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
metadata:
4444
name: 🧬 Project metadata
4545
runs-on: ubuntu-26.04
46+
timeout-minutes: 15
4647
outputs:
4748
metadata: ${{ steps.metadata.outputs.metadata }}
4849
steps:
@@ -65,6 +66,8 @@ jobs:
6566
fromJSON(needs.metadata.outputs.metadata).is_python_project
6667
&& fromJSON(needs.metadata.outputs.metadata).is_sphinx
6768
runs-on: ubuntu-26.04
69+
# Wider than the default: this job provisions a toolchain, so its runtime tracks how much it has to install.
70+
timeout-minutes: 30
6871
permissions:
6972
id-token: write
7073
pages: write
@@ -125,6 +128,11 @@ jobs:
125128
# once ran on a lean image with a 15-minute job cap, which killed the whole
126129
# crawl outright rather than failing a step.
127130
runs-on: ubuntu-26.04-arm
131+
# Widest cap in the repository, for the reason just above: this crawl is the
132+
# one job whose runtime is set by other people's servers. Triple the 15
133+
# minutes that already killed it once, against a measured 10.4-minute worst
134+
# case, so the growth has somewhere to go.
135+
timeout-minutes: 45
128136
steps:
129137
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
130138
- uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0

.github/workflows/labels.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ jobs:
5555
github.head_ref)
5656
&& !startsWith(github.event.head_commit.message || '', '[changelog] ')
5757
runs-on: ubuntu-26.04
58+
timeout-minutes: 15
5859
outputs:
5960
metadata: ${{ steps.metadata.outputs.metadata }}
6061
steps:
@@ -74,6 +75,7 @@ jobs:
7475
# Restrict job to the main branch pushes and workflow calls only, as this is a project-management task.
7576
if: github.event_name == 'push' || github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch'
7677
runs-on: ubuntu-26.04
78+
timeout-minutes: 15
7779
permissions:
7880
issues: write
7981
steps:
@@ -102,6 +104,7 @@ jobs:
102104
(github.event_name == 'pull_request' || github.event_name == 'issues')
103105
&& (! fromJSON(needs.metadata.outputs.metadata).is_bot)
104106
runs-on: ubuntu-26.04
107+
timeout-minutes: 15
105108
permissions:
106109
contents: read
107110
issues: write
@@ -126,6 +129,7 @@ jobs:
126129
(github.event_name == 'pull_request' || github.event_name == 'issues')
127130
&& (! fromJSON(needs.metadata.outputs.metadata).is_bot)
128131
runs-on: ubuntu-26.04
132+
timeout-minutes: 15
129133
permissions:
130134
issues: write
131135
pull-requests: write

0 commit comments

Comments
 (0)