Skip to content

Conversation

bentsku
Copy link
Contributor

@bentsku bentsku commented May 8, 2023

This PR would fix the case when the usr restore the state created with the legacy S3 provider (everything would be stored in moto). The assumption was that moto would raise an exception if the CORS configuration didn't exist. However, while restoring an older state, the data would exist in moto but not in our store, thus creating a value error when trying to access the CORSRules (NoneType etc etc).

This will properly raise the 404 exception if the state is not properly restored.

@coveralls
Copy link

Coverage Status

Coverage: 82.091% (-0.07%) from 82.161% when pulling abab8f2 on fix-s3-get-bucket-cors into 42f62d3 on master.

@bentsku bentsku added the semver: patch Non-breaking changes which can be included in patch releases label May 8, 2023
@github-actions
Copy link

github-actions bot commented May 8, 2023

LocalStack Community integration with Pro

2 014 tests   1 734 ✔️  1h 17m 54s ⏱️
       2 suites     280 💤
       2 files           0

Results for commit abab8f2.

@bentsku bentsku marked this pull request as ready for review May 9, 2023 10:13
@bentsku bentsku requested a review from macnev2013 as a code owner May 9, 2023 10:13
@bentsku bentsku changed the title wip: fix GetBucketCORS if CORS does not exist in store fix GetBucketCORS if CORS does not exist in store May 9, 2023
@bentsku bentsku self-assigned this May 10, 2023
@bentsku bentsku added the aws:s3 Amazon Simple Storage Service label May 10, 2023
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 e520acc into master May 12, 2023
@bentsku bentsku deleted the fix-s3-get-bucket-cors branch May 12, 2023 08: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.

3 participants