Draft
Conversation
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.
Summary
This adds focused regression coverage for the batch delete path introduced with the recent RustFS force-delete work.
The new
delete_objects_with_optionshelper now handles RustFS-specific request options and parses S3 batch delete responses. The existing tests cover the force-delete header behavior, but they do not exercise the branch where the backend returns a mixed response with both<Deleted>and<Error>entries. That left a gap in the changed code where a future refactor could incorrectly fail the whole request or drop successfully deleted keys.Root cause
The follow-up test coverage around
rm --purgeconcentrated on request construction and the full purge flow. It did not assert the non-fatal partial-success behavior already implemented indelete_objects_with_options.Fix
This PR adds one narrow unit test in
crates/s3/src/client.rsthat feeds a mixedDeleteResultpayload into the captured request client and verifies two things:The change is test-only and stays inside the recently modified S3 delete helper.
Validation
I ran the required checks successfully:
cargo test -p rc-s3 delete_objects_with_partial_errors_returns_deleted_keys --libcargo fmt --all --checkcargo clippy --workspace -- -D warningscargo test --workspaceI also ran
make pre-commitper the automation instruction, but this checkout does not define that target andmakereturnedNo rule to make target 'pre-commit'.