-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
OpenDAL S3 parameter support #6127
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for OpenDAL S3 parameters via query strings in S3 URLs, allowing users to customize S3 configurations while maintaining optimized defaults for AWS S3. The change enables parameters like enable_virtual_host_style=false or boolean flags like enable_versioning to be passed directly in the S3 URL.
Key changes:
- Added parameter parsing from S3 URL query strings with type inference for booleans, numbers, and strings
- Refactored credential loading to support static credentials alongside the existing AWS SDK chain
- Implemented parameter validation with blocked parameters (bucket, root) that cannot be overridden
|
When this has been merged, it would be great if the official container images would be build with S3 support enabled. |
This change allows s3:// data paths to include additional parameters as querystrings. The default parameters remain optimized for the official AWS S3 service, but any OpenDAL S3 parameters can be set. For example, to override the default `true` value for `enable_virtual_host_style` you can set the data config to: s3://my-bucket?enable_virtual_host_style=false Boolean parameters can be set to `true` by simply adding the parameter: s3://my-bucket?enable_versioning Fixes dani-garcia#6112
|
@BlackDex since you are on a roll today merging PRs, this seems like a low hanging fruit... ;-) |
|
Thank you so much for this much expected feature. I have tested this for a couple days and deployed it to production today. It works really well and also enables compatibility with Garage, yet another S3 cluster implementation. I have feedback about the admin experience though: However, when ... leads to the following attachment folder URL : The subpath is now part of the region in the query string, which just fails (due to It would be really nice if the subpath was properly inserted before the query string. This either requires some more logic in |
|
Thanks @kaiyou for testing! This really helps us. |
|
Looking through the changelog on the latest OpenDAL version, it looks like I'm wondering if that would also cover this usecase, potentially in a generic way that would make it easier to enable more backends in the future? |
This change allows s3:// data paths to include additional parameters as querystrings. The default parameters remain optimized for the official AWS S3 service, but any OpenDAL S3 parameters can be set. For example, to override the default
truevalue forenable_virtual_host_styleyou can set the data config to:s3://my-bucket?enable_virtual_host_style=false
Boolean parameters can be set to
trueby simply adding the parameter:s3://my-bucket?enable_versioning
Fixes #6112