Skip to content

Commit 2f9144e

Browse files
authored
improvement(ci): timeouts, docs-only PR skip, fork-isolated caches, Node pin; remove i18n workflow (#5714)
* improvement(ci): job timeouts everywhere, docs-only PR skip, event-scoped sticky disks, Node pin; drop dead i18n workflow - timeout-minutes on every runnable job (defaults ran hung jobs to the 6-hour cap — the i18n workflow burned three full 6-hour runs in Feb before its schedule was pulled) - paths-ignore on the pull_request trigger: docs content and markdown don't affect the app build or images; push runs stay unfiltered - sticky-disk keys scoped by event name so fork PR runs never share a disk with the push runs that feed production image builds - node-version pinned to 22 (was 'latest', non-deterministic) - delete i18n.yml: schedule already removed after repeated 6-hour hangs, workflow_dispatch-only since, comments stale * improvement(ci): 45m migrate timeout (covers 30m lock wait), fork-namespaced PR sticky disks - migrate.ts waits up to 30 minutes for the migration advisory lock (LOCK_ACQUIRE_DEADLINE_MS); the 15m job timeout would preempt that designed wait, so the bound is 45m - fork PRs now get their own sticky-disk namespace so an untrusted fork run can't poison the disks that trusted internal-PR runs restore
1 parent 46f6a9b commit 2f9144e

9 files changed

Lines changed: 35 additions & 187 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
branches: [main, staging, dev]
66
pull_request:
77
branches: [main, staging, dev]
8+
# Docs content and markdown don't affect the app build or images; push
9+
# runs stay unfiltered because they feed the deploy pipeline.
10+
paths-ignore:
11+
- 'apps/docs/content/**'
12+
- '**/*.md'
813

914
concurrency:
1015
group: ci-${{ github.ref }}
@@ -24,6 +29,7 @@ jobs:
2429
detect-version:
2530
name: Detect Version
2631
runs-on: blacksmith-4vcpu-ubuntu-2404
32+
timeout-minutes: 5
2733
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/dev')
2834
outputs:
2935
version: ${{ steps.extract.outputs.version }}
@@ -76,6 +82,7 @@ jobs:
7682
needs: [detect-version, migrate-dev]
7783
if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
7884
runs-on: blacksmith-8vcpu-ubuntu-2404
85+
timeout-minutes: 30
7986
permissions:
8087
contents: read
8188
id-token: write
@@ -139,6 +146,7 @@ jobs:
139146
needs: [migrate-dev]
140147
if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
141148
runs-on: blacksmith-4vcpu-ubuntu-2404
149+
timeout-minutes: 15
142150
steps:
143151
- name: Checkout code
144152
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
@@ -185,6 +193,7 @@ jobs:
185193
github.event_name == 'push' &&
186194
(github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging')
187195
runs-on: blacksmith-8vcpu-ubuntu-2404
196+
timeout-minutes: 30
188197
permissions:
189198
contents: read
190199
packages: write
@@ -284,6 +293,7 @@ jobs:
284293
github.event_name == 'push' &&
285294
(github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging')
286295
runs-on: blacksmith-2vcpu-ubuntu-2404
296+
timeout-minutes: 10
287297
permissions:
288298
contents: read
289299
id-token: write
@@ -353,6 +363,7 @@ jobs:
353363
build-ghcr-arm64:
354364
name: Build ARM64 (GHCR Only)
355365
runs-on: blacksmith-8vcpu-ubuntu-2404-arm
366+
timeout-minutes: 30
356367
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
357368
permissions:
358369
contents: read
@@ -401,6 +412,7 @@ jobs:
401412
create-ghcr-manifests:
402413
name: Create GHCR Manifests
403414
runs-on: blacksmith-2vcpu-ubuntu-2404
415+
timeout-minutes: 10
404416
needs: [promote-images, build-ghcr-arm64, detect-version]
405417
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
406418
permissions:
@@ -466,6 +478,7 @@ jobs:
466478
check-docs-changes:
467479
name: Check Docs Changes
468480
runs-on: blacksmith-4vcpu-ubuntu-2404
481+
timeout-minutes: 5
469482
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
470483
outputs:
471484
docs_changed: ${{ steps.filter.outputs.docs }}
@@ -494,6 +507,7 @@ jobs:
494507
create-release:
495508
name: Create GitHub Release
496509
runs-on: blacksmith-4vcpu-ubuntu-2404
510+
timeout-minutes: 10
497511
needs: [create-ghcr-manifests, detect-version]
498512
if: needs.detect-version.outputs.is_release == 'true'
499513
permissions:

.github/workflows/companion-pr-check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ permissions:
3030
jobs:
3131
companion:
3232
runs-on: ubuntu-latest
33+
timeout-minutes: 5
3334
steps:
3435
- uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
3536
env:

.github/workflows/docs-embeddings.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111
process-docs-embeddings:
1212
name: Process Documentation Embeddings
1313
runs-on: blacksmith-8vcpu-ubuntu-2404
14+
timeout-minutes: 30
1415
if: github.ref == 'refs/heads/main'
1516

1617
steps:
@@ -25,7 +26,7 @@ jobs:
2526
- name: Setup Node
2627
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
2728
with:
28-
node-version: latest
29+
node-version: 22
2930

3031
- name: Cache Bun dependencies
3132
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5

.github/workflows/i18n.yml

Lines changed: 0 additions & 178 deletions
This file was deleted.

.github/workflows/migrations.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
migrate:
2626
name: Apply Database Migrations
2727
runs-on: blacksmith-4vcpu-ubuntu-2404
28+
timeout-minutes: 45
2829

2930
steps:
3031
- name: Checkout code

.github/workflows/publish-cli.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ permissions:
1212
jobs:
1313
publish-npm:
1414
runs-on: blacksmith-4vcpu-ubuntu-2404
15+
timeout-minutes: 15
1516
steps:
1617
- name: Checkout repository
1718
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

.github/workflows/publish-python-sdk.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ permissions:
1212
jobs:
1313
publish-pypi:
1414
runs-on: blacksmith-4vcpu-ubuntu-2404
15+
timeout-minutes: 15
1516
steps:
1617
- name: Checkout repository
1718
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

.github/workflows/publish-ts-sdk.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ permissions:
1212
jobs:
1313
publish-npm:
1414
runs-on: blacksmith-4vcpu-ubuntu-2404
15+
timeout-minutes: 15
1516
steps:
1617
- name: Checkout repository
1718
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

.github/workflows/test-build.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111
test-build:
1212
name: Lint and Test
1313
runs-on: blacksmith-8vcpu-ubuntu-2404
14+
timeout-minutes: 15
1415

1516
steps:
1617
- name: Checkout code
@@ -24,24 +25,28 @@ jobs:
2425
- name: Setup Node
2526
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
2627
with:
27-
node-version: latest
28+
node-version: 22
2829

30+
# Sticky-disk keys are scoped by event name, and fork PRs get their own
31+
# namespace on top: untrusted fork runs must never share a disk with
32+
# push runs (whose disks feed production image builds) or with trusted
33+
# internal-PR runs.
2934
- name: Mount Bun cache (Sticky Disk)
3035
uses: useblacksmith/stickydisk@4c034ba57b706cf0e3b4b0ce098c2a3b1071580c # v1
3136
with:
32-
key: ${{ github.repository }}-bun-cache
37+
key: ${{ github.repository }}-bun-cache-${{ github.event_name }}${{ github.event.pull_request.head.repo.fork && '-fork' || '' }}
3338
path: ~/.bun/install/cache
3439

3540
- name: Mount node_modules (Sticky Disk)
3641
uses: useblacksmith/stickydisk@4c034ba57b706cf0e3b4b0ce098c2a3b1071580c # v1
3742
with:
38-
key: ${{ github.repository }}-node-modules
43+
key: ${{ github.repository }}-node-modules-${{ github.event_name }}${{ github.event.pull_request.head.repo.fork && '-fork' || '' }}
3944
path: ./node_modules
4045

4146
- name: Mount Turbo cache (Sticky Disk)
4247
uses: useblacksmith/stickydisk@4c034ba57b706cf0e3b4b0ce098c2a3b1071580c # v1
4348
with:
44-
key: ${{ github.repository }}-turbo-cache
49+
key: ${{ github.repository }}-turbo-cache-${{ github.event_name }}${{ github.event.pull_request.head.repo.fork && '-fork' || '' }}
4550
path: ./.turbo
4651

4752
- name: Install dependencies
@@ -184,6 +189,7 @@ jobs:
184189
build:
185190
name: Build App
186191
runs-on: blacksmith-8vcpu-ubuntu-2404
192+
timeout-minutes: 15
187193

188194
steps:
189195
- name: Checkout code
@@ -197,24 +203,24 @@ jobs:
197203
- name: Setup Node
198204
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
199205
with:
200-
node-version: latest
206+
node-version: 22
201207

202208
- name: Mount Bun cache (Sticky Disk)
203209
uses: useblacksmith/stickydisk@4c034ba57b706cf0e3b4b0ce098c2a3b1071580c # v1
204210
with:
205-
key: ${{ github.repository }}-bun-cache
211+
key: ${{ github.repository }}-bun-cache-${{ github.event_name }}${{ github.event.pull_request.head.repo.fork && '-fork' || '' }}
206212
path: ~/.bun/install/cache
207213

208214
- name: Mount node_modules (Sticky Disk)
209215
uses: useblacksmith/stickydisk@4c034ba57b706cf0e3b4b0ce098c2a3b1071580c # v1
210216
with:
211-
key: ${{ github.repository }}-node-modules
217+
key: ${{ github.repository }}-node-modules-${{ github.event_name }}${{ github.event.pull_request.head.repo.fork && '-fork' || '' }}
212218
path: ./node_modules
213219

214220
- name: Mount Turbo cache (Sticky Disk)
215221
uses: useblacksmith/stickydisk@4c034ba57b706cf0e3b4b0ce098c2a3b1071580c # v1
216222
with:
217-
key: ${{ github.repository }}-turbo-cache-build
223+
key: ${{ github.repository }}-turbo-cache-build-${{ github.event_name }}${{ github.event.pull_request.head.repo.fork && '-fork' || '' }}
218224
path: ./.turbo
219225

220226
- name: Restore Next.js build cache

0 commit comments

Comments
 (0)