Skip to content

fix(ci): pin pr-test-gate Postgres version to match ci.yml and docs - #1387

Open
Ajibose wants to merge 1 commit into
LabsCrypt:mainfrom
Ajibose:infra/pin-postgres-version
Open

fix(ci): pin pr-test-gate Postgres version to match ci.yml and docs#1387
Ajibose wants to merge 1 commit into
LabsCrypt:mainfrom
Ajibose:infra/pin-postgres-version

Conversation

@Ajibose

@Ajibose Ajibose commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Closes #1282

Summary

The backend/Prisma test suite was running against three different Postgres versions depending on where it executed: postgres:16-alpine (digest-pinned) in ci.yml, plain postgres:15 in pr-test-gate.yml, and a documented floor of "PostgreSQL 14+" in docs/DEVELOPMENT.md. This risked version-specific SQL/Prisma behavior differences going undetected in whichever path wasn't exercised for a given change, and could produce "passes in one CI workflow, fails in the other" flakiness unrelated to the code under test.

This PR pins all three sources to Postgres 16, matching the version already used in docker-compose.yml (the production target) and ci.yml.

Changes

Modified files

  • .github/workflows/pr-test-gate.yml — the backend-test job's Postgres service image is changed from postgres:15 to postgres:16-alpine@sha256:e013e867e712fec275706a6c51c966f0bb0c93cfa8f51000f85a15f9865a28cb, the same digest-pinned image already used by ci.yml and docker-compose.yml. A comment notes the three files should stay in sync.
  • docs/DEVELOPMENT.md — the prerequisites list now states "PostgreSQL 16 (matches the version pinned in docker-compose.yml and CI)" instead of "PostgreSQL 14+".

New files

None.

Test files

None — this is a CI/documentation-only change. There is no application code path to unit test; the correctness of the change is that all three sources now name the same Postgres major version (16), which is verifiable by inspection and by the pr-test-gate.yml workflow itself running successfully against the pinned image on this PR.

Implementation details

  • Reused the exact same digest-pinned postgres:16-alpine image reference from ci.yml/docker-compose.yml rather than a bare postgres:16 tag, so all three service definitions resolve to the identical image and stay reproducible.
  • Left the rest of the postgres service block in pr-test-gate.yml (env vars, ports, health-check options) untouched — only the image reference changed.

How to test

  1. Inspect the three sources and confirm they all reference Postgres 16:
    • .github/workflows/ci.ymlpostgres:16-alpine@sha256:...
    • .github/workflows/pr-test-gate.ymlpostgres:16-alpine@sha256:... (same digest)
    • docs/DEVELOPMENT.md — "PostgreSQL 16"
  2. Open this PR and confirm the "PR Test Gate" workflow's backend-test job runs successfully against the Postgres 16 service container.

Aligns pr-test-gate.yml's Postgres service image with the version
already pinned in ci.yml and docker-compose.yml (16-alpine, digest
pinned) and updates docs/DEVELOPMENT.md's stated version floor
accordingly, so the backend/Prisma test suite runs against the same
Postgres major version everywhere instead of drifting between 15, 16,
and a documented "14+" floor.

Closes LabsCrypt#1282
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.

[Audit] Two CI workflows run the same backend test suite against different Postgres major versions

1 participant