Skip to content

Commit a182811

Browse files
authored
fix(ci): smooth PR runner-registration bursts (#95625)
Merged via squash. Prepared head SHA: 72b2b00 Co-authored-by: vincentkoc <[email protected]> Co-authored-by: vincentkoc <[email protected]> Reviewed-by: @vincentkoc
1 parent 4e2f015 commit a182811

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,7 @@ jobs:
819819
timeout-minutes: 60
820820
strategy:
821821
fail-fast: false
822+
max-parallel: 4
822823
matrix: ${{ fromJson(needs.preflight.outputs.checks_fast_core_matrix) }}
823824
steps:
824825
- name: Checkout
@@ -908,6 +909,7 @@ jobs:
908909
timeout-minutes: 60
909910
strategy:
910911
fail-fast: false
912+
max-parallel: 4
911913
matrix: ${{ fromJson(needs.preflight.outputs.plugin_contracts_matrix) }}
912914
steps:
913915
- name: Checkout
@@ -988,6 +990,7 @@ jobs:
988990
timeout-minutes: 60
989991
strategy:
990992
fail-fast: false
993+
max-parallel: 4
991994
matrix: ${{ fromJson(needs.preflight.outputs.channel_contracts_matrix) }}
992995
steps:
993996
- name: Checkout
@@ -1140,6 +1143,7 @@ jobs:
11401143
timeout-minutes: 60
11411144
strategy:
11421145
fail-fast: false
1146+
max-parallel: 6
11431147
matrix: ${{ fromJson(needs.preflight.outputs.checks_node_core_nondist_matrix) }}
11441148
steps:
11451149
- name: Checkout
@@ -1248,6 +1252,7 @@ jobs:
12481252
timeout-minutes: 20
12491253
strategy:
12501254
fail-fast: false
1255+
max-parallel: 4
12511256
matrix:
12521257
include:
12531258
- check_name: check-guards
@@ -1389,6 +1394,7 @@ jobs:
13891394
timeout-minutes: 20
13901395
strategy:
13911396
fail-fast: false
1397+
max-parallel: 4
13921398
matrix:
13931399
include:
13941400
- check_name: check-additional-boundaries-a
@@ -1763,6 +1769,7 @@ jobs:
17631769
shell: bash
17641770
strategy:
17651771
fail-fast: false
1772+
max-parallel: 2
17661773
matrix: ${{ fromJson(needs.preflight.outputs.checks_windows_matrix) }}
17671774
steps:
17681775
- name: Checkout
@@ -2092,6 +2099,7 @@ jobs:
20922099
timeout-minutes: 20
20932100
strategy:
20942101
fail-fast: false
2102+
max-parallel: 2
20952103
matrix: ${{ fromJson(needs.preflight.outputs.android_matrix) }}
20962104
steps:
20972105
- name: Checkout

test/scripts/ci-workflow-guards.test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,19 @@ describe("ci workflow guards", () => {
101101
expect(action).toContain("docs/* | *.md | *.mdx)");
102102
});
103103

104+
it("bounds matrix fan-out for runner-registration pressure", () => {
105+
const workflow = readCiWorkflow();
106+
107+
expect(workflow.jobs["checks-fast-core"].strategy["max-parallel"]).toBe(4);
108+
expect(workflow.jobs["checks-node-core-test-nondist-shard"].strategy["max-parallel"]).toBe(6);
109+
expect(workflow.jobs["checks-fast-plugin-contracts-shard"].strategy["max-parallel"]).toBe(4);
110+
expect(workflow.jobs["checks-fast-channel-contracts-shard"].strategy["max-parallel"]).toBe(4);
111+
expect(workflow.jobs["check-shard"].strategy["max-parallel"]).toBe(4);
112+
expect(workflow.jobs["check-additional-shard"].strategy["max-parallel"]).toBe(4);
113+
expect(workflow.jobs["checks-windows"].strategy["max-parallel"]).toBe(2);
114+
expect(workflow.jobs.android.strategy["max-parallel"]).toBe(2);
115+
});
116+
104117
it("runs the session accessor ratchet as a visible additional check", () => {
105118
const workflow = readCiWorkflow();
106119
const additionalJob = workflow.jobs["check-additional-shard"];

0 commit comments

Comments
 (0)