Parse positional server names on start - #366
Open
sdairs wants to merge 2 commits into
Open
Conversation
sdairs
force-pushed
the
issue-357-server-start-name
branch
from
August 5, 2026 13:42
30a82f8 to
b8a5185
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes clickhousectl local server start argument parsing to align with server stop/remove and prevent clickhousectl flags (e.g. --version) from being silently forwarded as ClickHouse server args. It introduces a positional server name for start, preserves --name for compatibility with an explicit conflict, and requires -- to begin clickhouse-server passthrough arguments.
Changes:
- Accept optional positional server name for
local server start, while keeping--nameas a compatible alternative (mutually exclusive). - Change clickhouse-server passthrough parsing so arguments must be provided after
--(keeping clickhousectl flags parseable). - Add clap parsing regression tests and a subprocess-level regression test covering the original issue scenario.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| README.md | Updates documentation/examples for positional server name and -- passthrough boundary. |
| crates/clickhousectl/src/local/cli.rs | Adjusts clap definitions for server start (positional name, --name compatibility, -- passthrough) and adds parsing tests. |
| crates/clickhousectl/src/local/mod.rs | Wires the two naming forms together (name.or(name_flag)) before calling start_server. |
| crates/clickhousectl/tests/local_server_start_args_test.rs | Adds subprocess regression coverage ensuring positional name doesn’t swallow --version and passthrough args remain isolated. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
sdairs
force-pushed
the
issue-357-server-start-name
branch
from
August 5, 2026 18:28
d088144 to
0dbf795
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #357
Summary
local server start, matching stop and remove--namecompatibility with a clear conflict when both forms are supplied--before clickhouse-server passthrough arguments so later clickhousectl flags remain parseableTests
cargo fmt --allcargo test -p clickhousectl local::cli::testscargo test -p clickhousectl --test local_server_start_args_testcargo test -p clickhousectlcargo clippy -p clickhousectl --all-targets -- -D warnings