Skip to content

fix(admin): show environment overrides in config get - #427

Merged
cxymds merged 1 commit into
mainfrom
cxymds/fix/config-get-env-overrides
Nov 19, 2026
Merged

cxymds merged 1 commit into
mainfrom
cxymds/fix/config-get-env-overrides

Conversation

@cxymds

@cxymds cxymds commented Nov 19, 2026

Copy link
Copy Markdown
Member

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 included RUSTFS_SCANNER_SPEED=slow.

Changes

  • Render server-reported # RUSTFS_…=… and #RUSTFS_…=… assignments in response order for both text and JSON output. Preserve the existing JSON result string and its schema.
  • Apply client-side redaction to environment variables as well as persisted fields, including sensitive keys embedded between a subsystem prefix and a named target suffix.
  • Keep ordinary comments out of the display and keep environment annotations out of exports, history and mutation diffs.

Validation

  • Reproduced both text and JSON failures with command-level regression tests before the fix.
  • cargo fmt --all --check
  • cargo clippy --workspace -- -D warnings
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace
  • Queried the official RustFS 1.0.5 binary in an isolated local instance using 16 temporary directories and the local-testing disk-check bypass. Both text and JSON showed the two EC:8 overrides and slow alongside the persisted values.

Copilot AI balanced review requested due to automatic review settings November 19, 2026 00:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

@cxymds
cxymds merged commit 97e9034 into main Nov 19, 2026
14 checks passed
@cxymds
cxymds deleted the cxymds/fix/config-get-env-overrides branch November 19, 2026 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rc admin config get hides environment-variable overrides and displays only persisted configuration values, which may still be defaults.

2 participants