tests: pin pagila fixture to v3.1.0 - #54
Merged
Merged
Conversation
The pagila image cloned upstream HEAD unpinned. pagila v4.0.0 requires PostgreSQL 18 (uuidv7() column defaults) and the pgvector extension (CREATE EXTENSION vector), which the PG16/17/18 test images don't provide, so a fresh build broke every pagila-based suite at schema load. Pin to the last pre-v4 tag (v3.1.0), which loads on all supported versions.
Fetch pagila v3.1.0 by commit SHA (fef9675) instead of the tag. Tags are mutable; pinning the SHA makes the fixture reproducible and tamper-resistant (the fixture is loaded into the test DB via psql -f, so it's executable).
mickael-carl
approved these changes
Aug 5, 2026
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.
Problem
tests/Dockerfile.pagilacloned the pagila fixture from upstream HEAD, unpinned (git clone --depth 1, no ref). pagila v4.0.0 (2026-07-28) requires PostgreSQL 18 (uuidv7()column defaults) and the pgvector extension (CREATE EXTENSION vector), neither of which the PG16/17/18 test images provide. So a fresh image build began pulling that schema and broke every pagila-based suite (pagila, follow-, cdc-, extensions, filtering) at schema load, on all three PG versions —ERROR: extension "vector" is not available. It's unpinned-fixture drift, not a code regression; main would fail the same way on a fresh build.There is also a supply-chain angle: the fixture is fetched from an external repo at build time and loaded into the test database via
psql -f, which is code-execution-capable server-side. Fetching an unpinned/mutable ref means CI runs whatever that repo serves at build time.Fix
Pin pagila to the immutable commit SHA for v3.1.0 (
fef9675714cfba1756df4719b5e36075a7ddf90e), the last pre-v4 release, which loads on PG16/17/18 with no extra extensions:SHA (not tag): git tags are mutable and could be re-pointed; the SHA fixes the exact bytes. Shallow fetch-by-SHA keeps the build fast.
Testing
Fresh builds (the Dockerfile change invalidates the clone cache, so pagila is re-fetched at the pinned SHA):
make tests/pagilaon PG18 — passmake tests/pagilaon PG17 — pass (with the tag; SHA points at the same commit)Follow-ups (not in this PR)
pagila-schema.sql+pagila-data.sqlin-tree (~3.1 MB total: 52 KB schema + 3.0 MB data) to eliminate the build-time external fetch entirely and put the content under review — strongest supply-chain posture.postgres:${PGVERSION}(test DB) tracks latest minor and is the next-highest-value pin;debian:sidinDockerfile.debian*is rolling but packaging-QA only (off the CI path). GitHub Actions are already SHA-pinned.