-
Notifications
You must be signed in to change notification settings - Fork 51
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
Use AWS conventions and defaults for configuring object-store metadata access #2796
base: main
Are you sure you want to change the base?
Conversation
The config struct for metadata client has switched from an explicit bucket name to a URL and renamed to "path", consistent with snapshots configuration. Additionally we now use the shared object store options struct which allows users to directly set a variety of credentials config keys. Finally, we switch to using our object-store-utils crate which handles the client building and AWS credentials caching. This allows us to reuse the AWS SDK conventions for more ergonomic and consistent configuration.
This allows users to use a single bucket for multiple use cases, e.g. metadata and snapshots for the same cluster.
|
||
let store = builder | ||
.with_bucket_name(bucket) | ||
.with_conditional_put(ETagMatch) |
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.
@pcholakov this is important
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.
It's still happening:
restate/crates/object-store-util/src/lib.rs
Lines 131 to 133 in 8be90e8
let builder = builder | |
.with_url(destination) | |
.with_conditional_put(S3ConditionalPut::ETagMatch) |
This change makes object-store backed metadata more ergonomic and consistent with our snapshots configuration.
cc: @igalshilman if you'd like to chime in!
Changes:
Switch object-store metadata to use utils crate
The config struct for metadata client has switched from an explicit bucket name
to a URL and renamed to "path", consistent with snapshots configuration.
Additionally we now use the shared object store options struct which allows
users to directly set a variety of credentials config keys.
Finally, we switch to using our object-store-utils crate which handles the
client building and AWS credentials caching. This allows us to reuse the AWS
SDK conventions for more ergonomic and consistent configuration.
With this change, we now support simplified server configuration like:
Note thought that thanks to the AWS SDK config resolution mechanism, creds are entirely optional. We will use
AWS_PROFILE
,AWS_REGION
, etc. or server environment STS credentials without any additional configuration.Note too, that this breaks compatibility. Since we've never documented or advertised this feature, I feel justified in changing the config keys without maintaining backcompat - let me know if you disagree.
Add support for bucket prefixes
This allows users to use a single bucket for multiple use cases, e.g. metadata and snapshots for the same cluster.
We can now do this - note the
metadata-0
prefix supplied as part of the object store path:Example:
Closes: #2795