Context
Discovered during implementation of fix for container name collision (#18).
Description
Before 0.1.10, containers were named cognitx-codegraph-{repo_name} (no hash). After upgrading, re-running codegraph init generates a new container name with the hash suffix and starts a new container — but the old one keeps running. Users end up with both containers alive, wasting memory, and the old one still holds ports 7687/7474 so the new one fails to bind.
Suggested approach
- At the start of
run_init, check docker ps for any container whose name matches cognitx-codegraph-{repo_name} but lacks the expected 8-hex suffix. If found, print a clear warning with the old name and suggest docker rm -f <old_name>.
- Or: document the migration step in the 0.1.10 changelog / ROADMAP.
Context
Discovered during implementation of fix for container name collision (#18).
Description
Before 0.1.10, containers were named
cognitx-codegraph-{repo_name}(no hash). After upgrading, re-runningcodegraph initgenerates a new container name with the hash suffix and starts a new container — but the old one keeps running. Users end up with both containers alive, wasting memory, and the old one still holds ports 7687/7474 so the new one fails to bind.Suggested approach
run_init, checkdocker psfor any container whose name matchescognitx-codegraph-{repo_name}but lacks the expected 8-hex suffix. If found, print a clear warning with the old name and suggestdocker rm -f <old_name>.