Skip to content

Stop all local server engines - #364

Open
sdairs wants to merge 4 commits into
issue-325-running-remove-errorfrom
issue-327-stop-all-engines
Open

Stop all local server engines#364
sdairs wants to merge 4 commits into
issue-325-running-remove-errorfrom
issue-327-stop-all-engines

Conversation

@sdairs

@sdairs sdairs commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Closes #327

Summary

  • Make project-scoped local server stop-all stop both ClickHouse and Postgres instances shown by server list.
  • Report each attempted engine and per-instance error consistently in human and JSON output.
  • Preserve local postgres stop-all and document that --global remains ClickHouse-only because global Postgres discovery is unsupported.
  • Align the Postgres integration battery with the unified stop-all contract while retaining dedicated Postgres scope coverage.

Tests

  • cargo fmt --all
  • cargo test -p clickhousectl server_stop_all
  • cargo test -p clickhousectl stop_servers_attempts_and_reports_both_engines
  • cargo test -p clickhousectl
  • cargo clippy -p clickhousectl --all-targets -- -D warnings
  • bash -n scripts/test-postgres-integration.sh
  • shellcheck scripts/test-postgres-integration.sh
  • env -u AGENT -u OPENCODE -u OPENCODE_PID scripts/test-postgres-integration.sh (15 passed)

Ready for review.

@sdairs
sdairs requested review from iskakaushik and rndD as code owners August 5, 2026 12:08
@sdairs sdairs changed the title Stop all local server engines (#327) Stop all local server engines Aug 5, 2026
Comment thread crates/clickhousectl/src/local/mod.rs Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread crates/clickhousectl/src/local/mod.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-all stop both ClickHouse and Postgres instances discovered in the current project.
  • Extend stop-all output entries to include an engine field 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.

Comment thread crates/clickhousectl/src/local/mod.rs Outdated
Comment thread scripts/test-postgres-integration.sh
@sdairs
sdairs force-pushed the issue-327-stop-all-engines branch from 3ffd706 to 221ca71 Compare August 5, 2026 18:28
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.

server stop-all silently skips Postgres instances that server list shows in the same table

2 participants