Skip to content

fix(setupWizard): detect and remove conflicting container names#1275

Open
msukkari wants to merge 1 commit into
mainfrom
msukkari/setup-wizard-container-name-conflict
Open

fix(setupWizard): detect and remove conflicting container names#1275
msukkari wants to merge 1 commit into
mainfrom
msukkari/setup-wizard-container-name-conflict

Conversation

@msukkari
Copy link
Copy Markdown
Contributor

@msukkari msukkari commented Jun 4, 2026

The setup-sourcebot wizard now detects pre-existing containers whose name conflicts with Sourcebot's (e.g. a leftover docker run --name sourcebot ... from an older install) and offers to remove them before starting. This avoids the The container name ... is already in use error that would otherwise cause docker compose up to fail.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • The setup wizard now detects and handles Docker container name conflicts from external containers before starting the deployment process. Users are prompted to resolve any collisions before proceeding.

The setup-sourcebot wizard now detects pre-existing containers whose name
conflicts with Sourcebot's (e.g. a leftover `docker run --name sourcebot`)
and offers to remove them before starting, avoiding the "container name is
already in use" error.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

@msukkari your pull request is missing a changelog!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 4, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0fdda3f3-0d28-4fda-9116-2204d2922f98

📥 Commits

Reviewing files that changed from the base of the PR and between 2c72cce and 8cc48ca.

📒 Files selected for processing (1)
  • packages/setupWizard/src/index.ts

Walkthrough

This PR adds Docker container name collision detection to the setup wizard CLI. After downloading the compose file and performing standard cleanup, the script now detects when other Docker containers use the same names as declared in the compose file and prompts the user to remove those conflicts before proceeding.

Changes

Container name collision detection and setup flow integration

Layer / File(s) Summary
Collision detection utilities
packages/setupWizard/src/index.ts
Helper functions parse container_name values from docker-compose.yml, scan existing Docker containers via docker ps, extract compose project labels, and force-remove conflicting containers.
Setup flow integration
packages/setupWizard/src/index.ts
Post-cleanup block computes the current compose project name, parses declared container names, detects foreign (non-project) container conflicts, and prompts the user to remove them before proceeding to volume and port conflict checks.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: detecting and removing conflicting container names in the setup wizard.
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch msukkari/setup-wizard-container-name-conflict

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant