Improve library stats generation and validation#1620
Merged
Conversation
Member
Author
|
To discuss: Should the coverage be 100% when CC: @vjovanov |
414137b to
0a5dc92
Compare
0a5dc92 to
a3211a8
Compare
vjovanov
reviewed
Apr 6, 2026
vjovanov
left a comment
Member
There was a problem hiding this comment.
Findings from review:
-
Medium: fallback-to-
N/Astill parses dynamic-access artifacts and can fail anyway.- In
AbstractLibraryStatsTask.computeVersionStats, we mark dynamic access unavailable whengenerateDynamicAccessReportfails, but we still callLibraryStatsSupport.buildVersionStats(...), which parsesdynamic-accessfiles. - If failed runs leave malformed/partial files behind, parsing can still throw, so generation does not reliably degrade to
"N/A". - References:
tests/tck-build-logic/src/main/groovy/org/graalvm/internal/tck/harness/tasks/AbstractLibraryStatsTask.java:204-219tests/tck-build-logic/src/main/java/org/graalvm/internal/tck/stats/LibraryStatsSupport.java:192,504+
- In
-
Low: CI docs are out of sync with workflow trigger behavior.
- Workflow now triggers on metadata changes (
metadata/*/*/*/**), but docs still state it only triggers onstats/stats.jsonor schema changes. - References:
.github/workflows/library-stats-validation.yml:20-22docs/CI.md:38
- Workflow now triggers on metadata changes (
Validation I ran locally:
../../gradlew test --tests org.graalvm.internal.tck.harness.tasks.ValidateLibraryStatsTaskTests✅../../gradlew test --tests org.graalvm.internal.tck.stats.LibraryStatsSupportTests✅./gradlew validateLibraryStats✅../../gradlew testintests/tck-build-logichas one unrelated pre-existing failure inScaffoldTaskTests(reproduces onmaster).
Member
Author
|
Addressed in 40ef815. Changes made:
Verification:
|
… no immediate dynamic access calls
vjovanov
approved these changes
Apr 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR expands the library stats support to cover all repo-backed libraries, tightens validation around repository metadata alignment, and makes the library stats validation workflow run when a new metadata version is added.
Changes
stats/stats.json.library-stats-schema-v1.0.1.jsontolibrary-stats-schema-v1.0.2.jsonand updates references in the docs and build logic.library-statsmodel soVersionStats.dynamicAccessuses a dedicated value wrapper that can serialize either a structured dynamic-access payload orN/A, mirroring how unavailable coverage metrics are already represented.VersionStatsbackwards-friendly for producers by retaining the convenience constructor that still acceptsDynamicAccessStatsdirectly.LibraryStatsSchemaValidatorto validate the repository stats file against the metadata layout more strictly.generateLibraryStatscommand to run.library-stats-validation.ymlso the validation job also runs when files are added undermetadata/<groupId>/<artifactId>/<version>/....Testing
../../gradlew test --tests org.graalvm.internal.tck.harness.tasks.ValidateLibraryStatsTaskTestsfromtests/tck-build-logicFixes: #1032