Skip to content

feat(rustfs): add ftps/webdav defaults to info output#2845

Merged
houseme merged 1 commit into
mainfrom
feature/add-new-feature
May 7, 2026
Merged

feat(rustfs): add ftps/webdav defaults to info output#2845
houseme merged 1 commit into
mainfrom
feature/add-new-feature

Conversation

@houseme
Copy link
Copy Markdown
Contributor

@houseme houseme commented May 7, 2026

Related Issues

N/A

Summary of Changes

  • Enable ftps and webdav in rustfs default features (rustfs/Cargo.toml).
  • Update rustfs info -all output:
    • Default Features now explicitly shows ftps and webdav as enabled by default.
    • Configuration Information now includes FTPS and WebDAV sub-items with related env keys and effective values.
  • Add/extend tests in rustfs/src/config/info.rs to verify both outputs.

Verification

  • make pre-commit
  • cargo test -p rustfs --lib config::info::tests -- --nocapture
  • cargo fmt --all --check

Impact

  • User-visible output change in rustfs info -all:
    • More complete default-feature visibility.
    • Expanded protocol configuration visibility for FTPS/WebDAV.
  • No API contract changes.

Additional Notes

N/A

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

CLA requirements are satisfied for this pull request.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@houseme houseme added this pull request to the merge queue May 7, 2026
Merged via the queue into main with commit f1cd7c1 May 7, 2026
10 checks passed
@houseme houseme deleted the feature/add-new-feature branch May 7, 2026 06:12
Copilot AI review requested due to automatic review settings May 7, 2026 06:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates RustFS’s info -all output to reflect that FTPS and WebDAV are now enabled by default, and expands the configuration section to surface FTPS/WebDAV-related environment keys and effective values. This aligns the CLI’s introspection output with the crate’s new default feature set.

Changes:

  • Enable ftps and webdav as default features in rustfs/Cargo.toml.
  • Update rustfs info -all “Default Features” output to show FTPS/WebDAV as enabled by default.
  • Extend “Configuration Information” output with FTPS/WebDAV sub-items, and add tests covering the new output.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
rustfs/src/config/info.rs Marks FTPS/WebDAV as default-enabled in feature reporting; adds FTPS/WebDAV config rows to info output; adds output assertions in tests.
rustfs/Cargo.toml Enables ftps and webdav as default features; minor formatting cleanup in Tokio feature list.

Comment thread rustfs/src/config/info.rs
Comment on lines +785 to +810
fn format_protocol_config_info() -> String {
const DEFAULT_FTPS_PASSIVE_PORTS: &str = "40000-50000";
const DEFAULT_WEBDAV_MAX_BODY_SIZE: u64 = 5 * 1024 * 1024 * 1024;
const DEFAULT_WEBDAV_REQUEST_TIMEOUT_SECS: u64 = 300;

let ftps_enable = rustfs_utils::get_env_bool(rustfs_config::ENV_FTPS_ENABLE, false);
let ftps_address = rustfs_utils::get_env_str(rustfs_config::ENV_FTPS_ADDRESS, rustfs_config::DEFAULT_FTPS_ADDRESS);
let ftps_tls_enabled = rustfs_utils::get_env_bool(rustfs_config::ENV_FTPS_TLS_ENABLED, true);
let ftps_certs_dir =
rustfs_utils::get_env_opt_str(rustfs_config::ENV_FTPS_CERTS_DIR).unwrap_or_else(|| "(not set)".to_string());
let ftps_ca_file = rustfs_utils::get_env_opt_str(rustfs_config::ENV_FTPS_CA_FILE).unwrap_or_else(|| "(not set)".to_string());
let ftps_passive_ports = rustfs_utils::get_env_opt_str(rustfs_config::ENV_FTPS_PASSIVE_PORTS)
.unwrap_or_else(|| DEFAULT_FTPS_PASSIVE_PORTS.to_string());
let ftps_external_ip =
rustfs_utils::get_env_opt_str(rustfs_config::ENV_FTPS_EXTERNAL_IP).unwrap_or_else(|| "(not set)".to_string());

let webdav_enable = rustfs_utils::get_env_bool(rustfs_config::ENV_WEBDAV_ENABLE, false);
let webdav_address = rustfs_utils::get_env_str(rustfs_config::ENV_WEBDAV_ADDRESS, rustfs_config::DEFAULT_WEBDAV_ADDRESS);
let webdav_tls_enabled = rustfs_utils::get_env_bool(rustfs_config::ENV_WEBDAV_TLS_ENABLED, true);
let webdav_certs_dir =
rustfs_utils::get_env_opt_str(rustfs_config::ENV_WEBDAV_CERTS_DIR).unwrap_or_else(|| "(not set)".to_string());
let webdav_ca_file =
rustfs_utils::get_env_opt_str(rustfs_config::ENV_WEBDAV_CA_FILE).unwrap_or_else(|| "(not set)".to_string());
let webdav_max_body_size = rustfs_utils::get_env_u64(rustfs_config::ENV_WEBDAV_MAX_BODY_SIZE, DEFAULT_WEBDAV_MAX_BODY_SIZE);
let webdav_request_timeout =
rustfs_utils::get_env_u64(rustfs_config::ENV_WEBDAV_REQUEST_TIMEOUT, DEFAULT_WEBDAV_REQUEST_TIMEOUT_SECS);
Comment thread rustfs/src/config/info.rs
Comment on lines +1031 to +1037
assert!(output.contains("| FTPS > Enabled (`RUSTFS_FTPS_ENABLE`) |"));
assert!(output.contains("| FTPS > Address (`RUSTFS_FTPS_ADDRESS`) |"));
assert!(output.contains("| FTPS > Passive Ports (`RUSTFS_FTPS_PASSIVE_PORTS`) |"));
assert!(output.contains("| WebDAV | --- |"));
assert!(output.contains("| WebDAV > Enabled (`RUSTFS_WEBDAV_ENABLE`) |"));
assert!(output.contains("| WebDAV > Address (`RUSTFS_WEBDAV_ADDRESS`) |"));
assert!(output.contains("| WebDAV > Max Body Size (`RUSTFS_WEBDAV_MAX_BODY_SIZE`) |"));
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.

3 participants