Conversation
restructure clap args to use subcommands with external_subcommand as the catch-all for raw one-shot commands. adds a typed ClusterCommand enum covering all cluster operations (info, nodes, slots, meet, forget, addslots, delslots, setslot, replicate, failover, etc.) with to_tokens() conversion and run_cluster() execution. includes a benchmark stub for the next PR.
This was referenced Feb 10, 2026
Merged
kacy
added a commit
that referenced
this pull request
Feb 11, 2026
restructure clap args to use subcommands with external_subcommand as the catch-all for raw one-shot commands. adds a typed ClusterCommand enum covering all cluster operations (info, nodes, slots, meet, forget, addslots, delslots, setslot, replicate, failover, etc.) with to_tokens() conversion and run_cluster() execution. includes a benchmark stub for the next PR.
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
adds
ember-cli cluster <action>subcommands for cluster management. restructures clap args to support named subcommands (cluster, benchmark) alongside the existing one-shot mode viaexternal_subcommand.new CLI modes:
ember-cli→ REPL (unchanged)ember-cli SET key value→ one-shot (unchanged, via external_subcommand catch-all)ember-cli cluster info→ typed cluster subcommandember-cli benchmark→ stub (wired in next PR)cluster subcommands:
info,nodes,slots,keyslot,myid,meet,forget,addslots,delslots,setslot(with importing/migrating/node/stable sub-actions),replicate,failover(with --force/--takeover),countkeysinslot,getkeysinslot.what was tested
to_tokens()covering every cluster subcommand variantcargo test -p emberkv-cli)cargo clippy --workspace -- -D warnings,cargo fmt --all --check,cargo test --workspace(excluding pre-existing integration flake onping_with_message)design considerations
#[command(external_subcommand)]to preserve backwards compatibility — raw one-shot commands likeember-cli SET key valuestill work without a subcommand prefixClusterCommand::to_tokens()converts typed args to wire-format token arrays, keeping the connection/serialization layer unchangedSetslotActionis a nested subcommand enum for thesetslotsub-actions (importing, migrating, node, stable)