Fix clickpipe scale usage error for missing scale flags - #628
Open
sdairs wants to merge 1 commit into
Open
Conversation
sdairs
force-pushed
the
fix/605-clickpipe-scale-usage-error
branch
from
August 28, 2026 14:46
0723446 to
b8fc6cb
Compare
`clickpipe scale` with none of --replicas/--cpu-millicores/--memory-gb sent an empty PATCH body, which the API 400s on and the CLI surfaced as a generic "Internal error" (exit 1). Add a required, multi-arg ArgGroup over the three flags so clap rejects the empty case as a usage error (exit 2) before any request is sent. Fixes #605 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
sdairs
force-pushed
the
fix/605-clickpipe-scale-usage-error
branch
from
August 28, 2026 19:41
b8fc6cb to
d248ce8
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.
Summary
cloud clickpipe scale <svc> <pipe>with none of--replicas/--cpu-millicores/--memory-gbsent an empty PATCH body, which the API 400s on and the CLI surfaced generically asError: Internal error(exit 1).multiple(true)clapArgGroupover the three flags on theScalecommand variant so the empty case is now rejected as a client-side usage error (exit 2) before any request is sent, naming the valid flags in the usage message.Stacked PR: based on
fix/604-postgres-switchover-promote, notmain.Test plan
Scalecommand definition: zero flags rejected, each single flag accepted, and a multi-flag combination accepted (crates/clickhousectl/src/cloud/clickpipes.rs).crates/clickhousectl/tests/cli_request_shape_test.rs: no-flag invocation exits 2 without hitting the mock API; single-flag invocation sends the expected PATCH body.cargo fmt --all,cargo clippy --workspace --all-targets -- -D warnings,cargo test -p clickhousectlall pass.README.mdclickpipe scale example to note the flag requirement.Fixes #605
🤖 Generated with Claude Code