Conversation
|
(Terraform tests are passing when overriding the ASF provider, see https://github.com/localstack/localstack/actions/runs/3322125332/jobs/5490831947) |
alexrashed
left a comment
There was a problem hiding this comment.
Wow, this is huge! Thanks for grinding through this particularly complex topic! 🚀
I only have a few questions and some minor nitpicks.
|
Thanks a lot for the thorough review @alexrashed ! I've now pushed the changes that you pointed out, thanks again 🙏 |
alexrashed
left a comment
There was a problem hiding this comment.
Thanks for addressing all the comments! It's really quite a complex topic. The code coverage goes down a bit, because the new provider isn't the default yet. But the tests are already in place (with lots of snapshots ❤️) and once we switch to the new provider (or add a new parallel test step for the new S3 provider) it will go up quite a bit! 🚀
|
I'd love to have a new parallel test step for the ASF provider once we know it's ready and out there for the public. If the code coverage is still too low after that, we can write more unit tests and/or integration on not covered parts. |
|
I still can't seem to get a full green build, but it seems to be only a timeout related issue. This could be merged 🎉 |
This implements S3 CORS for the new provider.
Current issues with CORS is that we depend on the service name parser to correctly handle CORS depending on the service (S3 and API GW can both manage their own CORS rules).
We make use of the handler chain, with a very early handler which "pre-parse" the request with a simplified way to determine if the request would be directed towards S3. If it does, we then handle CORS based on the configured rules if there are, otherwise default to the LocalStack behaviour for CORS.
Here's a simplified flow chart for how we handle CORS.
(The top right box will actually differ depending on the previous path, but to simplify the chart, it is drawn as one path only).