Skip to content

Make the metadata directory match the directory packaged with releases#969

Merged
jormundur00 merged 4 commits intomasterfrom
jormundur00/gh-968
Jan 28, 2026
Merged

Make the metadata directory match the directory packaged with releases#969
jormundur00 merged 4 commits intomasterfrom
jormundur00/gh-968

Conversation

@jormundur00
Copy link
Copy Markdown
Member

What does this PR do?

Currently, the result of ./gradlew package doesn't 1:1 match the structure of the metadata directory in the repository. This leads to the inability to run newer releases of buildtools on the reachability metadata repository (starting with 0.11.5-SNAPSHOT), as there we begin verifying the existence of schemas, that currently get packaged in metadata/schemas.

To mitigate this, in this PR we move the metadata directory to have the same structure as the metadata that is packaged. For this goal, we move the schemas directory, as well as the library-and-framework-list.json file to the metadata subdirectory. As all this data is used by buildtools (either to verify correct file formats through schemas, or in the dynamic access section of the build report in the case of library-and-frameworks-list.json), it is reasonable to consider these files metadata (just not "reachability" metadata). Reachability metadata releases already package schemas and the library list inside of the metadata directory, we just match that structure here.

Also in this PR, we remove an unused test-project-index schema and file, as it is unused code (other than the example we define it in).

Fixes: #968

@jormundur00 jormundur00 self-assigned this Jan 26, 2026
@jormundur00 jormundur00 requested a review from vjovanov as a code owner January 26, 2026 13:55
@jormundur00 jormundur00 added the bug Something isn't working label Jan 26, 2026
.filter(m -> !m.equalsIgnoreCase("index.json"))
.map(p -> metadataRoot().relativize(p).toString().replace('\\', '/'))
.filter(rel -> !rel.equalsIgnoreCase("library-and-framework-list.json"))
.filter(rel -> !rel.startsWith("schemas/"))
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Changing any file in the metadata directory previously failed CI if metadata/index.json hasn't been changed. I've added explicit ignores of this rule for the new files, as this is a simple solution, and this rule/check will be removed in a soon-to-be-merged PR anyways (#960).

@@ -1,5 +1,5 @@
{
"$id": "https://raw.githubusercontent.com/oracle/graalvm-reachability-metadata/master/schemas/library-and-framework-support-schema-v1.0.0.json",
"$id": "https://raw.githubusercontent.com/oracle/graalvm-reachability-metadata/master/metadata/schemas/library-and-framework-support-schema-v1.0.0.json",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we need new version of this schema?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Buildtools will see no changes to the packaging (all changes are internal to the metadata repo), so there is no need to bump the schema version (as nothing changed inside of it content-wise, only its location).

@@ -1,5 +1,5 @@
{
"$id": "https://raw.githubusercontent.com/oracle/graalvm-reachability-metadata/master/schemas/metadata-root-index-schema-v1.0.0.json",
"$id": "https://raw.githubusercontent.com/oracle/graalvm-reachability-metadata/master/metadata/schemas/metadata-root-index-schema-v1.0.0.json",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think they can stay in the same spot if we remove the unnecessary one?

Copy link
Copy Markdown
Member Author

@jormundur00 jormundur00 Jan 26, 2026

Choose a reason for hiding this comment

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

Unfortunately, we still have to move these schemas inside of the metadata directory, as thats where buildtools expects them (currently they are packaged there, so metadata releases already see them as if they were in metadata/schemas, but CI and local runs here will fail as schemas are located in the root and not in metadata).

@jormundur00 jormundur00 merged commit 59819b4 into master Jan 28, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Metadata repo doesn't work with the latest buildtools snapshot

3 participants