feat(rc-ops)!: add health, readiness, and usage commands - #294
Merged
Conversation
Member
Author
|
This PR supersedes #275 after its base branch was deleted. It carries the prior review fixes: bounded current-object pagination for missing, empty, and repeated tokens; regression tests for those cases; and an end-to-end unsupported-feature exit-code 7 test that verifies no fallback scan occurs. The branch has been integrated with latest main and the full mandatory validation suite passes. Please re-review the migrated changes. |
cxymds
marked this pull request as ready for review
July 22, 2026 14:07
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 rustfs/backlog#1377
Background and user impact
The CLI did not expose RustFS liveness/readiness probes or the server's background-scanner data-usage snapshot. Operators had to combine curl, admin credentials, and custom S3 listing scripts, and a client-side usage scan could become unexpectedly expensive if started implicitly.
What changed
rc pingfor bounded unsignedGET /healthliveness checks.rc readyfor bounded unsignedGET /health/readydependency-readiness checks.rc du ALIAS[/BUCKET[/PREFIX]].GET /rustfs/admin/v3/datausageinfosnapshot when supported.--fallbackbefore any slower client-side S3 scan.Review resolution
dutest asserting unsupported-feature exit code 7 and verifying that fallback scanning is not started.0.1.24, while this PR preserves output v1/v2 and adds only the explicitly versioned v3 families. The protected-file gate is satisfied through the BREAKING marker and migration guidance below.RustFS compatibility and safety
/healthand/health/readyare public operational endpoints; credentials are never attached.--fallbackwas explicit.BREAKING contract note
This PR adds command contracts under the protected
docs/reference/rc/path and is therefore marked BREAKING per repository policy. Existing commands, exit codes, config schema, and output v1/v2 remain unchanged. Consumers of the new commands should select the output-v3 health or usage family.Validation
cargo fmt --all --check: passed.cargo clippy --workspace -- -D warnings: passed with zero warnings.cargo test --workspace: passed.duexit-code, output-schema, replication, and launcher tests: passed after integration with latestmain.