diff --git a/docker/catalog/services/forward-migration.yaml b/docker/catalog/services/forward-migration.yaml index 3e284d525f..6890612a27 100644 --- a/docker/catalog/services/forward-migration.yaml +++ b/docker/catalog/services/forward-migration.yaml @@ -2,7 +2,7 @@ name: forward-migration description: One-shot runner for pending forward SQL migrations image: postgres:16-alpine layer: infrastructure -container_name: omnibase-forward-migration +container_name: omnibase-infra-forward-migration required_env: - POSTGRES_PASSWORD hardcoded_env: diff --git a/docker/docker-compose.infra.yml b/docker/docker-compose.infra.yml index 0ca06a30b7..424340dc83 100644 --- a/docker/docker-compose.infra.yml +++ b/docker/docker-compose.infra.yml @@ -608,7 +608,14 @@ services: # successfully before checking the sentinel flag. forward-migration: image: postgres:16-alpine - container_name: omnibase-forward-migration + # Project-namespaced to match the omnibase-infra-* convention used by every + # other base service (postgres, redpanda, valkey, ...). The bare + # "omnibase-forward-migration" name was the one base container_name NOT + # carrying the lane prefix, so it collided across compose projects on the + # same host (e.g. a leftover dev-lane container blocked a stability rebuild). + # Lane overlays append their lane segment, yielding the derivable form + # -forward-migration that deploy-runtime.sh waits on (OMN-12987). + container_name: omnibase-infra-forward-migration profiles: ["runtime", "full"] depends_on: postgres: diff --git a/scripts/deploy-runtime.sh b/scripts/deploy-runtime.sh index 8348244e6e..e2b352917c 100755 --- a/scripts/deploy-runtime.sh +++ b/scripts/deploy-runtime.sh @@ -1594,7 +1594,14 @@ run_runtime_migration_preflight() { log_cmd "${cmd[*]}" "${cmd[@]}" if [[ "${service}" == "forward-migration" ]]; then - local wait_cmd=(docker wait omnibase-forward-migration) + # Derive the container name from the compose project so the wait + # targets the lane being deployed, not a fixed name. The base + # compose names it -forward-migration and each + # lane overlay follows the same form (OMN-12987), so this resolves + # to omnibase-infra-forward-migration for dev and + # omnibase-infra-stability-test-forward-migration for stability. + local forward_migration_container="${compose_project}-forward-migration" + local wait_cmd=(docker wait "${forward_migration_container}") log_cmd "${wait_cmd[*]}" if [[ "$("${wait_cmd[@]}")" != "0" ]]; then log_error "forward-migration did not complete successfully." @@ -1603,9 +1610,15 @@ run_runtime_migration_preflight() { fi done + # Postgres follows the same lane-derivable naming as forward-migration: + # -postgres (omnibase-infra-postgres for dev, + # omnibase-infra-stability-test-postgres for stability). Deriving it keeps + # the projection-table probe pointed at the lane being deployed instead of + # always hitting the dev-lane postgres (OMN-12987). + local postgres_container="${compose_project}-postgres" for table_name in "${REQUIRED_PROJECTION_TABLES[@]}"; do local check_cmd=( - docker exec omnibase-infra-postgres + docker exec "${postgres_container}" psql -U postgres -d omnidash_analytics diff --git a/tests/integration/infra/test_stability_test_runtime_compose_render.py b/tests/integration/infra/test_stability_test_runtime_compose_render.py index a9a7079a6f..445805d0a8 100644 --- a/tests/integration/infra/test_stability_test_runtime_compose_render.py +++ b/tests/integration/infra/test_stability_test_runtime_compose_render.py @@ -84,7 +84,7 @@ "omnibase-infra-postgres", "omnibase-infra-redpanda", "omnibase-infra-valkey", - "omnibase-forward-migration", + "omnibase-infra-forward-migration", "omnibase-infra-infisical", "omninode-agent-actions-consumer", "omninode-skill-lifecycle-consumer", diff --git a/tests/unit/infra/test_stability_test_runtime_lane.py b/tests/unit/infra/test_stability_test_runtime_lane.py index c26e0f4b6b..ccb581d00e 100644 --- a/tests/unit/infra/test_stability_test_runtime_lane.py +++ b/tests/unit/infra/test_stability_test_runtime_lane.py @@ -34,7 +34,7 @@ "omnibase-infra-postgres", "omnibase-infra-redpanda", "omnibase-infra-valkey", - "omnibase-forward-migration", + "omnibase-infra-forward-migration", "omnibase-infra-infisical", "omninode-agent-actions-consumer", "omninode-skill-lifecycle-consumer",