Skip to content

Fix "latest" version retrieval in verify-new-library-version-compatibility.yml and improve index.json validation#917

Merged
jormundur00 merged 2 commits intomasterfrom
jormundur/gh-914
Jan 8, 2026
Merged

Fix "latest" version retrieval in verify-new-library-version-compatibility.yml and improve index.json validation#917
jormundur00 merged 2 commits intomasterfrom
jormundur/gh-914

Conversation

@jormundur00
Copy link
Copy Markdown
Member

What does this PR do?

This PR transitions the extraction of library test parameters from a GitHub Actions Bash step into a dedicated Gradle task and introduces stricter semantic validation for library indexes.

1. New extractLibraryTestParams Gradle Task

Moved the logic for resolving test paths and versions from unmaintained shell scripts into a formal Gradle task.

  • Authority-Based Resolution: Fixed a bug where the workflow previously ignored the "latest": true flag and the "test-version" overrides in index.json. Previously, the system relied on a simple filesystem directory scan, which could lead to incorrect version selection.
  • Source of Truth: The task now treats index.json as the primary authority. It resolves versions in the following priority:
    1. The entry explicitly marked "latest": true.
    2. The entry with the highest "metadata-version" defined in the JSON.
    3. (Fallback) The highest version directory found on the filesystem.
  • CI Integration: Centralizes the resolution of LATEST_VERSION, TEST_PATH, and TEST_COORDINATES, automatically populating GITHUB_ENV when run in CI.

2. Enhanced Semantic Index Validation

Updated the validateIndexFiles task with a new "Forward-Referencing" integrity check.

  • The Rule: In any index.json, a version in the tested-versions array cannot be higher than the next available metadata-version in the same file.
  • The Problem: This prevents logical inconsistencies where an older metadata entry mistakenly "claims" library versions that actually belong to a newer metadata entry.

Fixes: #914

@jormundur00 jormundur00 requested a review from kimeta January 8, 2026 12:39
@jormundur00 jormundur00 self-assigned this Jan 8, 2026
@jormundur00 jormundur00 requested a review from vjovanov as a code owner January 8, 2026 12:39
@jormundur00 jormundur00 added the bug Something isn't working label Jan 8, 2026
name: "📋 Get list of all supported libraries with newer versions"
# Opens PRs, with labels and assignees. Works only on the main repo.
if: github.repository == 'oracle/graalvm-reachability-metadata'
if: github.repository == 'jormundur00/graalvm-reachability-metadata'
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.

Change this one.

@jormundur00 jormundur00 merged commit fded8a3 into master Jan 8, 2026
29 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: verify-new-library-version-compatibility.yml doesn't take into consideration metadata to test mapping overrides

2 participants