8000 fix S3 enabling versioning with a ObjectLockEnabledForBucket bucket by bentsku · Pull Request #11768 · localstack/localstack · GitHub
[go: up one dir, main page]

Skip to content

fix S3 enabling versioning with a ObjectLockEnabledForBucket bucket #11768

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 1 commit into from
Oct 31, 2024

Conversation

bentsku
Copy link
Contributor
@bentsku bentsku commented Oct 31, 2024

Motivation

Raised from a support issue with a Crossplane integration.

We would raise InvalidBucketState: An Object Lock configuration is present on this bucket, so the versioning state cannot be changed when setting up a bucket with both versioning and ObjectLock enabled. I've adapted a test case to reproduce this case, where enabling versioning on a bucket that already has it enabled viaObjectLockEnabledForBucket set to True, does not trigger an exception because it's effectively a null operation.

Changes

  • adapt a test to reproduce the exception
  • modify the logic so that we only block changing the status to Suspended

@bentsku bentsku added aws:s3 Amazon Simple Storage Service semver: patch Non-breaking changes which can be included in patch releases labels Oct 31, 2024
@bentsku bentsku added this to the 4.0 milestone Oct 31, 2024
@bentsku bentsku self-assigned this Oct 31, 2024
Copy link

S3 Image Test Results (AMD64 / ARM64)

  2 files  ±0    2 suites  ±0   3m 33s ⏱️ +7s
423 tests ±0  369 ✅ ±0   54 💤 ±0  0 ❌ ±0 
846 runs  ±0  738 ✅ ±0  108 💤 ±0  0 ❌ ±0 

Results for commit f46457f. ± Comparison against base commit 241bfbb.

@bentsku bentsku requested a review from cloutierMat October 31, 2024 12:45
Copy link

LocalStack Community integration with Pro

    2 files  ±    0      2 suites  ±0   57m 20s ⏱️ - 46m 0s
1 567 tests  - 1 953  1 391 ✅  - 1 715  176 💤  - 238  0 ❌ ±0 
1 569 runs   - 1 953  1 391 ✅  - 1 715  178 💤  - 238  0 ❌ ±0 

Results for commit f46457f. ± Comparison against base commit 241bfbb.

This pull request removes 1953 tests.
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_lambda_dynamodb
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_opensearch_crud
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_search_books
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_setup
tests.aws.scenario.kinesis_firehose.test_kinesis_firehose.TestKinesisFirehoseScenario ‑ test_kinesis_firehose_s3
tests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_destination_sns
tests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_infra
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_prefill_dynamodb_table
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input0-SUCCEEDED]
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input1-SUCCEEDED]
…

Copy link
Contributor
@cloutierMat cloutierMat left a comment

Choose a reason for hiding this comment

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

Clean fix! Nice test update! 🚀

@bentsku bentsku merged commit a33c120 into master Oct 31, 2024
48 checks passed
@bentsku bentsku deleted the fix-s3-versioning branch October 31, 2024 17:08
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.

2 participants
0