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

Force US_EAST_1 for S3 listBuckets call #66

Merged
merged 1 commit into from Mar 24, 2023

Conversation

mdedetrich
Copy link
Contributor

@mdedetrich mdedetrich commented Mar 16, 2023

So this is a bug which I discovered after I added this feature (akka/alpakka#2899) to Alpakka. I didn't manage to fix this in Alpakka because they changed their license to BSL before I discovered it.

Essentially, if you are using the list buckets call from a configured region that is not US_EAST_1 it will fail. As noted this only occurs in AWS and not Minio (Minio is a 3rd party implementation of AWS). I have added a test to confirm this behaviour, i.e. if you revert HttpRequests.listBuckets(s3Headers.headers), Some(Region.US_EAST_1)) to HttpRequests.listBuckets(s3Headers.headers)) the test will fail. Unfortunately in order to replicate this you need an actual AWS account to test against (I personally used a company test account to verify this).

Regarding whether this should be put into 1.1.x or 1.0.x there are arguments both ways. In the current state the listBuckets call will simply just fail to work if you are using a configured non US_EAST_1 region. The only way to work around this is to manually override the attribute (i.e. https://github.com/aiven/guardian-for-apache-kafka/blob/9fce5561479d9800d82583e68b2ff1f0191d46c6/core-s3/src/test/scala/io/aiven/guardian/kafka/s3/Main.scala#L83-L92). If you do this manual workaround in conjunction with this bug fix there is no difference, where as if you don't have this bug fix it wont work at all. So in summary while it is a behavioural change, its very obvious and hence black and white what the change is and most critically there won't be any conflicts if users implemented a manual workaround (like the one I previously mentioned). That being said I have no issues if the community agrees to target this for 1.1.x

@mdedetrich mdedetrich added the bug Something isn't working label Mar 16, 2023
@mdedetrich
Copy link
Contributor Author

Related tests (i.e. S3) passed

Copy link
Contributor

@pjfanning pjfanning left a comment

Choose a reason for hiding this comment

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

Bug fixes make sense

@mdedetrich
Copy link
Contributor Author

@pjfanning What are your views for merging this now vs 1.1.x?

@pjfanning
Copy link
Contributor

if it doesn't work without this fix, merge it now

@mdedetrich
Copy link
Contributor Author

Cool, I'll wait for a week or so to see if anyone else has any objections and then I will merge

@mdedetrich
Copy link
Contributor Author

So I am merging this since no one objected.

@mdedetrich mdedetrich merged commit 56d5aee into apache:main Mar 24, 2023
48 of 49 checks passed
@mdedetrich mdedetrich deleted the force-us-east-1-for-list-buckets branch March 24, 2023 15:18
@pjfanning pjfanning added the release note should be mentioned in release notes label Jun 26, 2023
@pjfanning pjfanning added this to the 1.0.0 milestone Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working release note should be mentioned in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants