Skip to content

Conversation

@jormundur00
Copy link
Member

@jormundur00 jormundur00 commented Dec 11, 2025

What does this PR do?

This PR introduces versioned schemas for all existing index.json files in the repository and adds a workflow to validate any changed index.json files in a pull request against their respective schemas.

Currently, there are four types of index.json files:

  1. Global metadata index.json

    • Located at metadata/index.json
  2. Library metadata index.json

    • Located at metadata/<groupId>/<artifactId>/index.json for each library in the repository
  3. Global tests index.json

    • Located at tests/src/index.json
  4. Optional test sub-project index.json

    • Located at tests/src/<groupId>/<artifactId>/<version>/index.json
    • Currently, only the example library uses this structure

Additional Changes

  • The following schemas are now packaged with all future releases of GraalVM Reachability Metadata:

    • schemas/metadata-root-index-schema-v1.0.0.json
    • schemas/metadata-library-index-schema-v1.0.0.json
    • schemas/library-and-framework-list-schema-v1.0.0.json

    These are used in Native Build Tools to detect potential mismatches between metadata and build tools versions.


Fixes: #813

@jormundur00 jormundur00 self-assigned this Dec 11, 2025
@jormundur00 jormundur00 added the enhancement New feature or request label Dec 11, 2025
@jormundur00 jormundur00 requested a review from kimeta December 11, 2025 14:39
set -e

# Treat changed_files as a proper array
FILES=(${{ steps.filter.outputs.changed_files }})
Copy link
Member

Choose a reason for hiding this comment

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

We should always strive to do this in gradle. That way I can also do it locally to verify everything is OK.

Copy link
Member Author

Choose a reason for hiding this comment

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

Makes sense. I've removed this file-producing part of the GitHub action and created a generateChangedIndexFileMatrix gradle task that will do this in gradle (and is locally test-able). As these tasks require a ci.json entry, I've added it as only tested on java: latest-ea and os: ubuntu-latest as not to produce multiple jobs (because there shouldn't be any change with different jdks for this functionality as we don't run native-image).

@jormundur00 jormundur00 requested a review from a team as a code owner December 12, 2025 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Introduce a version for the metadata repo structure

2 participants