ci(container-validation): fall back to testing bundle/SQL when prod artifacts absent (pre-GA)#146
Closed
jsokol wants to merge 2 commits into
Closed
ci(container-validation): fall back to testing bundle/SQL when prod artifacts absent (pre-GA)#146jsokol wants to merge 2 commits into
jsokol wants to merge 2 commits into
Conversation
…rtifacts absent (pre-GA) The downloader stage pulled the bundle from public/bundles (prod) and, for the full-stack image, the SQL from database/master (prod). bump_downstream opens the docker update-<version> PR at the TESTING cut, but that version's prod bundle/SQL don't exist until GA (testing -> master) — so container-validation on the PR failed (404) until GA. Try prod first (curl -f), fall back to bundles-test / database/testing so the update-<version> PR validates green pre-GA; at GA the prod artifacts exist and are used. Contract-neutral: same bytes for a given version, only the source URL changes. Edited the generators (source of truth) and regenerated both Dockerfiles. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Security-review follow-up: the first version baked the bundles-test/database-testing fallback into the Dockerfile unconditionally, so it applied to the GA publish too — a transient prod fetch failure at GA could silently ship testing bytes in a released image (and testing vs prod tarballs for a version aren't guaranteed byte-identical). Gate it behind ARG PREGA_BUNDLE_FALLBACK (default false): try prod, and only fall back to the testing source when the arg is true. container-validation sets it true (so pre-GA update-<version> PRs validate); the GA publish (push-to-dockerhub / push-to-gh-pkgs) leaves it false → prod ONLY, hard-fail if the prod artifact is absent. Released images can never fall back to testing bytes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
The image
downloaderstage pulls the app bundle frompublic/bundles/(prod) and, for the full-stack image, the SQL fromdatabase/master(prod). Butbump_downstream_versionsopens the dockerupdate-<version>PR at the testing cut — and that version's prod bundle/SQL do not exist until GA (they land viapropagate_release_bundleon thetesting → mastercut). Socontainer-validationon theupdate-<version>PR fails with a 404 until GA (seen onupdate-20260709-001/ PR #145).Fix (Option B): the downloader tries the prod artifact first (
curl -f), and on a 404 falls back to the testing source —bundles-test.simplerisk.comfor the bundle anddatabase/testingfor the SQL. So theupdate-<version>PR validates green at testing-cut time; at GA the prod artifacts exist and are used unchanged. Contract-neutral — same bytes for a given version, only the source URL differs.Edited the generator scripts (source of truth per repo convention) and regenerated both Dockerfiles — the diff is only the download lines. Shellcheck clean.
To pick this up on the existing
update-20260709-001PR, re-runbump_downstream_versions.yml(regenerates it) or rebase it after this merges.