[v3-2-test] Filter unreleased phantom versions from registry build (#65984)#66902
Merged
Conversation
`extract_metadata.py` took the top entry of `provider.yaml`'s `versions:` list as a provider's "latest" version with no verification that a real release tag exists. Provider release prep prepends the next version to `versions:` BEFORE the tag lands, and pre-release-only versions match `versions:` but have no final tag. Without filtering, the registry ships phantom "latest" pointers to non-existent PyPI releases / GitHub tags / docs pages. Concrete cases this PR catches: - `providers/celery/provider.yaml` lists `3.19.0` at the top, but only `providers-celery/3.19.0rc1` and `rc2` tags exist -- no final. - `providers/akeyless/` is brand-new in-tree with `versions: [1.0.0]` but no `providers-akeyless/*` tag. The fix loads all `providers-<id>/<version>` git tags once via `git tag --list 'providers-*'`, walks each provider's `versions:` list newest-first, picks the first entry with a matching tag for the singular `version` (latest) field, and filters the `versions` (list) field to the same tagged subset. Providers with NO version that has a matching tag are skipped from the registry entirely (rather than emitted with phantom pointers). Also filters the `versions` list -- not just the singular `version` -- so downstream consumers like `extract_versions.py`'s backfill don't try to extract from non-existent tags. `registry-build.yml`'s checkout now sets `fetch-tags: true`. Without it the default `fetch-depth: 1` checkout has no tags, the filter silently returns an empty set, and the script falls back to the unfiltered behaviour. `registry-backfill.yml`'s primary checkout already uses `fetch-depth: 0` so tags are present there. Tests: TestLoadReleaseTags (3 cases: parsing, subprocess error, missing git binary), TestFindLatestReleasedVersion (6 cases including phantom top, RC-only, cross-provider mismatch, empty list), and TestVersionsListFiltering (3 cases asserting the list is filtered in parallel with the latest pointer). (cherry picked from commit 38d8d41)
jason810496
approved these changes
May 14, 2026
amoghrajesh
approved these changes
May 14, 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.
Cherry-pick of #65984
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.7) following the guidelines