You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "orangeCatDeveloper (via GitHub)" <gi...@apache.org> on 2026/09/13 07:35:07 UTC
[PR] perf(ci): give each Desktop e2e worker its own X server [maka]
orangeCatDeveloper opened a new pull request, #5250:
URL: https://github.com/apache/maka/pull/5250
## Summary
The Desktop e2e tier runs one worker at a time, so 37 tests each pay a full Electron cold start in series. It is pinned there because concurrent windows on one X server contend for the single input focus, pointer and stacking order that this tier's tests exist to assert. Giving each Playwright worker its own X server removes the contention rather than the assertions: three workers now run in parallel and no test changes.
`MAKA_E2E_DISPLAY_BASE` is what turns routing on, and only whoever starts those servers sets it. Unset — a plain `npm run e2e`, or any non-Playwright launcher such as the alignment audit — keeps the inherited display and stays serial.
No issue reference: there is no filed issue for this tier's duration. Say the word and I will open one.
## Verification
**The tier drops from 338 s to 199 s per run, 41% faster, at 10/10 passing.** Ten full-suite repetitions per arm on `ubuntu-24.04`, `retries: 0`, all on the same commit.
| workers | X servers | passed | median run |
| --- | --- | --- | --- |
| 1 (today) | shared | 9/10 | 338 s |
| 2 | shared | 10/10 | 226 s |
| 2 | per worker | 10/10 | 230 s |
| 3 | shared | **4/10** | 166 s |
| 3 | per worker | **10/10** | 199 s |
The two three-worker rows are the argument. They differ only in whether the workers share one server; the load average does not move between them, so what fails on a shared server is focus, not capacity.
```text
workers=3, one shared X server
run 1: pass 174s run 2: FAIL 180s run 3: FAIL 165s run 4: pass 162s run 5: pass 163s
run 6: FAIL 166s run 7: FAIL 167s run 8: pass 166s run 9: FAIL 175s run 10: FAIL 164s
failures: scroll-geometry x5, side-chat-followups x2, workhub-layout x1
load average during the arm: 5.5 - 7.5
workers=3, one X server each
run 1: pass 206s run 2: pass 197s run 3: pass 198s run 4: pass 199s run 5: pass 200s
run 6: pass 199s run 7: pass 197s run 8: pass 200s run 9: pass 197s run 10: pass 198s
failures: none
load average during the arm: 5.0 - 7.7
```
Client counts sampled during the run confirm the workers really land on separate servers, which a green arm alone does not prove:
```text
clients :90=1 :91=1 :92=1
```
- `node --test scripts/fixture-env.test.mjs`: 6 passed
- `node --test scripts/ci-workflow-policy.test.mjs`: 44 passed
- `npm run format:check`, `npx biome lint` on the changed files, `npm run check:asf-headers`, `git diff --check`: passed
## Risks
Four workers are untested and unlikely to fit: the load average already reaches 7.7 on a four-vCPU runner at three.
Worker count and server count are set in one step and must stay equal — two workers on one server silently reintroduces the contention and only shows up as flake. `ci-workflow-policy.test.mjs` counts the servers the step starts against the same variable that sets the worker count, so neither side can be edited alone.
Ten repetitions per arm bound the failure rate loosely; they rule out a 25% flake, not a 3% one.
## AI use
Select exactly one:
- [ ] No generative tool made a substantive contribution
- [x] Generative tooling made a substantive contribution
Tool(s) and scope: Claude Code diagnosed the contention, wrote the routing and the CI step, and ran the measurement arms on a fork.
## Checklist
- [x] Tests cover the change and fail without it
- [x] Lint, format, typecheck and the affected suites pass locally
Does this PR entail a change in behavior?
- [x] Yes — described under Summary above
- [ ] No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] perf(ci): isolate Desktop e2e workers on Xvfb [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han commented on code in PR #5250:
URL: https://github.com/apache/maka/pull/5250#discussion_r3999390158
##########
.github/workflows/ci.yml:
##########
@@ -396,11 +396,15 @@ jobs:
- name: Ensure xvfb
if: steps.plan.outputs.e2e == 'true'
- run: command -v xvfb-run >/dev/null 2>&1 || { sudo apt-get update && sudo apt-get install -y xvfb; }
+ run: |
+ command -v Xvfb >/dev/null 2>&1 && command -v xdpyinfo >/dev/null 2>&1 && exit 0
+ sudo apt-get update && sudo apt-get install -y xvfb x11-utils
+ # One X server per worker: a server has one input focus, one pointer and
+ # one stacking order, and this tier is the set of tests that assert those.
- name: Desktop e2e
if: steps.plan.outputs.e2e == 'true'
- run: xvfb-run -a npm exec -w @maka/desktop -- playwright test --config e2e/playwright.config.ts
+ run: node scripts/run-desktop-e2e-parallel.mjs --workers 3
Review Comment:
[P2] Register the new E2E drivers with the planner
Could you add `scripts/run-desktop-e2e-parallel.mjs` and `scripts/fixture-env.mjs` to the existing `E2E_DRIVING_SCRIPTS` set, with a planner regression assertion? On this head, passing either path alone to `planTests()` returns `code: true`, `e2e: false`, `full: false`, and no workspaces. A later change limited to the runner or worker-to-DISPLAY mapping would therefore skip the real Electron tests it controls. This PR also changes the workflow, which selects the full suite and masks the missing inputs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] perf(ci): isolate Desktop e2e workers on Xvfb [maka]
Posted by "orangeCatDeveloper (via GitHub)" <gi...@apache.org>.
orangeCatDeveloper commented on code in PR #5250:
URL: https://github.com/apache/maka/pull/5250#discussion_r3999411448
##########
.github/workflows/ci.yml:
##########
@@ -396,11 +396,15 @@ jobs:
- name: Ensure xvfb
if: steps.plan.outputs.e2e == 'true'
- run: command -v xvfb-run >/dev/null 2>&1 || { sudo apt-get update && sudo apt-get install -y xvfb; }
+ run: |
+ command -v Xvfb >/dev/null 2>&1 && command -v xdpyinfo >/dev/null 2>&1 && exit 0
+ sudo apt-get update && sudo apt-get install -y xvfb x11-utils
+ # One X server per worker: a server has one input focus, one pointer and
+ # one stacking order, and this tier is the set of tests that assert those.
- name: Desktop e2e
if: steps.plan.outputs.e2e == 'true'
- run: xvfb-run -a npm exec -w @maka/desktop -- playwright test --config e2e/playwright.config.ts
+ run: node scripts/run-desktop-e2e-parallel.mjs --workers 3
Review Comment:
Confirmed on the previous head: each path alone returned `e2e: false`. Both scripts are now in `E2E_DRIVING_SCRIPTS`, with a planner test asserting that every e2e driver selects the tier on its own without falling back to the full suite (f8ea08694).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] perf(ci): isolate Desktop e2e workers on Xvfb [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han merged PR #5250:
URL: https://github.com/apache/maka/pull/5250
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org