Make registry-backfill workflow actually publish backfilled pages#66027
Merged
kaxil merged 1 commit intoapache:mainfrom Apr 28, 2026
Merged
Make registry-backfill workflow actually publish backfilled pages#66027kaxil merged 1 commit intoapache:mainfrom
kaxil merged 1 commit intoapache:mainfrom
Conversation
Three related bugs in `.github/workflows/registry-backfill.yml` that combine to make backfill jobs report success while uploading nothing: 1. **`Download data files from S3 for build` clobbers the in-flight `providers.json`.** The workflow downloads the cached S3 copy of `providers.json` to `registry/src/_data/providers.json` AFTER extraction has run. The cached copy predates the backfilled version, so `provider.versions[]` doesn't list it. `registry/src/_data/providerVersions.js:48-50` then intersects `provider.versions ∩ availableSet` and drops the on-disk `metadata.json` for the new version. Eleventy emits no per-version page for the backfilled version. 2. **`aws s3 sync` exits 0 on missing source.** Combined with (1), the workflow's "Sync backfilled version pages to S3" step silently no-ops when the build didn't emit a page, and the job goes green. 3. **A redundant `Extract version metadata from git tags` step duplicated `breeze registry backfill`'s internal call AND was broken for multi-version matrix entries.** `extract_versions.py:446` declared `--version` as single-valued (no `action="append"`), so when the workflow looped `--version A --version B` argparse only kept the last one. The trailing `|| true` masked the failure. Fixes: - New script `dev/registry/patch_providers_json.py` runs after the S3 download and appends backfilled version(s) into the targeted `provider.versions` array. It also defensively keeps `provider.version` (the latest) in the array -- otherwise patching into a previously-empty list could leave the latest field excluded once the array becomes the authoritative filter for `providerVersions.js`. - Sync step now asserts (a) the per-version `index.html` was emitted, (b) the API directory exists, (c) `parameters.json` is non-empty, before running each `aws s3 sync`. Silent no-ops are now hard failures with `::error::` annotations. - The redundant standalone `Extract version metadata` step is deleted. `breeze registry backfill` already runs `_run_extract_versions` internally and propagates exit codes correctly. `packaging` is now declared as a runtime dep of `dev/registry/` (previously only available transitively via pydantic) since `patch_providers_json.py` uses `packaging.version` for newest-first sorting. Tests: 11 unit tests in `dev/registry/tests/test_patch_providers_json.py` covering append, dedup, unknown-provider error, multi-version, invalid-version sort fallback, empty-list edge (the latest-included guarantee), latest-field-untouched, other-providers-untouched, and three CLI invocation paths.
jscheffl
approved these changes
Apr 28, 2026
Contributor
Backport failed to create: v3-2-test. View the failure log Run detailsNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
You can attempt to backport this manually by running: cherry_picker 7e49884 v3-2-testThis should apply the commit to the v3-2-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continueIf you don't have cherry-picker installed, see the installation guide. |
kaxil
added a commit
that referenced
this pull request
Apr 30, 2026
`aws s3 sync` exits 0 silently when its source directory is missing or empty, so a partial `breeze registry extract-data` failure (one provider errors mid-run, Eleventy still produces a tree, sync uploads stale or empty JSON) would currently report green while leaving the live registry in an inconsistent state. This adds the same pre-sync content guards `registry-backfill.yml` got in PR #66027: for incremental builds, assert each target provider's HTML directory + API directory + `versions.json` exist and are non-empty; for full builds, assert the top-level `index.html`, `api/providers.json` listing, and at least one provider subtree under `api/providers/` are present. Any missing artifact aborts the sync with `::error::` before S3 is touched.
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
The
Registry Backfillworkflow has been reporting success while uploading nothing. Three related bugs combine:Cached
providers.jsonoverwrite drops the backfill version.registry-backfill.yml'sDownload data files from S3 for buildstep writes the cached S3providers.jsontoregistry/src/_data/providers.jsonAFTER extraction has run. The cached copy predates the backfilled version, soprovider.versions[]doesn't list it.registry/src/_data/providerVersions.js:48-50then intersectsprovider.versions ∩ availableSetand drops the on-diskmetadata.jsonfor the new version. Eleventy emits no per-version page.Silent
aws s3 syncon missing source. With (1) preventing the page from being built, the next step'saws s3 syncexits 0 on the missing source and the job goes green having uploaded nothing.A redundant
Extract version metadata from git tagsstep that was also broken. It duplicatedbreeze registry backfill's internal call toextract_versions.pyAND was broken for multi-version matrix entries becauseextract_versions.py:446declares--versionas single-valued (noaction="append"). When the workflow looped--version A --version Bargparse only kept the last one. The trailing|| truemasked the failure.Fix
New
dev/registry/patch_providers_json.pyruns after the S3 download and appends the backfilled version(s) intoprovider.versions[]. Defensively keepsprovider.version(latest) in the array so patching a previously-empty list doesn't leave the latest field excluded once the array becomes authoritative forproviderVersions.js.Pre-sync guards assert (a) the per-version
index.htmlwas emitted, (b) the API directory exists, (c)parameters.jsonis non-empty, before eachaws s3 sync. Silent no-ops become hard failures with::error::annotations.Delete the redundant standalone
Extract version metadatastep.breeze registry backfillalready runs_run_extract_versionsinternally and propagates exit codes correctly.Why patch
providers.jsoninstead of changing the intersection inproviderVersions.jsThe intersection is shared by
registry-build.yml(full builds) andregistry-backfill.yml. Changing it affects both flows. Patching is scoped to backfill, mirrors the mental model thatproviders.jsonIS the source of truth for "which versions to expose", and matches whatbreeze registry publish-versionsis supposed to do at the end of the run anyway.Gotchas
packagingis now declared as a runtime dep ofdev/registry/. It was already available transitively viapydantic, but the patch script usespackaging.versionfor newest-first sorting and shouldn't rely on a transitive dep.classesis non-empty: providers likecommon-compatlegitimately have zero modules ("Configuration-only provider"), and the page renders a placeholder for them.Known follow-up (separate PR)
The
publish-versionsjob runs in a fresh checkout whereproviders.jsonis gitignored, sopublish_registry_versions.py:119-127raisesFileNotFoundErrorafter the per-version sync. Tracked separately and shipping right after this PR; not in scope here.Verification
This PR alone makes the per-version pages land on S3 correctly. Once the follow-up
publish-versionsfix lands, the smoke test (amazon/9.24.0 google/21.0.0 common-compat/1.14.2) should go fully green:Tests in
dev/registry/tests/test_patch_providers_json.pycover 11 cases including the empty-list / latest-field edges.Linked prior fixes that built the chain to here: #65972, #65975, #65987, #65984, #65989.