Thanks to visit codestin.com
Credit goes to github.com

Skip to content

S3: implement ObjectParts in GetObjectAttributes #12764

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 18, 2025
Merged

Conversation

bentsku
Copy link
Contributor

@bentsku bentsku commented Jun 16, 2025

Motivation

As reported by #12757, we dit not return the full ObjectParts response in S3.

The behavior is different if the checksum specified when creating the Multipart Upload with CreateMultipartUpload is of type COMPOSITE or FULL_OBJECT. When it is COMPOSITE, any call to GetObjectAttributes with the ObjectParts attribute specified should act like a ListParts call.

There was a TODO left about it, and this PR implements it.

It needed a change in API as we were not saving the metadata related to the Parts used to create the end object (we only store the data necessary to support PartNumber in GetObject, via the get_part_range function). This minor change in API is properly covered defensively to avoid issues when using this functionality (GetObject with the PartNumber parameter, or the GetObjectAttributes call) with a restored state from a previous version.

Changes

  • improve existing tests related to Checksum and Multipart Uploads to also verify the output of GetObjectAttributes with ObjectParts specified
  • implement the listing behavior based on the new state that is stored when completing a multipart upload

@bentsku bentsku added this to the 4.6 milestone Jun 16, 2025
@bentsku bentsku self-assigned this Jun 16, 2025
@bentsku bentsku added aws:s3 Amazon Simple Storage Service semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases labels Jun 16, 2025
Copy link

S3 Image Test Results (AMD64 / ARM64)

  2 files    2 suites   8m 49s ⏱️
498 tests 448 ✅  50 💤 0 ❌
996 runs  896 ✅ 100 💤 0 ❌

Results for commit ea605bc.

Copy link

Test Results - Preflight, Unit

21 621 tests   19 964 ✅  6m 15s ⏱️
     1 suites   1 657 💤
     1 files         0 ❌

Results for commit ea605bc.

Copy link

Test Results (amd64) - Acceptance

7 tests   5 ✅  3m 8s ⏱️
1 suites  2 💤
1 files    0 ❌

Results for commit ea605bc.

Copy link

Test Results - Alternative Providers

987 tests   589 ✅  30m 35s ⏱️
  4 suites  398 💤
  4 files      0 ❌

Results for commit ea605bc.

Copy link

Test Results (amd64) - Integration, Bootstrap

    5 files      5 suites   1h 25m 9s ⏱️
2 239 tests 1 623 ✅ 616 💤 0 ❌
2 245 runs  1 623 ✅ 622 💤 0 ❌

Results for commit ea605bc.

Copy link

LocalStack Community integration with Pro

    2 files      2 suites   1h 2m 12s ⏱️
2 215 tests 1 596 ✅ 619 💤 0 ❌
2 217 runs  1 596 ✅ 621 💤 0 ❌

Results for commit ea605bc.

@bentsku bentsku marked this pull request as ready for review June 16, 2025 14:45
@bentsku bentsku requested a review from k-a-il June 16, 2025 14:45
Copy link
Contributor

@k-a-il k-a-il left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you for jumping on this issue!

@bentsku bentsku merged commit 99cd6da into master Jun 18, 2025
54 checks passed
@bentsku bentsku deleted the fix-s3-attrs-parts branch June 18, 2025 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:s3 Amazon Simple Storage Service semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants