fix(browser): preserve S3 object deletion semantics - #230
Merged
Conversation
cxymds
marked this pull request as draft
September 11, 2026 09:27
cxymds
marked this pull request as ready for review
September 11, 2026 13:29
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.
Pull Request
Description
Console object deletion could attach
X-Rustfs-Force-Delete: trueto requests that should have used ordinary S3 deletion semantics. The header is a RustFS recursive-delete extension, so using it for a selected file could require elevated handling and expand the operation beyond the exact object key.This change keeps the extension for folder-wide Delete All Versions tasks while making every ordinary SDK path S3-compatible:
DeleteObject, withVersionIdonly when the user selected a concrete version;ListObjectVersions, keeps only the exact key, and sends explicit version IDs throughDeleteObjectsin batches of at most 1000;ListObjectsV2plusDeleteObjectsflow;Version and delete-marker enumeration completes before mutation starts, pagination must advance, and partial
DeleteObjectsfailures surface immediately.Type of Change
Testing
Passed with Node.js 22.22.0 and the pinned pnpm 12.3.4:
All 583 tests pass. Focused regression coverage verifies exact-key filtering across versions and delete markers,
nullversions, 1000-item batching, 1001-item pagination, non-advancing pagination rejection, partial batch errors, explicit version deletion, ordinary folder behavior, force-header isolation, and cancellation.Browser verification used a disposable RustFS backend at commit
4c2ba0896and the same non-rootconsoleAdminuser before and after. Single-object deletion changed from HTTP 403 with the force header to HTTP 204 without it. The selected object disappeared and its similarly prefixed sibling remained. Folder deletion also completed at a 390px viewport using standard requests. Independent API probes confirmed that a readonly user is still denied, neighboring prefixes remain intact, and ordinary deletes preserve historical versions in enabled and suspended buckets.Checklist
Related Issues
Fixes rustfs/rustfs#7649
Screenshots (if applicable)
Desktop captures show the same object deletion with the same IAM user and backend at 1280 x 720.
390px viewport: object and folder deletion completed
Additional Notes
The RustFS force-delete extension remains available for a folder-wide all-version operation; SDK users and other S3 clients continue to use standard request shapes. Independent Reviewer and Simplifier passes found no issues in the final behavior or test coverage.
Rollback is a revert of these Console commits. No API, storage, configuration, or data migration is required.