Thanks to visit codestin.com
Credit goes to github.com

Skip to content

move S3 ASF virtual host proxy and refactor #7001

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 2 commits into from
Oct 11, 2022
Merged

Conversation

bentsku
Copy link
Contributor

@bentsku bentsku commented Oct 10, 2022

This PR moves the S3 ASF virtual host proxy (rewriting virtual host addressed bucket requests to path addressed ones).
It also refactors a bit, adding the handler inside a class, allowing to have the rewriting logic inside of it. Also added a bit of logic removing server added headers (by hypercorn), because they would be added twice (once after being proxied, then when returning the actual response).
Added a small test to check that the headers are actually returned once, not sure it should be in s3 but maybe something along the testing the router or proxy, I'm not sure?

@bentsku bentsku requested a review from thrau as a code owner October 10, 2022 16:17
@bentsku bentsku temporarily deployed to localstack-ext-tests October 10, 2022 16:17 Inactive
@bentsku bentsku temporarily deployed to localstack-ext-tests October 10, 2022 16:41 Inactive
Copy link
Member

@thrau thrau left a comment

Choose a reason for hiding this comment

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

Nice little refactoring! Much cleaner 💯

@bentsku
Copy link
Contributor Author

bentsku commented Oct 10, 2022

@thrau thanks for the review 🙏 Are those CI failures "okay"?

@github-actions
Copy link

github-actions bot commented Oct 10, 2022

LocalStack integration with Pro

       1 files   -     2         1 suites   - 2   51m 4s ⏱️ - 25m 22s
1 389 tests  -   15  1 196 ✔️  -   26  193 💤 +  11  0 ±0 
1 389 runs   - 613  1 196 ✔️  - 392  193 💤  - 221  0 ±0 

Results for commit 9a2664f. ± Comparison against base commit 079d5c0a.

♻️ This comment has been updated with latest results.

@thrau thrau force-pushed the s3-asf-move-vhost branch from cd46736 to 9a2664f Compare October 10, 2022 22:05
@thrau thrau temporarily deployed to localstack-ext-tests October 10, 2022 22:05 Inactive
@thrau
Copy link
Member

thrau commented Oct 10, 2022

yes i think the ones at the time were ok. i've since rebased the PR on your changes from #6987, hopefully nothing broke!

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 79.168% when pulling 9a2664f on s3-asf-move-vhost into 079d5c0 on master.

@bentsku bentsku merged commit bb35e3e into master Oct 11, 2022
@bentsku
Copy link
Contributor Author

bentsku commented Oct 11, 2022

Thanks a lot for the rebase!

@bentsku bentsku deleted the s3-asf-move-vhost branch October 11, 2022 12:55
cmoralesmx pushed a commit to cmoralesmx/localstack that referenced this pull request Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants