Skip to content

ci(container-validation): fall back to testing bundle/SQL when prod artifacts absent (pre-GA)#146

Closed
jsokol wants to merge 2 commits into
masterfrom
FIX-container-validation-testing-bundle-fallback
Closed

ci(container-validation): fall back to testing bundle/SQL when prod artifacts absent (pre-GA)#146
jsokol wants to merge 2 commits into
masterfrom
FIX-container-validation-testing-bundle-fallback

Conversation

@jsokol

@jsokol jsokol commented Jul 10, 2026

Copy link
Copy Markdown
Member

The image downloader stage pulls the app bundle from public/bundles/ (prod) and, for the full-stack image, the SQL from database/master (prod). But bump_downstream_versions opens the docker update-<version> PR at the testing cut — and that version's prod bundle/SQL do not exist until GA (they land via propagate_release_bundle on the testing → master cut). So container-validation on the update-<version> PR fails with a 404 until GA (seen on update-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.com for the bundle and database/testing for the SQL. So the update-<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-001 PR, re-run bump_downstream_versions.yml (regenerates it) or rebase it after this merges.

jsokol and others added 2 commits July 9, 2026 22:03
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant