diff --git a/.github/workflows/ci-web.yml b/.github/workflows/ci-web.yml index 014723dbe78b..3d42135e2a8a 100644 --- a/.github/workflows/ci-web.yml +++ b/.github/workflows/ci-web.yml @@ -307,6 +307,12 @@ jobs: # that warm-up and ran their dev-server files two at a time: 12 shards on # 8 vCPU took 14.3 min (run 39347314726), barely under 2 shards' 15.5. # Fewer, wider shards share each warm cache across more files. + # On 16 vCPU a shard runs its dev-server files 4 at a time, and they are + # most of its wall time: 4 shards took 18-26 min of "Test webviews" each + # (run 41236343549), the long pole from ask to merge for a webview fix. + # 8 shards halve each shard's dev-server files for about 2 min more setup + # and Vite warm-up per added shard (Leo, 2026-10-31: a straightforward fix + # lands within the hour). timeout-minutes: 40 name: react-apps-check (${{ matrix.shard }}) strategy: @@ -314,13 +320,21 @@ jobs: matrix: include: - shard: 1 - shard_count: 4 + shard_count: 8 - shard: 2 - shard_count: 4 + shard_count: 8 - shard: 3 - shard_count: 4 + shard_count: 8 - shard: 4 - shard_count: 4 + shard_count: 8 + - shard: 5 + shard_count: 8 + - shard: 6 + shard_count: 8 + - shard: 7 + shard_count: 8 + - shard: 8 + shard_count: 8 steps: - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -628,6 +642,10 @@ jobs: - shard: 2 - shard: 3 - shard: 4 + - shard: 5 + - shard: 6 + - shard: 7 + - shard: 8 steps: # The base is the merge commit's first parent, the commit the head shards # were merged onto (their prScope diff is HEAD^1 too). pull_request.base.sha diff --git a/tests/test_web_validation.py b/tests/test_web_validation.py index bdb807ab4312..b58eb1837703 100644 --- a/tests/test_web_validation.py +++ b/tests/test_web_validation.py @@ -222,18 +222,25 @@ def test_webviews_tests_shard_on_wide_runners(self): """Two 8 vCPU shards each ran about 65 dev-server files two at a time for 12 of their 14-16 minutes. Twelve 8 vCPU shards took 14.3 min: each paid a cold Vite warm-up. Four 32 vCPU shards run eight dev-server files at once on a shared warm - cache. Blacksmith is a capped paid overflow now (2026-10-30), so the four shards run at - 16 vCPU: 14% slower at p50 than 32 for half the price.""" + cache. Blacksmith is a capped paid overflow now (2026-10-30), so the shards run at + 16 vCPU: 14% slower at p50 than 32 for half the price. There, four shards ran their + dev-server files four at a time for 18-26 min each (p50 24.4 min, 2026-10-31), the + long pole from ask to merge for a webview fix, so they are eight. The base replay + (react-apps-base-check) takes one shard per head shard's results artifact.""" workflow = (ROOT / ".github/workflows/ci-web.yml").read_text() start = workflow.index(" react-apps-check-shard:") match = re.search(r"\n [A-Za-z0-9_-]+:", workflow[start + 3 :]) block = workflow[start:] if match is None else workflow[start : start + 3 + match.start()] shards = [int(n) for n in re.findall(r"^ - shard: (\d+)$", block, re.MULTILINE)] counts = set(re.findall(r"^ shard_count: (\d+)$", block, re.MULTILINE)) - self.assertEqual(len(shards), 4) + self.assertEqual(len(shards), 8) self.assertIn("'blacksmith-16vcpu-ubuntu-2404' }}", block) self.assertEqual(shards, list(range(1, len(shards) + 1))) self.assertEqual(counts, {str(len(shards))}) + base_start = workflow.index(" react-apps-base-check:") + base_match = re.search(r"\n [A-Za-z0-9_-]+:", workflow[base_start + 3 :]) + base = workflow[base_start:] if base_match is None else workflow[base_start : base_start + 3 + base_match.start()] + self.assertEqual([int(n) for n in re.findall(r"^ - shard: (\d+)$", base, re.MULTILINE)], shards) for step in ("Generated bundle merge driver", "Check diff viewer eager JS budget", "Verify React Compiler for webviews", "Check webviews (Oxlint, Oxfmt, type check)", "Check PR-scoped webview rules"):