feat(watch)!: stream RustFS object notifications - #295
Merged
Conversation
Member
Author
|
This PR supersedes #273 and carries all prior review fixes. The BrokenPipe path now terminates cleanly without panic, the reconnect counter resets after healthy frames, and both behaviors have regression coverage. The branch is integrated with latest main and the mandatory full workspace validation passes. Please re-review the migrated changes. |
cxymds
marked this pull request as ready for review
July 22, 2026 14:22
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#1374
Background and user impact
rchad no equivalent tomc watch. Users could not observe RustFS object creation, access, removal, version, or delete-marker activity from the CLI without polling.Solution
rc-core.rc watch ALIAS[/BUCKET]with mc-compatible event shorthands, prefix/suffix filters, compact schema-v3 JSON Lines, human output, quiet mode, reconnects, and Ctrl-C handling.listen_notificationonly for the exact known RustFS1.0.0-beta.10release family while allowing undeclared future servers to answer authoritatively.Review resolution
This PR supersedes #273 after its deleted base branch made reopening impossible.
println!paths with fallible stdout writers.BrokenPipeas a clean watch termination with exit code 0, coveringhead,grep -m1, and closed pager pipelines without panic or spurious stderr.--reconnect-attemptscounts consecutive failures rather than lifetime disconnects.BREAKING protected-file process
BREAKING: this PR adds a public command contract under the protected
docs/reference/rc/tree. The behavior is additive: no existing command, flag, exit code, configuration schema, or v1/v2 output contract changes. New watch consumers should read one schema-v3 JSON object per line and tolerate optionaldelete_markerandsourcefields. Transport keepalives are consumed without emitting output records.Validation
cargo fmt --all --check: passed.cargo clippy --workspace -- -D warnings: passed with zero warnings.cargo test --workspace: passed.main.git diff --check: passed.