From 795672f07765f292cd36fff76dc9b31bb53e58cc Mon Sep 17 00:00:00 2001 From: Ben Schumacher Date: Thu, 23 Apr 2026 15:24:51 +0200 Subject: [PATCH] Raise shard-split HEAVY_MS above sqlstore timing (#36233) Made-with: Cursor --- server/scripts/shard-split.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/server/scripts/shard-split.js b/server/scripts/shard-split.js index 418e3228b87..0d394cc51f0 100644 --- a/server/scripts/shard-split.js +++ b/server/scripts/shard-split.js @@ -38,11 +38,12 @@ const { execSync } = require("node:child_process"); const SHARD_INDEX = parseInt(process.env.SHARD_INDEX); const SHARD_TOTAL = parseInt(process.env.SHARD_TOTAL); -const HEAVY_MS = 300000; // 5 min: packages above this get test-level splitting -// Only api4 (~38 min) and app (~15 min) exceed this threshold. -// Packages like sqlstore (~3 min) stay whole to preserve test isolation — -// their integrity tests scan the entire database and break if split across -// shards where other tests leave data behind. +// Threshold for test-level splitting (aggregated pass time from timing cache). +// Keep this above sqlstore: its total time can exceed 5 minutes while remaining +// far below api4/app, and treating sqlstore as "heavy" breaks CI — discovery +// runs `go test -list` on the GitHub host where TestMain cannot reach postgres +// on the docker compose network (only api4 and app should need -list splitting). +const HEAVY_MS = 400000; // 400s (~6.7 min): packages above this get test-level splitting if (isNaN(SHARD_INDEX) || isNaN(SHARD_TOTAL) || SHARD_TOTAL < 1) { console.error("ERROR: SHARD_INDEX and SHARD_TOTAL must be set");