fix(engine): per-scope docker compose project names
Every compose invocation used -p decnet so fleet + every topology lived in one docker compose project. --remove-orphans, run during fleet pre-up cleanup and on every topology teardown / rollback, then swept every container in the project not listed in the current compose file — wiping sibling topologies and the flat fleet along with the intended target. Parameterize project on _compose / _compose_with_retry / _compose_ps (default FLEET_COMPOSE_PROJECT="decnet"). Add _topology_compose_project that returns decnet-topo-<id8>, and pass it through every topology compose call site (master deploy_topology + rollback + post-deploy ps, master teardown_topology, agent apply, agent teardown, all four live service mutations on topology deckies). Fleet calls keep the default and are unaffected. Migration: live containers from before this fix remain in the shared "decnet" project and need a one-time manual cleanup before they're reachable to the new topology code paths.
This commit is contained in:
@@ -75,7 +75,7 @@ async def test_topology_add_service_persists_and_runs_compose_up(
|
||||
) -> None:
|
||||
captured: list[tuple[str, ...]] = []
|
||||
|
||||
def fake_compose(*args, compose_file=None, env=None):
|
||||
def fake_compose(*args, compose_file=None, env=None, project=None):
|
||||
captured.append(args)
|
||||
|
||||
monkeypatch.setattr(services_live, "_compose", fake_compose)
|
||||
|
||||
Reference in New Issue
Block a user