Skip to content

Add daily latest JDK versions report workflow - #1329

Merged
brunoborges merged 3 commits into
mainfrom
brunoborges-latest-jdk-versions-report
Nov 18, 2026
Merged

brunoborges merged 3 commits into
mainfrom
brunoborges-latest-jdk-versions-report

Conversation

@brunoborges

Copy link
Copy Markdown
Contributor

Description:
Users often can't tell which exact JDK version setup-java will install for a request like java-version: 21. On a tool-cache miss, or with check-latest: true, the version is resolved from vendor metadata, and it can differ by distribution, OS, and architecture. This PR adds a daily workflow that resolves those versions from metadata only, without downloading any JDK, and publishes the results as a job summary report.

How it works:

  • src/reports/latest-versions.ts reuses each distribution's existing installer resolution logic (JavaBase and vendor installers) to resolve versions. It does not reimplement the vendor lookups, so the report matches what the action resolves. No archives are downloaded.
  • It covers every supported distribution, on every OS/architecture that distribution supports (from the central platform capability map, including Alpine Linux and Solaris). It checks every major from Java 6 through the newest stable GA release, including non-LTS releases, plus latest.
  • Different versions on different platforms are expected and reported per platform. Where a vendor only exposes a floating URL with no exact version in its metadata, the cell is marked instead of showing a guessed version. Lookup failures appear in the report and do not fail the whole run.
  • .github/workflows/latest-jdk-versions.yml runs daily (and on workflow_dispatch). It bundles the report script with ncc (npm run build:latest-versions-report) and writes the Markdown report to $GITHUB_STEP_SUMMARY.
  • The README gets a workflow badge and a short paragraph in the version-resolution section that links to the report.

Notes for reviewers:

  • LibericaDistributions.getPlatformOption changes from private to protected so the report can resolve Liberica's Solaris builds through a subclass override. Runtime behavior is unchanged, and the committed dist/ bundles do not change.
  • Some existing Oracle OpenJDK and Red Hat lookups currently fail upstream for certain combinations. The report surfaces those failures instead of hiding them.

Related issue:
N/A

Check list:

  • Ran npm run check locally (format, lint, build, test) and all checks pass. (Passed: 46 suites, 1730 tests.)
  • Mark if documentation changes are required. (README updated with badge and report link.)
  • Mark if tests were added or updated to cover the changes. (Added __tests__/latest-versions-report.test.ts.)

brunoborges and others added 3 commits November 18, 2026 14:44
Add a scheduled workflow that resolves, without downloading, the exact
version each distribution currently provides for the LTS majors, the
newest feature release, and `latest` on Linux, macOS, and Windows for
x64 and aarch64. Resolution reuses each installer's metadata lookup, so
the report matches what setup-java installs on a tool-cache miss or with
`check-latest: true`. Results are combined into a job summary with a
per-platform breakdown and a section for distributions needing
attention. Link the report from the README.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Resolve each distribution on every OS and architecture in the capability
map, including Alpine Linux, and render a full per-platform table for each
distribution instead of a merged overview. Platform differences are
expected and no longer flagged; only lookup errors and distributions that
resolve nothing are listed under "Needs attention".

Share HEAD responses per distribution so JetBrains lookups no longer
re-probe every release URL, cutting a Linux run from ~7 min to ~1 min.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Resolve every major from Java 6 through the newest GA release, including non-LTS versions. Query Liberica Solaris metadata through its installer and include Solaris in the workflow matrix. Preserve exact per-platform versions without flagging normal differences.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@brunoborges
brunoborges requested a review from a team as a code owner November 18, 2026 23:34
Copilot AI balanced review requested due to automatic review settings November 18, 2026 23:34
}

function escapeTableText(text: string): string {
return text.replace(/\|/g, '\\|').replace(/\r?\n/g, ' ');

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.

🟡 Changes recommended

Exhausted catalog failures trigger repeated requests that risk report timeouts, while latest-version discovery failures are misclassified as unpublished releases and omitted from “Needs attention”.

2 open issues
What changed in this PR

Adds a daily JDK version report that reuses setup-java’s installer resolution logic to show versions available across supported platforms without downloading JDK archives.

Changes:

  • Adds metadata-only resolution and Markdown reporting for Java 6 through the newest stable release, plus latest.
  • Adds a scheduled and manually triggered workflow covering Linux, Alpine, macOS, Windows, and Solaris.
  • Adds report tests, a build command, and README links.
File Description
src/​reports/​latest-versions.ts Resolves versions, shares metadata responses, and generates reports.
src/​distributions/​liberica/​installer.ts Allows a subclass to select Solaris for metadata lookup.
README.md Adds the report badge and explains how to access results.
package.json Adds the report bundling command.
.github/​workflows/​latest-jdk-versions.yml Schedules platform lookups and publishes the combined report.
__tests__/​latest-versions-report.test.ts Tests version discovery, Solaris resolution, formatting, and error reporting.

Review effort: Balanced

const message = error instanceof Error ? error.message : String(error);
if (
(error instanceof Error && error.name === 'VersionNotFoundError') ||
/no matching version|no \w+ release for|could not determine the latest available|not supported|only supported|does not support|not available|could not find|unsupported/i.test(
Comment on lines +160 to +162
response = request();
cache.set(key, response);
response.catch(() => cache.delete(key));
@brunoborges
brunoborges merged commit 3fc1c6e into main Nov 18, 2026
107 of 108 checks passed
@brunoborges
brunoborges deleted the brunoborges-latest-jdk-versions-report branch November 18, 2026 23: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.

3 participants