Make the metadata directory match the directory packaged with releases#969
Make the metadata directory match the directory packaged with releases#969jormundur00 merged 4 commits intomasterfrom
Conversation
b1d324e to
485609f
Compare
| .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/")) |
There was a problem hiding this comment.
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", | |||
There was a problem hiding this comment.
Do we need new version of this schema?
There was a problem hiding this comment.
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", | |||
There was a problem hiding this comment.
I think they can stay in the same spot if we remove the unnecessary one?
There was a problem hiding this comment.
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).
What does this PR do?
Currently, the result of
./gradlew packagedoesn't 1:1 match the structure of themetadatadirectory in the repository. This leads to the inability to run newer releases of buildtools on the reachability metadata repository (starting with0.11.5-SNAPSHOT), as there we begin verifying the existence of schemas, that currently get packaged inmetadata/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
schemasdirectory, as well as thelibrary-and-framework-list.jsonfile to themetadatasubdirectory. 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 oflibrary-and-frameworks-list.json), it is reasonable to consider these files metadata (just not "reachability" metadata). Reachability metadata releases already packageschemasand the library list inside of themetadatadirectory, 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