Skip to content

Retry and cache the test framework downloads in CI - #40

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

Project516 merged 2 commits into
masterfrom
p516/jtreg-jar-retry

Conversation

@Project516

@Project516 Project516 commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Each OpenJDK test shard downloads the TestNG and JUnit jars from Maven Central when its first framework test starts. With eight shards starting together, Maven Central sometimes answers 429. The runner then failed the whole shard: #39's shard 4 stopped at Error: 429 fetching org/testng/testng/7.3.0/testng-7.3.0.jar after 39 passing tests.

  • scripts/jtreg/run.ts retries a 429 or 5xx answer after 5, 10, 20, 40 and 80 seconds. The SHA-1 check of each jar is unchanged.
  • .github/workflows/jtreg.yml caches build/jtreg/lib, keyed on scripts/jtreg/run.ts (which pins each jar's version and SHA-1), so most runs fetch nothing.

Checks:

  • pnpm typecheck passes.
  • This PR changes the runner, so its own CI runs all 3,435 tests and fills the cache.

Flaky test removed. java/math/BigInteger/BitLengthOverflow.java timed out at 600 s in two of the last five full CI runs (#37 at 239e72e, #38 at f559372), after printing its expected line. It passes on a small ARM board in 2 to 6 s, and took 2.4 s in the CI runs that passed. It builds 256 MB and 128 MB BigInteger arrays, so it may be memory pressure with four test VMs per runner. Until that is understood, it comes out of passing.txt, as the repo's rule asks for a test that fails without a code 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 27 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: 107e74b8-b0bc-42d5-a8bc-fcf7c183ef7f
Commits

Reviewing files that changed from the base of the PR and between aaa3c8f and a00ae8b.

Files ignored due to path filters: 1
  • test/jtreg/times.tsv is excluded by !**/*.tsv
Files selected for processing: 3
  • .github/workflows/jtreg.yml
  • scripts/jtreg/run.ts
  • test/jtreg/passing.txt
  • 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 adds retry logic with exponential backoff (5–80s) for 429/5xx responses when downloading TestNG and JUnit jars, and adds a GitHub Actions cache for build/jtreg/lib keyed on scripts/jtreg/run.ts. However, the cache path build/jtreg/lib does not match where the script actually downloads jars: the workflow passes build/ref/jdk25u as the output directory, so jars land in build/ref/jdk25u/lib/. The cache will never be hit, and every shard will still download at startup.


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

@Project516

Copy link
Copy Markdown
Owner Author

On the cache path in the review of d6271d4: build/ref/jdk25u is the OpenJDK source checkout, not the output directory. The runner writes under out = join(root, "build", "jtreg") (scripts/jtreg/run.ts line 21), and fetchFrameworks saves the jars in join(out, "lib"), which is build/jtreg/lib, the cached path.

@Project516
Project516 enabled auto-merge (squash) November 4, 2026 22:21

@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 adds retry logic with exponential backoff for Maven Central 429/5xx responses and caches the downloaded test framework jars. However, the cache path in the workflow (build/jtreg/lib) does not match where run.ts actually writes the jars (build/ref/jdk25u/lib, derived from the first CLI argument). The caching will therefore be ineffective.


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

@Project516
Project516 merged commit 6d0b097 into master Nov 4, 2026
16 checks passed
@Project516
Project516 deleted the p516/jtreg-jar-retry branch November 4, 2026 22:44
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