Skip to content

ci: parallelize heavy test lanes - #1965

Merged
M4n5ter merged 2 commits into
apache:mainfrom
M4n5ter:agent/split-ci-heavy-test-lanes
Aug 3, 2026
Merged

ci: parallelize heavy test lanes#1965
M4n5ter merged 2 commits into
apache:mainfrom
M4n5ter:agent/split-ci-heavy-test-lanes

Conversation

@M4n5ter

@M4n5ter M4n5ter commented Aug 3, 2026

Copy link
Copy Markdown
Member
English

Summary

  • project affected workspaces into standard, Runtime Host, and Headless test lanes
  • run Runtime Host and Headless on independent runners instead of one shared workspace critical path
  • split the Desktop Electron suite into two 29-test Playwright shards, each with one worker on its own runner and X display
  • run the Alignment audit after one shard so it reuses that shard's built renderer without requiring a third build
  • retain stable test and e2e checks that wait for every selected lane and verify exact success/skip outcomes
  • disable unused Playwright Git metadata capture and its fixed shallow-history fetch timeout

Why

The workspace test job previously combined independent heavy suites on one two-core runner and then ran Headless serially. Separately, Desktop E2E launched 58 isolated Electron applications through one CI worker because multiple workers on one X display have real OS-focus races.

The workspace lanes give independent suites their own capacity. The E2E shards preserve one worker per display—and therefore the focus behavior—while overlapping independent Electron cold starts across isolated runners.

Safety

  • the existing impact planner remains the source of truth
  • both Playwright shards retain workers: 1, retries: 0, and the existing timeouts
  • local enumeration proves the shards contain 29 tests each and their disjoint union is the original 58-test suite
  • Alignment coverage and all test assertions are unchanged
  • selected lanes must succeed; unselected lanes must be skipped; failed or cancelled lanes fail the stable aggregate check

This trades bounded runner parallelism for lower feedback latency. Narrow changes still start only the lanes selected by the dependency closure.

Validation

  • npm run test:scripts: 24 passed
  • CI planner and workspace scheduler tests: 9 passed
  • npm --workspace @maka/desktop run typecheck
  • npm run lint
  • npm run format:check
  • full Desktop build through npm run e2e -- --shard=1/2 --list
  • Playwright shard enumeration: 29 + 29 tests, no omissions or duplicates
  • workflow YAML and job dependency structure parsed locally
中文

概要

  • 将受影响的 workspace 投影为普通、Runtime Host 和 Headless 三条测试 lane
  • 将 Runtime Host 与 Headless 放到独立 runner,不再占用同一条 workspace 关键路径
  • 将 Desktop Electron suite 拆为两条各含 29 个测试的 Playwright shard;每条仍在独立 runner 和 X display 上使用一个 worker
  • Alignment audit 跟随其中一条 shard,复用其已构建 renderer,避免第三次构建
  • 保留稳定的 teste2e 检查;它们会等待全部已选择 lane,并严格核对成功/跳过状态
  • 关闭未被使用的 Playwright Git metadata 捕获及其固定浅历史 fetch 超时

原因

原 workspace test job 会在同一个两核 runner 上组合多个相互独立的重型 suite,最后再串行运行 Headless。与此同时,Desktop E2E 会通过一个 CI worker 依次启动 58 个相互隔离的 Electron 应用;这是因为同一 X display 上的多个 worker 已被证实会发生真实 OS focus 竞态。

Workspace lane 为独立 suite 提供独立容量。E2E shard 继续保持每个 display 只有一个 worker,从而保留原有 focus 行为,同时在相互隔离的 runner 之间重叠 Electron 冷启动。

安全性

  • 继续以现有 impact planner 为唯一选择依据
  • 两条 Playwright shard 均保留 workers: 1retries: 0 和现有 timeout
  • 本地枚举证明两条 shard 各有 29 个测试,其无交集并集等于原有 58 个测试
  • Alignment 覆盖与所有测试断言均未改变
  • 应运行的 lane 必须成功,未选择的 lane 必须跳过;失败或取消都会使稳定聚合检查失败

本方案以有限的 runner 并行度换取更短反馈时间;范围较窄的改动仍只启动依赖闭包选中的 lane。

验证

  • npm run test:scripts:24 个通过
  • CI planner 与 workspace scheduler 测试:9 个通过
  • npm --workspace @maka/desktop run typecheck
  • npm run lint
  • npm run format:check
  • 通过 npm run e2e -- --shard=1/2 --list 完成 Desktop 全量构建
  • Playwright shard 枚举:29 + 29 个测试,无遗漏或重复
  • 本地解析 workflow YAML 与 job 依赖结构

@M4n5ter
M4n5ter force-pushed the agent/split-ci-heavy-test-lanes branch from 12dcef8 to d15f199 Compare August 3, 2026 07:50
@M4n5ter
M4n5ter force-pushed the agent/split-ci-heavy-test-lanes branch from d15f199 to 0f6100e Compare August 3, 2026 08:12
@M4n5ter M4n5ter changed the title ci: split heavy workspace test lanes ci: parallelize heavy test lanes Aug 3, 2026
@M4n5ter
M4n5ter marked this pull request as ready for review August 3, 2026 08:23
@M4n5ter
M4n5ter merged commit 5bc96c0 into apache:main Aug 3, 2026
10 checks passed
@M4n5ter
M4n5ter deleted the agent/split-ci-heavy-test-lanes branch August 3, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant