HDDS-15645. ListObjectsV2 returns Owner when FetchOwner is not requested - #10897
Conversation
There was a problem hiding this comment.
Thanks @sravani-revuri for working on this. Overall LGTM!
Please add integration test as well in AbstractS3SDKV1Tests and AbstractS3SDKV2Tests.
Gargi-jais11
left a comment
There was a problem hiding this comment.
Thanks @sravani-revuri for updating the patch. LGTM!, +1.
@sreejasahithi would u like to take a look on this.
There was a problem hiding this comment.
Thanks @sravani-revuri for the PR.
The change LGTM.
FYI: now ListObjectsV2 responses no longer include per-object owner by default (previously always included it). Users that need owner metadata on V2 lists should pass fetch-owner=true.
Yaa that's correct for per-object owner user needs list-objectv1 or fetch-owner=true. |
|
Thanks @sravani-revuri for working on this and @sreejasahithi for the review. |
What changes were proposed in this pull request?
The S3 compatibility tests test_bucket_listv2_fetchowner_defaultempty and test_bucket_listv2_fetchowner_empty are failing because in the S3 ListObjectsV2 response, the Owner field is currently included for each object even when the fetch-owner parameter is not set or is false. According to S3 behavior, owner information should only be returned when fetch-owner=true is requested. Update the response generation logic to omit the Owner field unless the fetch-owner flag is enabled.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15645
How was this patch tested?
Written unit tests.