Skip to content

[v3-2-test] Filter unreleased phantom versions from registry build (#65984)#66902

Merged
vatsrahul1001 merged 1 commit into
v3-2-testfrom
backport-322-65984
May 14, 2026
Merged

[v3-2-test] Filter unreleased phantom versions from registry build (#65984)#66902
vatsrahul1001 merged 1 commit into
v3-2-testfrom
backport-322-65984

Conversation

@vatsrahul1001
Copy link
Copy Markdown
Contributor

@vatsrahul1001 vatsrahul1001 commented May 14, 2026

Cherry-pick of #65984


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.7)

Generated-by: Claude Code (Opus 4.7) following the guidelines

`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)
@vatsrahul1001 vatsrahul1001 merged commit a70a9fe into v3-2-test May 14, 2026
111 checks passed
@vatsrahul1001 vatsrahul1001 deleted the backport-322-65984 branch May 14, 2026 09:46
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Airflow Registry May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools area:registry changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants