ci: split channel contract shards further

This commit is contained in:
Peter Steinberger
2026-04-20 20:17:57 +01:00
parent 24d50acc70
commit 704feda9da
3 changed files with 13 additions and 44 deletions

View File

@@ -51,7 +51,7 @@ Local changed-lane logic lives in `scripts/changed-lanes.mjs` and is executed by
On pushes, the `checks` matrix adds the push-only `compat-node22` lane. On pull requests, that lane is skipped and the matrix stays focused on the normal test/channel lanes.
The slowest Node test families are split into include-file shards so each job stays small: channel contracts split registry and core coverage into four balanced shards each, auto-reply reply command tests split into four include-pattern shards, and the other large auto-reply reply prefix groups split into two shards each. `check-additional` also separates package-boundary compile/canary work from runtime topology gateway/architecture work.
The slowest Node test families are split into include-file shards so each job stays small: channel contracts split registry and core coverage into eight balanced shards each, auto-reply reply command tests split into four include-pattern shards, and the other large auto-reply reply prefix groups split into two shards each. `check-additional` also separates package-boundary compile/canary work from runtime topology gateway/architecture work.
## Runners

View File

@@ -14,7 +14,7 @@ function listContractTestFiles(rootDir = "src/channels/plugins/contracts") {
export function createChannelContractTestShards() {
const rootDir = "src/channels/plugins/contracts";
const suffixes = ["a", "b", "c", "d"];
const suffixes = ["a", "b", "c", "d", "e", "f", "g", "h"];
const groups = Object.fromEntries(
["registry", "core"].flatMap((family) =>
suffixes.map((suffix) => [`checks-fast-contracts-channels-${family}-${suffix}`, []]),

View File

@@ -16,54 +16,23 @@ function listContractTests(rootDir = "src/channels/plugins/contracts"): string[]
describe("scripts/lib/channel-contract-test-plan.mjs", () => {
it("splits channel contracts into focused shards", () => {
const suffixes = ["a", "b", "c", "d", "e", "f", "g", "h"];
expect(
createChannelContractTestShards().map((shard) => ({
checkName: shard.checkName,
runtime: shard.runtime,
task: shard.task,
})),
).toEqual([
{
checkName: "checks-fast-contracts-channels-registry-a",
runtime: "node",
task: "contracts-channels",
},
{
checkName: "checks-fast-contracts-channels-registry-b",
runtime: "node",
task: "contracts-channels",
},
{
checkName: "checks-fast-contracts-channels-registry-c",
runtime: "node",
task: "contracts-channels",
},
{
checkName: "checks-fast-contracts-channels-registry-d",
runtime: "node",
task: "contracts-channels",
},
{
checkName: "checks-fast-contracts-channels-core-a",
runtime: "node",
task: "contracts-channels",
},
{
checkName: "checks-fast-contracts-channels-core-b",
runtime: "node",
task: "contracts-channels",
},
{
checkName: "checks-fast-contracts-channels-core-c",
runtime: "node",
task: "contracts-channels",
},
{
checkName: "checks-fast-contracts-channels-core-d",
runtime: "node",
task: "contracts-channels",
},
]);
).toEqual(
["registry", "core"].flatMap((family) =>
suffixes.map((suffix) => ({
checkName: `checks-fast-contracts-channels-${family}-${suffix}`,
runtime: "node",
task: "contracts-channels",
})),
),
);
});
it("covers every channel contract test exactly once", () => {