Skip to content

Run the OpenJDK tests in CI from the built bundle - #32

Merged
Project516 merged 2 commits into
masterfrom
p516/jtreg-bundle
Nov 4, 2026
Merged

Project516 merged 2 commits into
masterfrom
p516/jtreg-bundle

Conversation

@Project516

Copy link
Copy Markdown
Owner

The OpenJDK test jobs start one VM per test action, 2,524 tests in all, through src/node.ts. Node then loads and type-strips about 60 source modules for each VM. The bundled dist/node.js starts faster, about 0.4 s less per VM on a small ARM board, so the jobs now build it once (6 s) and run every test VM from it with --vm dist/node.js. CI then also tests the file the package ships.

Since the bundle is now what the tests run on, scripts/jtreg/select.ts counts scripts/build-web.ts as part of that VM. A change to it runs the OpenJDK tests.

The JDK cache in both workflows now covers only the downloads scripts/build-jdk.sh keeps there (jdk-*, dejavu-*). Boot snapshots default to ~/.cache/java-web/snapshots, and a cache miss would otherwise save them along with the JDK.

Measured as two full runs (all 2,524 tests, 4 shards) of the same commit, one after the other, on GitHub-hosted runners:

Shard From src/node.ts From dist/node.js
1 21m 15s 15m 15s
2 15m 59s 17m 46s
3 23m 10s 16m 18s
4 20m 43s 18m 49s
Total 81m 07s 68m 08s

That is 16% less runner time, and the slowest shard, which sets how long a pull request waits, went from 23m 10s to 18m 49s. Shard times vary from run to run, so a single comparison is rough; the total is the steadier number. Every test passed in both runs.

Checks:

  • This pull request changes a workflow, so its own run covers all tests from the bundle.
  • node scripts/jtreg/select.ts <base> still selects all tests for a workflow change.

@coderabbitai

coderabbitai Bot commented Nov 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 49 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: f6804316-a3f9-4f7e-b5e1-b2872ecab8ff
Commits

Reviewing files that changed from the base of the PR and between c34ccf7 and deb2f53.

Files selected for processing: 3
  • .github/workflows/jtreg.yml
  • .github/workflows/test.yml
  • scripts/jtreg/select.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@project516-review-bot project516-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The PR switches OpenJDK test jobs to run from the built bundle (dist/node.js) instead of src/node.ts, adding a pnpm build step and --vm dist/node.js flag. It narrows the JDK cache to only jdk-* and dejavu-* directories (excluding boot snapshots), and updates scripts/jtreg/select.ts to treat scripts/build-web.ts as a test-affecting file since it produces the bundle. Measured CI time drops ~16% (81m to 68m total).


review-bot, model nvidia/nemotron-3-ultra-550b-a55b:free, verdict approve

@Project516
Project516 enabled auto-merge (squash) November 4, 2026 02:36
@Project516
Project516 merged commit 46500d8 into master Nov 4, 2026
12 checks passed
@Project516
Project516 deleted the p516/jtreg-bundle branch November 4, 2026 02:57
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