Repository navigation
Add daily latest JDK versions report workflow - #1329
Merged
Merged
Conversation
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>
| } | ||
|
|
||
| function escapeTableText(text: string): string { | ||
| return text.replace(/\|/g, '\\|').replace(/\r?\n/g, ' '); |
Contributor
There was a problem hiding this comment.
🟡 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)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description:
Users often can't tell which exact JDK version
setup-javawill install for a request likejava-version: 21. On a tool-cache miss, or withcheck-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.tsreuses each distribution's existing installer resolution logic (JavaBaseand vendor installers) to resolve versions. It does not reimplement the vendor lookups, so the report matches what the action resolves. No archives are downloaded.latest..github/workflows/latest-jdk-versions.ymlruns daily (and onworkflow_dispatch). It bundles the report script withncc(npm run build:latest-versions-report) and writes the Markdown report to$GITHUB_STEP_SUMMARY.Notes for reviewers:
LibericaDistributions.getPlatformOptionchanges fromprivatetoprotectedso the report can resolve Liberica's Solaris builds through a subclass override. Runtime behavior is unchanged, and the committeddist/bundles do not change.Related issue:
N/A
Check list:
npm run checklocally (format, lint, build, test) and all checks pass. (Passed: 46 suites, 1730 tests.)__tests__/latest-versions-report.test.ts.)