X Tutup
Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

S3: regenerate test snapshots & parity fixes#13824

Merged
bentsku merged 9 commits intomainfrom
s3-regenerate-copy-obj-and-owner
Feb 23, 2026
Merged

S3: regenerate test snapshots & parity fixes#13824
bentsku merged 9 commits intomainfrom
s3-regenerate-copy-obj-and-owner

Conversation

@bentsku
Copy link
Contributor

@bentsku bentsku commented Feb 23, 2026

Motivation & Changes

While reviewing and regenerating some tests for #13554, I realized AWS started returning ChecksumType in CopyObject results, which was something missing as they were returning it for all other operations related to object creation.

I regenerated most snapshots and added the fixes needed:

  • fix HeadBucket result by removing spec patches and use newly added in Botocore HeadBucketOutput
  • return BucketArn in CreateBucket, HeadBucket and ListBuckets
  • remove DisplayName from Owner but not Initiator
  • remove ArgumentValue when null for SSE-C validation

Tests

Related

@bentsku bentsku added this to the 4.14 milestone Feb 23, 2026
@bentsku bentsku self-assigned this Feb 23, 2026
@bentsku bentsku added aws:s3 Amazon Simple Storage Service semver: patch Non-breaking changes which can be included in patch releases docs: skip Pull request does not require documentation changes notes: skip Pull request does not have to be mentioned in the release notes labels Feb 23, 2026
@github-actions
Copy link

github-actions bot commented Feb 23, 2026

Test Results - Preflight, Unit

23 066 tests  ±0   21 175 ✅ ±0   6m 10s ⏱️ -3s
     1 suites ±0    1 891 💤 ±0 
     1 files   ±0        0 ❌ ±0 

Results for commit 3c03ba3. ± Comparison against base commit b8f25f2.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Feb 23, 2026

Test Results (amd64) - Acceptance

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

Results for commit 3c03ba3. ± Comparison against base commit b8f25f2.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

S3 Image Test Results (AMD64 / ARM64)

    2 files      2 suites   8m 19s ⏱️
  573 tests   517 ✅  56 💤 0 ❌
1 146 runs  1 034 ✅ 112 💤 0 ❌

Results for commit 3c03ba3.

@github-actions
Copy link

Test Results (amd64) - Integration, Bootstrap

    5 files      5 suites   2h 41m 54s ⏱️
5 738 tests 5 211 ✅ 527 💤 0 ❌
5 744 runs  5 211 ✅ 533 💤 0 ❌

Results for commit 3c03ba3.

@github-actions
Copy link

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   2h 3m 42s ⏱️ + 2m 25s
5 333 tests ±0  4 962 ✅  - 3  371 💤 +3  0 ❌ ±0 
5 335 runs  ±0  4 962 ✅  - 3  373 💤 +3  0 ❌ ±0 

Results for commit 3c03ba3. ± Comparison against base commit b8f25f2.

This pull request skips 4 and un-skips 1 tests.
tests.aws.services.s3.test_s3_api.TestS3DeletePrecondition ‑ test_delete_object_if_match_all_non_express
tests.aws.services.s3.test_s3_api.TestS3DeletePrecondition ‑ test_delete_object_if_match_modified_non_express
tests.aws.services.s3.test_s3_api.TestS3DeletePrecondition ‑ test_delete_object_if_match_non_express
tests.aws.services.s3.test_s3_api.TestS3DeletePrecondition ‑ test_delete_object_if_match_size_non_express
tests.aws.services.s3.test_s3.TestS3 ‑ test_s3_sse_default_kms_key

@bentsku bentsku marked this pull request as ready for review February 23, 2026 13:51
Copy link
Contributor

@aidehn aidehn left a comment

Choose a reason for hiding this comment

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

Looks good! Pretty confident about this since all the pipelines are passing - just left a comment about potentially creating a ticket for the regression! It's nice we can remove some of the patches too 🔥

snapshot.match("delete_bucket_metrics_configuration_2", delete_err.value.response)


@pytest.mark.skip(
Copy link
Contributor

Choose a reason for hiding this comment

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

It could be worth creating a ticket for this (if not already created or being worked on!)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already existing, see FLC-141, but good thinking 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah perfect, thank you!

@bentsku bentsku merged commit c2cb023 into main Feb 23, 2026
44 checks passed
@bentsku bentsku deleted the s3-regenerate-copy-obj-and-owner branch February 23, 2026 18:42
Timer added a commit to Timer/localstack that referenced this pull request Mar 6, 2026
AWS S3 expanded If-Match conditional delete support to general-purpose
buckets in September 2025. This change removes If-Match from the
unsupported precondition block and validates it using the existing
object_exists_for_precondition_write and
verify_object_equality_precondition_write helpers, matching the pattern
used by PutObject and CopyObject.

Unlike PutObject and CopyObject, DeleteObject accepts If-Match: * (delete
only if the object exists), so that value is handled explicitly rather
than rejected.

x-amz-if-match-size and x-amz-if-match-last-modified-time remain
unsupported as those are still Directory Bucket only.

The TestS3DeletePrecondition class is unskipped (the existing snapshot
for test_delete_object_if_match_non_express was already re-recorded
against AWS in localstack#13824 and shows 412 PreconditionFailed). New tests cover
successful deletes, If-Match: *, and versioned bucket behavior including
delete markers.

Locking for full concurrency guarantees is left as a TODO for a
follow-up, per maintainer guidance on localstack#13330.

Fixes localstack#13323
Timer added a commit to Timer/localstack that referenced this pull request Mar 6, 2026
AWS S3 expanded If-Match conditional delete support to general-purpose
buckets in September 2025. This change removes If-Match from the
unsupported precondition block and validates it using the existing
object_exists_for_precondition_write and
verify_object_equality_precondition_write helpers, matching the pattern
used by PutObject and CopyObject.

Behavior validated against AWS us-east-1:
  - wrong ETag: 412 PreconditionFailed
  - correct ETag: 204, delete proceeds (creates delete marker on
    versioned buckets)
  - object missing or current version is a delete marker: 404 NoSuchKey
    (for both ETag and '*' values — AWS docs say 412 here but actual
    behavior is 404)
  - If-Match: '*' is accepted (unlike PutObject/CopyObject which reject
    it) and means "delete only if the object exists"
  - If-Match combined with VersionId: 501 NotImplemented — AWS rejects
    this combination outright regardless of values

x-amz-if-match-size and x-amz-if-match-last-modified-time remain
unsupported as those are still Directory Bucket only.

The TestS3DeletePrecondition class is unskipped (the existing snapshot
for test_delete_object_if_match_non_express was already re-recorded
against AWS in localstack#13824 and shows 412 PreconditionFailed). New tests cover
all paths above.

Locking for full concurrency guarantees is left as a TODO for a
follow-up, per maintainer guidance on localstack#13330.

Fixes localstack#13323
Timer added a commit to Timer/localstack that referenced this pull request Mar 6, 2026
AWS S3 expanded If-Match conditional delete support to general-purpose
buckets in September 2025. This change removes If-Match from the
unsupported precondition block and validates it using the existing
object_exists_for_precondition_write and
verify_object_equality_precondition_write helpers, matching the pattern
used by PutObject and CopyObject.

Behavior validated against AWS us-east-1:
  - wrong ETag: 412 PreconditionFailed
  - correct ETag: 204, delete proceeds (creates delete marker on
    versioned buckets)
  - object missing or current version is a delete marker: 404 NoSuchKey
    (for both ETag and '*' values — AWS docs say 412 here but actual
    behavior is 404)
  - If-Match: '*' is accepted (unlike PutObject/CopyObject which reject
    it) and means "delete only if the object exists"
  - If-Match combined with VersionId: 501 NotImplemented — AWS rejects
    this combination outright regardless of values

x-amz-if-match-size and x-amz-if-match-last-modified-time remain
unsupported as those are still Directory Bucket only.

The TestS3DeletePrecondition class is unskipped (the existing snapshot
for test_delete_object_if_match_non_express was already re-recorded
against AWS in localstack#13824 and shows 412 PreconditionFailed). New tests cover
all paths above.

Locking for full concurrency guarantees is left as a TODO for a
follow-up, per maintainer guidance on localstack#13330.

Fixes localstack#13323
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

aws:s3 Amazon Simple Storage Service docs: skip Pull request does not require documentation changes notes: skip Pull request does not have to be mentioned in the release notes semver: patch Non-breaking changes which can be included in patch releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

X Tutup