Skip to content

[DO NOT MERGE] ripple live test: a change that selects nothing - #344098

Closed
Alexandru Dima (alexdima) wants to merge 1 commit into
mainfrom
ripple-live-test/selects-nothing
Closed

Alexandru Dima (alexdima) wants to merge 1 commit into
mainfrom
ripple-live-test/selects-nothing

Conversation

@alexdima

Copy link
Copy Markdown
Member

Do not merge. Live CI test of the unit test selection from #342907 (ripple): a change that selects nothing.

What this shows

One push with a comment-only change and a type-only change to src/vs/base/common/lifecycle.ts, the most widely imported module in src/ (4,243 files import it):

  • comment: fixes the typo "very simple an only works" in the TRACK_DISPOSABLES doc comment;
  • type: adds an optional, documented debugLabel property to the exported IReference<T> interface.

Neither changes runtime code: ripple hashes declarations without comments or TypeScript-only syntax, and interfaces have no runtime node. So the plan selects no unit test file, and the macOS and Windows unit test jobs should run their setup (checkout, node_modules, transpile, Electron or Playwright) but skip every test step. This measures what a follow-up that skips these jobs entirely when nothing is selected would save on such pushes (about 17% of pushes).

Expected outcome

Check Expected
Detect Changes plan "1 changed files, 0 changed declarations: running the 0 unit test files the change can affect (0.0% of the unit test work)"; unit-test-plan artifact with plan.json only (no unit.txt)
Check ripple no warning (changed=false, failed=false); Ripple job skipped
macOS (run) / Electron-Unit, macOS (unit) / Browser, Windows (run) / Electron-Unit, Windows (unit) / Browser download the plan, skip every 🧪 Run unit tests step, succeed
Linux (run) / Electron-Unit, Linux (unit) / Browser run every unit test and pass

Local prediction, with ripple built from main's sources:

$ ripple affected --config build/ripple/vscode.jsonc --base origin/main --head HEAD
src/vs/base/common/lifecycle.ts: 0 of 112 declarations changed
1 changed files, 0 changed declarations -> 0 test files (file-level: 2783, runtime file-level: 2783) in 3821 ms

$ ripple plan --config build/ripple/vscode.jsonc --base origin/main --head HEAD --out-dir /tmp/plan
running the 0 unit test files the change can affect (0.0% of the unit test work)
{"changedDeclarations":0,"changedFiles":1,"reason":"running the 0 unit test files the change can affect (0.0% of the unit test work)","select":true,"share":0.0,"unit":[]}

File-level import analysis would select 2,783 of the 2,785 unit and integration test files.

How to follow

  • The Detect Changes job summary shows the unit test plan.
  • In the four macOS and Windows unit test jobs, the 🧪 Run unit tests steps show as skipped. For each, I record the total duration and the time spent before the test steps.
  • Once the six unit test jobs finish, the rest of the run is cancelled to save VM minutes, and a comment compares expected and actual results.

The pull request stays a draft and will be closed after review.

A comment-only change and a type-only change (a new optional property on the
exported IReference interface) to src/vs/base/common/lifecycle.ts, which 4,243
source files import. ripple should find 0 changed declarations and select 0 unit
test files (0.0%), so the macOS and Windows unit test jobs skip their test steps
while Linux runs every unit test.

Co-authored-by: Copilot <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 25, 2026 07:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The runtime-neutral edits have no identified blocking issues; approval does not verify CI outcomes or override the do-not-merge designation.

No open issues 🎉

What changed in this PR

This draft PR exercises ripple’s zero-test selection for runtime-neutral changes to VS Code’s widely imported lifecycle module. It is a CI experiment and remains explicitly do not merge.

Changes:

  • Corrects a typo in the disposable-tracking documentation.
  • Adds an optional, documented debugLabel property to IReference<T> without changing runtime code.
File Description
src/​vs/​base/​common/​lifecycle.ts Supplies comment-only and type-only edits to exercise zero-test selection.

Review effort: Balanced

@alexdima

Alexandru Dima (alexdima) commented Oct 25, 2026 •

Copy link
Copy Markdown
Member Author

Result: as expected

Run 40172614560, one push (03f5f68ede3). The run completed with 39 jobs succeeded and 10 skipped as unaffected.

Check Expected Actual
Detect Changes plan 1 changed file, 0 changed declarations, 0 unit test files (0.0%) ✅ "running the 0 unit test files the change can affect (0.0% of the unit test work)". ripple was restored from the cache (build skipped), and the plan step took 5 s
unit-test-plan artifact plan.json only: select: true, unit: [] ✅ 1 file, 256 bytes, identical to the local prediction: {"changedDeclarations":0,"changedFiles":1,...,"select":true,"share":0.0,"unit":[]}
Check ripple no warning, changed=false, failed=false ✅ no warning (BUILD: skipped, PLAN: success), and the Ripple job was skipped
macOS and Windows unit test jobs (4) download the plan, skip every test step, succeed ✅ each downloaded the artifact (same digest), skipped all three 🧪 Run unit tests steps and succeeded
Linux (run) / Electron-Unit runs every unit test and passes ✅ Electron: 65,525 passing, 546 pending. node.js: 29,582 passing, 228 pending. No --runList, 0 failing, no reruns
Linux (unit) / Browser runs every unit test and passes ✅ Chromium: 46,949 passing, 218 pending. No --runList, 0 failing
Failing test files none none on any OS (macOS and Windows ran no tests)

Unit test job durations

Job Mean before #342907 This push Before the test steps
macOS (run) / Electron-Unit 14.5 min 1.6 min (93 s) 89 s
macOS (unit) / Browser 8.7 min 1.5 min (90 s) 87 s
Windows (run) / Electron-Unit 20.0 min 3.0 min (180 s) 176 s
Windows (unit) / Browser 10.5 min 2.8 min (168 s) 164 s
Linux (run) / Electron-Unit runs every unit test 17.7 min (1,059 s) 133 s
Linux (unit) / Browser runs every unit test 12.2 min (731 s) 103 s

Together, the four macOS and Windows jobs took 53.7 min on average before #342907. On this push they took 8.9 min.

What skipping these jobs when nothing is selected would save

These four jobs still take 531 s (8.9 VM minutes: 3.1 on macOS, 5.8 on Windows) on such a push. 516 s of that is setup before the test steps, and the remaining 15 s are the post-job steps. Per job, in seconds:

Job Checkout Node.js node_modules cache Transpile Electron / Playwright Other¹ Before tests Total
macOS (run) / Electron-Unit 15 5 51 10 5 3 89 93
macOS (unit) / Browser 13 1 51 9 10 3 87 90
Windows (run) / Electron-Unit 23 7 108 15 19 4 176 180
Windows (unit) / Browser 26 7 104 15 9 3 164 168

¹ Job setup, the built-in extensions cache, the plan download and the gaps between steps. Times come from the step timestamps, which have 1 s resolution.

  • Restoring the node_modules cache is the largest part: 55–57% of each macOS job and 60–62% of each Windows job.
  • macOS runs on GitHub-hosted macos-26-xlarge runners, which bill each job by the started minute: 2 billed minutes per job. Windows runs on the 1ES pool, where the job time does not include VM provisioning.
  • At about 17% of pushes, skipping these jobs saves about 1.5 VM minutes per push on average (0.17 × 8.9).
  • It would not make the run finish sooner. These jobs finished within 3.0 min, and the run's duration was set by Linux (run) / Electron (17.9 min) and Linux (run) / Electron-Unit (17.7 min).

The rest of the run was not cancelled. When the six unit test jobs finished, at 07:42:06 UTC, the only job still running was Linux (run) / Electron, which finished at 07:42:20. The run completed at 07:42:28, before gh run cancel.

@alexdima

Copy link
Copy Markdown
Member Author

Experiment done: the results are in the comment above. Closing, as this pull request was never meant to be merged.

@alexdima
Alexandru Dima (alexdima) deleted the ripple-live-test/selects-nothing branch October 25, 2026 08:12
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.

2 participants