Skip to content

Conversation

@zeitlinger
Copy link

@zeitlinger zeitlinger commented Jan 17, 2026

Changes

Adds a new graalvm-version datasource to fix compatibility issues with Oracle GraalVM versions in the mise manager.

Context

The mise manager currently uses JavaVersionDatasource (Adoptium API) for all Java variants, including oracle-graalvm-* prefixes. However, Adoptium API versions are incompatible with GraalVM, causing failures like
prometheus/client_java#1734.

Please select one of the following:

  • This closes an existing Issue, Closes: #
  • This doesn't close an Issue, but I accept the risk that this PR may be closed if maintainers disagree with its opening or implementation

AI assistance disclosure

Did you use AI tools to create any part of this pull request?

Please select one option and, if yes, briefly describe how AI was used (e.g., code, tests, docs) and which tool(s) you used.

  • No — I did not use AI for this contribution.
  • Yes — minimal assistance (e.g., IDE autocomplete, small code completions, grammar fixes).
  • Yes — substantive assistance (AI-generated non‑trivial portions of code, tests, or documentation).
  • Yes — other (please describe):

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests, but ran on a real repository, or
  • Both unit tests + ran on a real repository

The public repository:

Solution

Created a new graalvm-version datasource that:

  • Queries the mise-java.jdx.dev API for Oracle GraalVM releases
  • Filters results by vendor (oracle-graalvm) and image type (jdk/jre)
  • Uses system detection to map Node.js platform values to API parameters
  • Supports explicit platform specification via query parameters

Package naming format:

  • oracle-graalvm-jdk?system=true - Auto-detect current system
  • oracle-graalvm-jre?os=macosx&architecture=aarch64 - Explicit platform
  • oracle-graalvm-jdk?releaseType=ea - Early access releases

System detection mappings:

  • Architecture: ia32i686, x64x86_64, arm64aarch64, armarm32
  • OS: darwinmacosx, win32windows, linuxlinux

Changes

New files:

  • lib/modules/datasource/graalvm-version/index.ts - Main datasource implementation
  • lib/modules/datasource/graalvm-version/common.ts - System detection utilities
  • lib/modules/datasource/graalvm-version/schema.ts - Zod validation
  • lib/modules/datasource/graalvm-version/types.ts - TypeScript types
  • lib/modules/datasource/graalvm-version/readme.md - Documentation
  • lib/modules/datasource/graalvm-version/*.spec.ts - Comprehensive tests
  • lib/modules/datasource/graalvm-version/__fixtures__/ - Test fixtures

Modified files:

  • lib/modules/datasource/api.ts - Registered new datasource
  • lib/modules/manager/mise/upgradeable-tooling.ts - Updated oracle-graalvm to use new datasource
  • lib/modules/manager/mise/extract.spec.ts - Updated test expectations
  • lib/util/cache/package/namespaces.ts - Added cache namespace

Test Plan

  • All 20 graalvm-version datasource tests passing
  • All 57 mise manager tests passing
  • TypeScript type checking passing
  • Linting passing
  • 100% test coverage for new datasource

Verification:

pnpm vitest graalvm-version --run                                                                                                                                                                                                      
pnpm vitest lib/modules/manager/mise --run                                                                                                                                                                                             
pnpm type-check                                                                                                                                                                                                                        
pnpm lint                                                                                                                                                                                                                              

References


🤖 This PR was written primarily by Claude Code.

@cla-assistant
Copy link

cla-assistant bot commented Jan 17, 2026

CLA assistant check
All committers have signed the CLA.

@jamietanna
Copy link
Contributor

@zeitlinger once you've had a chance to accept the CLA and take a look at the code coverage, can you please also make sure you've followed our PR template? Thanks!

@jamietanna jamietanna marked this pull request as draft January 19, 2026 16:15
@zeitlinger
Copy link
Author

@jamietanna done

@jamietanna
Copy link
Contributor

PR template?

@zeitlinger
Copy link
Author

PR template?

added

@jamietanna jamietanna marked this pull request as ready for review January 20, 2026 12:57
@zeitlinger
Copy link
Author

@jamietanna can you check again?

Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

I would prefer to integrate it into the java-version datasource

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