Skip to content

Fix Mandrel latest version resolution returning wrong Java version#212

Closed
gastaldi wants to merge 1 commit intograalvm:mainfrom
gastaldi:mandrel_fix
Closed

Fix Mandrel latest version resolution returning wrong Java version#212
gastaldi wants to merge 1 commit intograalvm:mainfrom
gastaldi:mandrel_fix

Conversation

@gastaldi
Copy link
Copy Markdown

The Disco API's jdk_version parameter matches Mandrel's distribution version (e.g. 21.x), not the Java version in the build. When Mandrel 21.3.6.0-Final was released, it became the latest for jdk_version=21, but it's actually a Java 17 build (mandrel-java17-21.3.6.0-Final).

Replace the jdk_version-based API query with a broader query using latest=available, then filter results client-side by matching the filename prefix (mandrel-java${javaVersion}-) to ensure the correct Java version is selected.

Update test expectations to use Java versions available across platforms and remove fragile pinned version assertions.

The Disco API's `jdk_version` parameter matches Mandrel's distribution
version (e.g. 21.x), not the Java version in the build. When Mandrel
21.3.6.0-Final was released, it became the latest for jdk_version=21,
but it's actually a Java 17 build (mandrel-java17-21.3.6.0-Final).

Replace the jdk_version-based API query with a broader query using
latest=available, then filter results client-side by matching the
filename prefix (mandrel-java${javaVersion}-) to ensure the correct
Java version is selected.

Update test expectations to use Java versions available across platforms
and remove fragile pinned version assertions.

Fixes #211
@oracle-contributor-agreement
Copy link
Copy Markdown

Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
The following contributors of this PR have not signed the OCA:

To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application.

When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated.

If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. label Mar 25, 2026
Copy link
Copy Markdown

@turing85 turing85 left a comment

Choose a reason for hiding this comment

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

@fniephaus fniephaus requested a review from zakkak March 26, 2026 11:46
@fniephaus
Copy link
Copy Markdown
Member

Thanks for the PR, @gastaldi. If you could sign the OCA, that'd be great.

@zakkak could you please take a look at this?

@gastaldi
Copy link
Copy Markdown
Author

@fniephaus thanks, I did sign, but it still says "Under Review"

@fniephaus
Copy link
Copy Markdown
Member

@gastaldi Great, thanks. Review shouldn't take too long and then the bot should unblock the PR.

@zakkak
Copy link
Copy Markdown
Collaborator

zakkak commented Mar 26, 2026

@fniephaus @gastaldi is an IBM employee and should be already covered by OCA IIRC

@zakkak
Copy link
Copy Markdown
Collaborator

zakkak commented Mar 26, 2026

This looks more like a DISCO API issue, looking into it.

@fniephaus
Copy link
Copy Markdown
Member

Ok, so the issue seems to be that @gastaldi used his personal email. Could you please update the commit to use your work email?

@zakkak
Copy link
Copy Markdown
Collaborator

zakkak commented Mar 26, 2026

Ok, so the issue seems to be that @gastaldi used his personal email. Could you please update the commit to use your work email?

+1, although I don't think we should merge this PR. I created the upstream PR foojayio/discoapi#149

Copy link
Copy Markdown
Collaborator

@zakkak zakkak left a comment

Choose a reason for hiding this comment

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

This is not the right fix. The issue seems to be on the DISCO API side.

@gastaldi
Copy link
Copy Markdown
Author

Ok, I'll close it for now then and hope the DISCO API gets fixed. Thanks!

@gastaldi gastaldi closed this Mar 26, 2026
@zakkak
Copy link
Copy Markdown
Collaborator

zakkak commented Mar 26, 2026

Thank you @gastaldi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Required At least one contributor does not have an approved Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mandrel JDK 17 instead of 21 is downloaded

4 participants