ci(integration): serialize live-DB jobs to stop host-port collisions#641
ci(integration): serialize live-DB jobs to stop host-port collisions#641coderdan wants to merge 1 commit into
Conversation
…flakes The Supabase and Drizzle EQL v3 integration jobs bring up docker-compose stacks that bind fixed host ports (55430 / 55432 / 55433) on shared Blacksmith runners, with no concurrency guard. Two jobs binding the same port on one host fail at `docker compose up` with "address already in use" — a transient flake unrelated to the code under test (e.g. the Supabase job on #586). Add a job-level concurrency group keyed by the compose variant (`integration-live-db-<db>`, NOT the ref, since two PRs contend for a host port as much as two pushes to one PR). The Drizzle `supabase` leg shares the Supabase workflow's key, so those two queue instead of colliding on 55430/55433; the Drizzle `postgres` leg (55432) keeps its own key and still runs in parallel. `cancel-in-progress: false` queues — a live-DB job sharing one ZeroKMS workspace should finish, not be cut off. Also add a pre-`up` `docker compose down -v --remove-orphans || true` to clear any container leaked onto a reused runner by a hard-killed prior run that skipped its teardown.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
The Supabase v3 integration job on #586 failed CI — but not on anything in the PR. It died in the Start step, before any test ran:
Both
integration-supabase.ymlandintegration-drizzle.ymlbring up docker-compose stacks that bind fixed host ports (55430 / 55432 / 55433) on shared Blacksmith runners, with no concurrency guard. When two such jobs land on the same host at once — or a container leaks onto a reused runner from a hard-killed prior run — the second one can't bind the port and the whole job fails. A re-run of #586's job passed with no code change, confirming the flake.The contention isn't just within one workflow: the Drizzle
supabasematrix leg brings up the same supabase compose (55430/55433) as the Supabase workflow, so they can collide with each other too.Fix
Job-level concurrency keyed by the compose variant on both workflows:
supabaseleg shares the Supabase workflow's key (integration-live-db-supabase), so those two queue instead of colliding on 55430/55433. The Drizzlepostgresleg (55432) has its own key and still runs in parallel.cancel-in-progress: falsequeues rather than cancels — a live-DB job that shares one ZeroKMS workspace should finish, not be interrupted mid-run.Pre-
upcleanup on both (belt-and-braces for a container leaked onto a reused runner by a hard-killed run that skipped itsdown):Notes