Repository navigation
fix(admin): show environment overrides in config get - #427
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the configuration override display change.
No open issues 🎉
What changed in this PR
Fixes #426 by showing server-reported environment overrides alongside persisted settings in rc admin config get, helping operators distinguish active overrides from stored defaults.
Changes:
- Preserve environment assignments in response order for text and JSON output without changing the JSON schema.
- Redact sensitive environment values, including keys with named-target suffixes, while filtering ordinary comments.
- Add regression coverage for override display, redaction, and keeping environment annotations out of mutation diffs.
| File | Description |
|---|---|
crates/core/src/admin/configuration.rs |
Adds environment-aware rendering, sensitive-value redaction, and unit coverage. |
crates/cli/tests/admin_config.rs |
Tests text and JSON output, secret redaction, and persisted-only mutation diffs. |
crates/cli/src/commands/admin/config.rs |
Uses the new renderer for config queries and updates command help. |
Review effort: Balanced
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 #426.
Background
RustFS returns environment overrides as comment lines before the persisted configuration for each scope. The CLI discarded every comment during client-side redaction. Operators who configured the server through Kubernetes could therefore see
speed="default"even when the same response includedRUSTFS_SCANNER_SPEED=slow.Changes
# RUSTFS_…=…and#RUSTFS_…=…assignments in response order for both text and JSON output. Preserve the existing JSON result string and its schema.Validation
cargo fmt --all --checkcargo clippy --workspace -- -D warningscargo clippy --workspace --all-targets -- -D warningscargo test --workspaceEC:8overrides andslowalongside the persisted values.