refactor: remove dead resilience flags and modules#1050
Merged
Conversation
The five global flags --no-resilience, --no-circuit-breaker, --no-retry, --retry-attempts, and --rate-limit appeared in every command's help but were wired to nothing: crates/redisctl/src/resilience.rs is a stub whose wrap_* functions return the client unchanged, and it was not even declared in main.rs, so it only ever compiled into the lib target. Remove the flags, both resilience modules (redisctl and redisctl-core), the ResilienceConfig re-exports, the unused `resilience` field on Profile (silently ignored by serde, so existing configs still load), and the prefix-scanner entries in main.rs. Re-introduce the flags under the same names if and when tower middleware actually lands. Part of #1049 (CODE-02), phase 1 of the de-complexification.
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
Phase 1 of the de-complexification (#1049), finding CODE-02. Pure deletion, behavior-preserving.
The five global flags
--no-resilience,--no-circuit-breaker,--no-retry,--retry-attempts,--rate-limitshowed in every command's--helpbut did nothing:crates/redisctl/src/resilience.rsis a stub whosewrap_*functions return the client unchanged, and it was never declared inmain.rs, so it only ever compiled into the lib target. A user passing--retry-attempts 5got no retries.Removed
Cli(crates/redisctl/src/cli/mod.rs).crates/redisctl/src/resilience.rsandcrates/redisctl-core/src/config/resilience.rs, plus themod/pub uselines and theResilienceConfigre-exports.resiliencefield onProfileand all its initializers. serde ignores unknown fields, so an existing config with aresiliencesection still loads.--retry-attempts/--rate-limit/--no-*entries in themain.rsprefix scanner.Re-introduce the flags under the same names if and when tower middleware actually lands.
Validation
cargo build --workspace,cargo fmt --all -- --check,cargo clippy --workspace --all-targets --all-features -- -D warnings,cargo test --workspace --all-features: all pass.