Skip to content
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

fix S3 lifecycle rule matching with ExpiredObjectDeleteMarker #8752

Merged
merged 1 commit into from Jul 28, 2023

Conversation

bentsku
Copy link
Contributor

@bentsku bentsku commented Jul 26, 2023

This PR fixes #8750

We didn't consider the case where ExpiredObjectDeleteMarker would be set in the Expiration field of rule. Basically, if this is set, you can't set Days or Date so we would serialize a proper header (and we should not).

Adjusted the logic to properly parse the lifecycle configuration so that we can't have Days or Date set with ExpiredObjectDeleteMarker, and adjusted the matching so that we wouldn't return a rule that contains ExpiredObjectDeleteMarker, because you shouldn't serialize a header then.

@bentsku bentsku added aws:s3 Amazon Simple Storage Service semver: patch Non-breaking changes which can be included in patch releases labels Jul 26, 2023
@bentsku bentsku self-assigned this Jul 26, 2023
@bentsku bentsku requested a review from macnev2013 as a code owner July 26, 2023 13:18
@coveralls
Copy link

Coverage Status

coverage: 82.327% (+0.004%) from 82.323% when pulling 599770a on fix-s3-lifecycle into efb72d1 on master.

@github-actions
Copy link

LocalStack Community integration with Pro

       2 files         2 suites   1h 25m 59s ⏱️
2 247 tests 1 903 ✔️ 344 💤 0
2 248 runs  1 903 ✔️ 345 💤 0

Results for commit 599770a.

Copy link
Contributor

@macnev2013 macnev2013 left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏻

@bentsku bentsku merged commit eca5bfd into master Jul 28, 2023
30 checks passed
@bentsku bentsku deleted the fix-s3-lifecycle branch July 28, 2023 21:20
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: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: S3 sync command fails for buckets with expired_object_delete_marker set in lifecycle configuration
3 participants