Skip to content

Oracle OpenJDK: pick up release status changes of known packages - #163

Open
danishnawab wants to merge 2 commits into
foojayio:mainfrom
danishnawab:oracle-openjdk-release-status-update
Open

danishnawab wants to merge 2 commits into
foojayio:mainfrom
danishnawab:oracle-openjdk-release-status-update

Conversation

@danishnawab

@danishnawab danishnawab commented Sep 16, 2026

Copy link
Copy Markdown

Fixes #162

JDK 27 build 35 is still reported as 27-ea+35 although jdk.java.net serves it as GA. Root cause: Oracle hosts release candidates at the final GA location, so filename and download link do not change when the page switches from "Release-Candidate" to GA. The incremental update skips every known filename/link pair and never re-evaluates the release status.

Changes

  • OracleOpenJDK.extractPackagesFromHtml: the onlyNewPkgs check now also compares the release status. A known package is skipped only if the cached record already has the status computed from the current page. Otherwise it is re-emitted; since the pkg id is the MD5 of the download link, the existing record is updated in place.
  • The GA-date rule (ga_dates.properties) is applied before that comparison, so the status compared is exactly the one that would be stored. Without this a GA-hosted build before its GA date would be re-emitted every run.
  • Helper.isTooEarlyForGA(int) extracted for that purpose; checkPkgsForTooEarlyGA now delegates to it, behaviour unchanged.
  • Unit test for isTooEarlyForGA (future date, reached date, unknown major).

Notes

  • Only the jdk.java.net scraper is touched. The properties-file path uses the same skip pattern but does not suffer from this, because an edit there always changes the link.
  • HelperTest.testExtractingFilenames fails on main as well and is unrelated.

Summary by CodeRabbit

  • Bug Fixes
    • Improved release-status detection so packages are marked as Early Access when their General Availability date has not yet arrived.
    • Updated package filtering to allow packages to be added again when their status changes from Release Candidate to General Availability.
    • Improved handling of future and past release dates to ensure package availability information is accurate.

Oracle serves release candidates from the final GA location on
download.java.net, so filename and download link of a build do not change
when jdk.java.net switches the page from "Release-Candidate" to GA. The
incremental update skipped every known filename/link pair and therefore
never re-evaluated the release status, leaving the GA build labelled as
early access (JDK 27 build 35 is reported as 27-ea+35, see foojayio#162).

The check now also compares the release status, computed with the same
rules the package would be stored with (GA link, release candidate page,
GA date not reached yet), and re-emits the package when it differs. The
pkg id is the MD5 of the download link, so the existing record is updated
in place.
@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 9ebe28f8-133f-447a-bf53-b69b47e157e7

📥 Commits

Reviewing files that changed from the base of the PR and between f3ccc80 and 7021e6a.

📒 Files selected for processing (3)
  • src/main/java/io/foojay/api/distribution/OracleOpenJDK.java
  • src/main/java/io/foojay/api/util/Helper.java
  • src/test/java/io/foojay/api/util/HelperTest.java

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The change adds a shared future-GA date check, applies it during Oracle OpenJDK extraction, and updates package deduplication to include release status. Tests verify future, current, and unknown feature-version dates.

Changes

Oracle release status handling

Layer / File(s) Summary
Early-access date evaluation
src/main/java/io/foojay/api/util/Helper.java, src/test/java/io/foojay/api/util/HelperTest.java
Helper.isTooEarlyForGA checks whether a feature version has a future GA date. checkPkgsForTooEarlyGA uses this check for GA packages. Tests cover future, current, and unknown versions.
Oracle package status refresh
src/main/java/io/foojay/api/distribution/OracleOpenJDK.java
Oracle OpenJDK packages receive EA status when they are release candidates or before their GA date. Cached packages are skipped only when filename, download URI, and release status all match.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 7021e

No confirmed merge-blocking issue remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: updating the release status of known Oracle OpenJDK packages when the status changes.
Linked Issues check ✅ Passed The changes address #162. OracleOpenJDK.extractPackagesFromHtml now computes the GA-aware status before deduplication. The cache check includes filename, download URI, and computed release status. A…
Out of Scope Changes check ✅ Passed The changes remain within #162. The Oracle OpenJDK scraper change implements status re-evaluation. The Helper.isTooEarlyForGA(int) extraction supports the required GA-date calculation. The added uni…
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Git: CodeRabbit could not clone the repository, so clone-backed analysis was skipped and this review may be incomplete. Verify repository clone access, such as SSH credentials, before requesting another full review. If clone access is intentionally unavailable, use path_filters to narrow the review scope.


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

Comment @coderabbitai help to get the list of available commands.

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.

oracle_open_jdk: JDK 27 GA build 35 still reported as 27-ea+35

1 participant