Repository navigation
test: build a gateway image whose published pull fails rather than fail the fixture - #581
Merged
Merged
Conversation
…il the fixture Co-Authored-By: Claude <noreply@anthropic.com>
earakely-scale
approved these changes
Nov 9, 2026
andrewpark-scaleai
enabled auto-merge (squash)
November 9, 2026 23:43
Moves the helper into tst/util/published_image.py so a unit test can force a failed lookup, pull, tag or build without Docker or the network. Co-Authored-By: Claude <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.
Why
The goal is a gateway tier that a network hiccup can't fail. #575 made the gateway fixtures pull an image that main has published when its sources are unchanged. In PR #580's run 42716509774, gateway shard 1 failed all five of its tests during fixture setup, because GHCR's blob download broke mid-pull:
The fixture raised there. Before #575 it would have built the image.
What changes
A failed registry lookup, pull or tag now logs a warning, and the fixture builds the image from its Dockerfile as it did before #575. A failed build still raises.
The helper moves to
tst/util/published_image.py, sotst/unit/test_published_image.pycan force each failure without Docker or the network.Verification
docker pullstubbed to fail with the error above, the helper loggedPulling db-web's published image failed, so it's built: …and then randocker build.tst/unit/test_published_image.pycovers the pull, a failed pull or tag, a failed lookup, unpublished sources, and a failed build. Making the helper stop catching failures fails 3 of its 6 tests.gateway_test.pystill collects all 844 items, andruff checkpasses.

Confidence Score: 5/5
The PR appears safe to merge; no actionable issues remain.Summary
Gateway fixtures now build locally when a published-image lookup, pull, or tag fails.
Tests were inspected, not run.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Find published image] --> B{Available?} B -->|Yes| C[Pull amd64 image and tag it] C -->|Success| D[Return] A -->|Lookup fails| E[Build locally] B -->|No| E C -->|Pull or tag fails| E E -->|Build fails| F[Raise error] E -->|Success| DReviews (2) · Last reviewed commit: "test: unit-test the gateway fixtures' pu..." · Reviewed by Greptile