Skip to content

Commit 7080ca9

Browse files
nicohrubeccodex
andcommitted
ci: retry browser bundle sharding with six Playwright workers
Restore three Rollup processes on the existing bundle runner to measure their effect alongside the current test parallelism. Co-Authored-By: GPT-6 <codex@openai.com>
1 parent 2aa229d commit 7080ca9

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

‎packages/browser/package.json‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@
5252
"scripts": {
5353
"build": "run-p build:transpile build:bundle build:types",
5454
"build:dev": "run-p build:transpile build:types",
55-
"build:bundle": "rollup -c rollup.bundle.config.mjs",
55+
"build:bundle": "run-p build:bundle:shard:*",
56+
"build:bundle:shard:1": "rollup -c rollup.bundle.config.mjs --configShard=1",
57+
"build:bundle:shard:2": "rollup -c rollup.bundle.config.mjs --configShard=2",
58+
"build:bundle:shard:3": "rollup -c rollup.bundle.config.mjs --configShard=3",
5659
"build:transpile": "rollup -c rollup.npm.config.mjs",
5760
"build:types": "tsc -p tsconfig.types.json",
5861
"build:watch": "run-p build:transpile:watch build:bundle:watch",

‎packages/browser/rollup.bundle.config.mjs‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,16 @@ builds.push(
157157
...makeBundleConfigVariants(tracingReplayFeedbackLogsMetricsBaseBundleConfig),
158158
);
159159

160-
export default builds;
160+
export default ({ configShard } = {}) => {
161+
if (configShard === undefined) {
162+
return builds;
163+
}
164+
165+
const shard = Number(configShard);
166+
167+
if (![1, 2, 3].includes(shard)) {
168+
throw new Error('configShard must be 1, 2, or 3');
169+
}
170+
171+
return builds.filter((_, index) => Math.floor(index / 3) % 3 === shard - 1);
172+
};

0 commit comments

Comments
 (0)