Stop all local server engines - #364
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 378f8a8. Configure here.
There was a problem hiding this comment.
Pull request overview
This PR updates clickhousectl’s project-scoped local server stop-all to match the unified server list view by stopping both ClickHouse processes and Postgres containers, and by reporting stop attempts consistently across engines in both human and --json output. It also preserves the existing local postgres stop-all behavior and clarifies that --global stop-all remains ClickHouse-only.
Changes:
- Make project-scoped
local server stop-allstop both ClickHouse and Postgres instances discovered in the current project. - Extend stop-all output entries to include an
enginefield and update human formatting accordingly. - Update docs/help text and strengthen the Postgres integration script + unit tests around the new unified stop-all contract.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| scripts/test-postgres-integration.sh | Reworks the stop-all integration case to assert engine-specific vs unified stop-all behavior via JSON output checks. |
| README.md | Documents that local server stop-all is cross-engine in-project, while --global remains ClickHouse-only. |
| crates/clickhousectl/src/local/postgres.rs | Refactors Postgres stop-all to reuse the shared stop-all reporting helper for consistent output. |
| crates/clickhousectl/src/local/output.rs | Adds engine to stop-all entries and updates display formatting + serialization tests. |
| crates/clickhousectl/src/local/mod.rs | Implements shared stop_servers helper and updates local/global stop-all flows to use engine-aware reporting. |
| crates/clickhousectl/src/local/cli.rs | Updates command help text to describe the unified stop-all scope and adds a clap help test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3ffd706 to
221ca71
Compare

Closes #327
Summary
local server stop-allstop both ClickHouse and Postgres instances shown byserver list.local postgres stop-alland document that--globalremains ClickHouse-only because global Postgres discovery is unsupported.Tests
cargo fmt --allcargo test -p clickhousectl server_stop_allcargo test -p clickhousectl stop_servers_attempts_and_reports_both_enginescargo test -p clickhousectlcargo clippy -p clickhousectl --all-targets -- -D warningsbash -n scripts/test-postgres-integration.shshellcheck scripts/test-postgres-integration.shenv -u AGENT -u OPENCODE -u OPENCODE_PID scripts/test-postgres-integration.sh(15 passed)Ready for review.