test_s3 versioning multi object delete - add more versions for each object#687
Merged
cbodley merged 2 commits intoceph:masterfrom Sep 10, 2025
Merged
test_s3 versioning multi object delete - add more versions for each object#687cbodley merged 2 commits intoceph:masterfrom
cbodley merged 2 commits intoceph:masterfrom
Conversation
…bject Signed-off-by: Oguzhan Ozmen <oozmen@bloomberg.net>
Merged
14 tasks
Contributor
Author
|
@cbodley - realizing that list_objects
added a second commit to check for the 'Versions' key to verify bucket is indeed emptied. |
cbodley
reviewed
Sep 5, 2025
…ersioning Extend test_versioning_concurrent_multi_object_delete to also verify that list_object_versions returns no Versions or DeleteMarkers after all objects and their versions have been deleted. This ensures both list_objects and list_object_versions reflect an empty bucket.
cbodley
approved these changes
Sep 5, 2025
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.
Related ceph PR: ceph/ceph#64800 which changes the handling of the multi object delete for versioned buckets.
Related tracker: https://tracker.ceph.com/issues/72375
Ran the fix from ceph/ceph#64800 with this updated testcase:
NOTE: Warnings are SyntaxWarning for some untouched lines.
Later added the 2nd commit to also check "Versions" key in the response dict for list_object API call as Contents is already not in:
>>> response = c.list_object_versions(Bucket="oozmen-yf2h37n9754h5ohsns2vaf-1") >>> response {'ResponseMetadata': {'RequestId': 'tx00000216387569507080c-0068b84fa6-4191-default', 'HostId': '', 'HTTPStatusCode': 200, 'HTTPHeaders': {'transfer-encoding': 'chunked', 'x-amz-request-id': 'tx00000216387569507080c-0068b84fa6-4191-default', 'content-type': 'application/xml', 'server': 'Ceph Object Gateway (tentacle)', 'date': 'Wed, 03 Sep 2025 14:24:38 GMT', 'connection': 'Keep-Alive'}, 'RetryAttempts': 0}, 'IsTruncated': False, 'KeyMarker': '', 'VersionIdMarker': '', 'Versions': [{'ETag': '"9a53cbcc7dbaf825c0f5309a57c63070"', 'Size': 5, 'StorageClass': 'STANDARD', 'Key': 'key_0', 'VersionId': 'KZbb840Zaq5GyWaDkqlrgaQzrmCmyyZ', 'IsLatest': True, 'LastModified': datetime.datetime(2025, 9, 2, 21, 17, 46, tzinfo=tzlocal()), 'Owner': {'DisplayName': 'M. Tester', 'ID': 'testid'}}, {'ETag': '"bcc0f76ba3ff7262fd88be8c1728708f"', 'Size': 5, 'StorageClass': 'STANDARD', 'Key': 'key_1', 'VersionId': 'fR7Dy7fUO9nffHhB6cLMGmCQOlPFson', 'IsLatest': True, 'LastModified': datetime.datetime(2025, 9, 2, 21, 17, 46, tzinfo=tzlocal()), 'Owner': {'DisplayName': 'M. Tester', 'ID': 'testid'}}, {'ETag': '"24fd6a24d80aabe2116d80b6c3dc89e2"', 'Size': 5, 'StorageClass': 'STANDARD', 'Key': 'key_2', 'VersionId': 'JBc.IaisMpk2DKpupsoXZpebQwDR4hy', 'IsLatest': True, 'LastModified': datetime.datetime(2025, 9, 2, 21, 17, 46, tzinfo=tzlocal()), 'Owner': {'DisplayName': 'M. Tester', 'ID': 'testid'}}, {'ETag': '"29e96a50c5e61e8f7ab39134d50e4b0b"', 'Size': 5, 'StorageClass': 'STANDARD', 'Key': 'key_3', 'VersionId': 'WWDX7WwClQaYGgkFTVl1HuSEZyNTGUk', 'IsLatest': True, 'LastModified': datetime.datetime(2025, 9, 2, 21, 17, 46, tzinfo=tzlocal()), 'Owner': {'DisplayName': 'M. Tester', 'ID': 'testid'}}, {'ETag': '"d261b2f59f6b454da23a5fd5444180c0"', 'Size': 5, 'StorageClass': 'STANDARD', 'Key': 'key_4', 'VersionId': 'kVyjR-AB6dJtAxFnAi-qp6MRAl2A9o7', 'IsLatest': True, 'LastModified': datetime.datetime(2025, 9, 2, 21, 17, 46, tzinfo=tzlocal()), 'Owner': {'DisplayName': 'M. Tester', 'ID': 'testid'}}], 'Name': 'oozmen-yf2h37n9754h5ohsns2vaf-1', 'Prefix': '', 'MaxKeys': 1000, 'EncodingType': 'url'} >>> response.keys() dict_keys(['ResponseMetadata', 'IsTruncated', 'KeyMarker', 'VersionIdMarker', 'Versions', 'Name', 'Prefix', 'MaxKeys', 'EncodingType'])