* Fix: Support object tagging in versioned buckets (Issue #7868)
This fix addresses the issue where setting tags on files in versioned buckets would fail with 'filer: no entry is found in filer store' error.
Changes:
- Updated GetObjectTaggingHandler to check versioning status and retrieve correct object versions
- Updated PutObjectTaggingHandler to properly locate and update tags on versioned objects
- Updated DeleteObjectTaggingHandler to delete tags from versioned objects
- Added proper handling for both specific versions and latest versions
- Added distinction between null versions (pre-versioning objects) and versioned objects
The fix follows the same versioning-aware pattern already implemented in ACL handlers.
Tests:
- Added comprehensive test suite for tagging operations on versioned buckets
- Tests cover PUT, GET, and DELETE tagging operations on specific versions and latest versions
- Tests verify tag isolation between different versions of the same object
* Fix: Ensure consistent directory path construction in tagging handlers
Changed directory path construction to match the pattern used in ACL handlers:
- Added missing '/' before object path when constructing .versions directory path
- This ensures compatibility with the filer's expected path structure
- Applied to both PutObjectTaggingHandler and DeleteObjectTaggingHandler
* Revert: Remove redundant slash in path construction - object already has leading slash from NormalizeObjectKey
* Fix: Remove redundant slashes in versioning path construction across handlers
- getVersionedObjectDir: object already starts with '/', no need for extra '/'
- ACL handlers: same pattern, fix both PutObjectAcl locations
- Ensures consistent path construction with object parameter normalization
* fix test compilation
* Add: Comprehensive ACL tests for versioned and non-versioned buckets
- Added s3_acl_versioning_test.go with 5 test cases covering:
* GetObjectAcl on versioned buckets
* GetObjectAcl on specific versions
* PutObjectAcl on versioned buckets
* PutObjectAcl on specific versions
* Independent ACL management across versions
These tests were missing and would have caught the path construction
issues we just fixed in the ACL handler. Tests validate that ACL
operations work correctly on both versioned and non-versioned objects.
* Fix: Correct tagging versioning test file formatting
* fix: Update AWS SDK endpoint config and improve cleanup to handle delete markers
- Replace deprecated EndpointResolverWithOptions with BaseEndpoint in AWS SDK v2 client configuration
- Update cleanupTestBucket to properly delete both object versions and delete markers
- Apply changes to both ACL and tagging test files for consistency
* Fix S3 multi-delete for versioned objects
The bug was in getVersionedObjectDir() which was constructing paths without
a slash between the bucket and object key:
BEFORE (WRONG): /buckets/mybucket{key}.versions
AFTER (FIXED): /buckets/mybucket/{key}/.versions
This caused version deletions to claim success but not actually delete files,
breaking S3 compatibility tests:
- test_versioning_multi_object_delete
- test_versioning_multi_object_delete_with_marker
- test_versioning_concurrent_multi_object_delete
- test_object_lock_multi_delete_object_with_retention
Added comprehensive test that reproduces the issue and verifies the fix.
* Remove emojis from test output
1. go get aqwari.net/xml/cmd/xsdgen 2. Add EncodingType element for ListBucketResult in AmazonS3.xsd 3. xsdgen -o s3api_xsd_generated.go -pkg s3api AmazonS3.xsd 4. Remove empty Grantee struct in s3api_xsd_generated.go 5. Remove xmlns: sed s'/http:\/\/s3.amazonaws.com\/doc\/2006-03-01\/\ //' s3api_xsd_generated.go