Concurrent CI runs kill each other's Postgres (fixed container name + port in ci.yml) #165
Labels
No labels
area:ai
area:ci-cd
area:notifications
area:observability
area:public-pages
backlog
bug
duplicate
enhancement
help wanted
invalid
question
type:decision
type:feature
type:infra
type:maintenance
type:security
v1.0.1
v1.1.0
v1.2.0
v1.3.0
v2.0.0
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/WeatherBot#165
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Discovered while landing #163/#164: both PRs' CI runs started two minutes apart (runs 141 and 142, 2026-08-01 01:31/01:33) and both failed, while the identical branches passed the full suite + ruff on the dev server. A solo rerun of each branch went green.
Root cause
ci.yml's docker-in-job Postgres uses a fixed container name and fixed host port:docker rm -f ci-postgresruns at the start of every job (ci.yml:48) — when two runs overlap on the shared runner host, the second run force-removes the first run's live database mid-suite.-p 5432:5432, so even without the rm, the seconddocker runwould fail on the port bind.Any two PRs whose CI overlaps produce spurious double-red — and worse, the failure mode looks like test flakiness, not infrastructure.
Fix
ci-postgres-${GITHUB_RUN_ID}(scope the pre-cleanrm -fand thealways()teardown to that name).-p 5432) and have the wait-and-detect step discover the mapped port viadocker port, exportingPG_PORTalongsidePG_HOSTfor the migration/test steps.Source: CI failure investigation for #163/#164, Claude session 2026-08-01.