From 877aea3814215759a917ae667f6aee276802b487 Mon Sep 17 00:00:00 2001 From: autonomic-bot Date: Tue, 4 Aug 2026 17:46:33 +0000 Subject: [PATCH] test(discourse): version-agnostic official-image assertion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test_head_runs_official_image_not_bitnamilegacy hardcoded the migration-era pin discourse/discourse:3.5.3 and went stale on the first legitimate app bump (2026.7.1, weekly 2026-08-03 — caught by verify run 2: the upgrade converged, head image was discourse/discourse:2026.7.1, only the frozen pin failed). The guarded property is the image FAMILY (official vs bitnamilegacy), not a frozen version — now asserts the discourse/discourse: prefix. Not weakened: the bitnami-leak check + official-prefix check together still assert exactly the migration faithfulness; the concrete head pin is exercised by the deploy. --- tests/discourse/test_upgrade.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/discourse/test_upgrade.py b/tests/discourse/test_upgrade.py index b5bc690..eb1c7b3 100644 --- a/tests/discourse/test_upgrade.py +++ b/tests/discourse/test_upgrade.py @@ -6,7 +6,11 @@ migration was never tested. With the version-specific config removed from the al and the dynamic base (last-green/main = bitnamilegacy:3.5.0) deployed only as the *base*, the upgrade chaos redeploy must land the PR head UNMODIFIED. This overlay asserts exactly that, post-upgrade: - 1. the running `app` service image IS the official discourse/discourse:3.5.3 — NOT bitnamilegacy; + 1. the running `app` service image IS from the official `discourse/discourse` repository — + NOT bitnamilegacy. (Version-agnostic since 2026-08-04: the original assertion hardcoded the + migration-era pin `:3.5.3` and went stale on the first legitimate app bump (2026.7.1, weekly + 2026-08-03). The property this test guards is the IMAGE FAMILY — official vs bitnami — not a + frozen version; the exact head pin is already exercised by the deploy itself.) 2. the `sidekiq` service the PR deletes is GONE from the deployed stack. If either fails, the head did not really run (the overlay leaked onto it) → RED. Assertion-only, @@ -26,8 +30,8 @@ def test_head_runs_official_image_not_bitnamilegacy(live_app): f"app image is {image!r} — the bitnamilegacy base leaked onto the PR head " "(the version-specific overlay was applied to the head, the prevb bug)" ) - assert image.startswith("discourse/discourse:3.5.3"), ( - f"app image is {image!r}, expected the PR head's official discourse/discourse:3.5.3 " + assert image.startswith("discourse/discourse:"), ( + f"app image is {image!r}, expected the PR head's official discourse/discourse image " "— the head's image migration was not exercised" )