v0.48.0
版本发布时间: 2024-07-29 20:35:52
apache/opendal最新发布版本:v0.49.2(2024-08-29 15:40:35)
Release List
Name | Version |
---|---|
core | 0.48.0 |
integrations/cloudfilter | 0.0.0 |
integrations/dav-server | 0.0.6 |
integrations/fuse3 | 0.0.3 |
integrations/object_store | 0.45.0 |
integrations/unftp-sbe | 0.0.3 |
bin/oay | 0.41.7 |
bin/ofs | 0.0.8 |
bin/oli | 0.41.7 |
bindings/c | 0.44.9 |
bindings/cpp | 0.45.7 |
bindings/dotnet | 0.1.5 |
bindings/haskell | 0.44.7 |
bindings/java | 0.46.4 |
bindings/lua | 0.1.5 |
bindings/nodejs | 0.47.1 |
bindings/php | 0.1.5 |
bindings/python | 0.45.7 |
bindings/ruby | 0.1.5 |
OpenDAL Core Upgrade to v0.48
Public API
Typo in customized_credential_load
Since v0.48, the customed_credential_load
function has been renamed to customized_credential_load
to fix the typo of customized
.
- builder.customed_credential_load(v);
+ builder.customized_credential_load(v);
S3 service rename security_token
to session_token
In 2014 Amazon switched from AWS_SECURITY_TOKEN
to AWS_SESSION_TOKEN
. To be consistent with the naming of AWS STS, we have renamed the security_token
field to session_token
in the S3 service.
- builder.security_token(v);
+ builder.session_token(v);
Operator from_iter
and via_iter
replaces from_map
and via_map
Since v0.48, Operator's new APIs from_iter
and via_iter
methods have deprecated the from_map
and via_map
methods.
- Operator::from_map::<Fs>(map)?.finish();
+ Operator::from_iter::<Fs>(map)?.finish();
New API from_iter
and via_iter
should cover all use cases of from_map
and via_map
.
Service builder now takes ownership
Since v0.48, all service builder now takes ownership self
instead of &mut self
. This change will allow users to configure the service in a more flexible way.
- let mut builder = S3::default();
- builder.bucket("test");
- builder.root("/path/to/root");
+ let builder = S3::default().bucket("test").root("/path/to/root");
let op = Operator::new(builder)?.finish();
Raw API
oio::Write::write
will write the whole buffer
Starting from version 0.48, oio::Write::write
now writes the entire buffer. This update aligns the API more closely with oio::Read::read
and simplifies the implementation of concurrent writing.
trait Write {
- fn write(&mut self, bs: Buffer) -> impl Future<Output = Result<usize>>;
+ fn write(&mut self, bs: Buffer) -> impl Future<Output = Result<()>>;
}
write
will now return Result<()>
instead of Result<usize>
. The number of bytes written can be obtained from the buffer's length.
Access::metadata()
will return Arc<AccessInfo>
Starting from version 0.48, Access::metadata()
will return Arc<AccessInfo>
instead of AccessInfo
. This change is intended to improve performance and reduce memory usage.
trait Access {
- fn metadata(&self) -> AccessInfo;
+ fn metadata(&self) -> Arc<AccessInfo>;
}
MinitraceLayer
renamed to FastraceLayer
The MinitraceLayer
has been renamed to FastraceLayer
to respond to the transition from minitrace
to fastrace
.
- use opendal::layers::MinitraceLayer;
+ use opendal::layers::FastraceLayer;
Use Configurator
to replace Builder::from_config
Since v0.48, the Builder::from_config
and Builder::from_map
method has been replaced by the Configurator
trait. The Configurator
trait provides a more flexible and extensible way to configure OpenDAL.
Service implementers should update their code to use the Configurator
trait instead:
impl Configurator for MemoryConfig {
fn into_builder(self) -> impl Builder {
MemoryBuilder { config: self }
}
}
impl Builder for MemoryBuilder {
const SCHEME: Scheme = Scheme::Memory;
type Config = MemoryConfig;
fn build(self) -> Result<impl Access> {
...
}
}
What's Changed
Added
- feat(services/fs): Support fs config by @meteorgan in https://github.com/apache/opendal/pull/4853
- feat(services): init monoiofs by @NKID00 in https://github.com/apache/opendal/pull/4855
- feat(core/types): avoid a copy in
Buffer::to_bytes()
by cloning contiguous bytes by @LDeakin in https://github.com/apache/opendal/pull/4858 - feat(core): Add object versioning for OSS by @Lzzzzzt in https://github.com/apache/opendal/pull/4870
- feat: fs add concurrent write by @hoslo in https://github.com/apache/opendal/pull/4817
- feat(services/s3): Add object versioning for S3 by @Lzzzzzt in https://github.com/apache/opendal/pull/4873
- feat(integrations/cloudfilter): read only cloud filter by @ho-229 in https://github.com/apache/opendal/pull/4856
- feat(bindings/go): Add full native support from C to Go. by @yuchanns in https://github.com/apache/opendal/pull/4886
- feat(bindings/go): add benchmark. by @yuchanns in https://github.com/apache/opendal/pull/4893
- feat(core): support user defined metadata for oss by @meteorgan in https://github.com/apache/opendal/pull/4881
- feat(service/fastrace): rename minitrace to fastrace by @andylokandy in https://github.com/apache/opendal/pull/4906
- feat(prometheus-client): add metric label about
root
on using PrometheusClientLayer by @flaneur2020 in https://github.com/apache/opendal/pull/4907 - feat(services/monoiofs): monoio wrapper by @NKID00 in https://github.com/apache/opendal/pull/4885
- feat(layers/mime-guess): add a layer that can automatically set
Content-Type
based on the extension in the path. by @czy-29 in https://github.com/apache/opendal/pull/4912 - feat(core)!: Make config data object by @tisonkun in https://github.com/apache/opendal/pull/4915
- feat(core)!: from_map is now fallible by @tisonkun in https://github.com/apache/opendal/pull/4917
- ci(bindings/go): always test against the latest core by @yuchanns in https://github.com/apache/opendal/pull/4913
- feat(!): Allow users to build operator from config by @Xuanwo in https://github.com/apache/opendal/pull/4919
- feat: Add from_iter and via_iter for operator by @Xuanwo in https://github.com/apache/opendal/pull/4921
Changed
- refactor(services/s3)!: renamed security_token to session_token by @Zyyeric in https://github.com/apache/opendal/pull/4875
- refactor(core)!: Make oio::Write always write all given buffer by @Xuanwo in https://github.com/apache/opendal/pull/4880
- refactor(core)!: Return
Arc<AccessInfo>
for metadata by @Lzzzzzt in https://github.com/apache/opendal/pull/4883 - refactor(core!): Make service builder takes ownership by @Xuanwo in https://github.com/apache/opendal/pull/4922
- refactor(integrations/cloudfilter): implement Filter instead of SyncFilter by @ho-229 in https://github.com/apache/opendal/pull/4920
Fixed
- fix(services/s3): NoSuchBucket is a ConfigInvalid for OpenDAL by @tisonkun in https://github.com/apache/opendal/pull/4895
- fix: oss will not use the port by @Lzzzzzt in https://github.com/apache/opendal/pull/4899
Docs
- docs(core): update README to add
MimeGuessLayer
. by @czy-29 in https://github.com/apache/opendal/pull/4916 - docs(core): Add upgrade docs for 0.48 by @Xuanwo in https://github.com/apache/opendal/pull/4924
- docs: fix spelling by @jbampton in https://github.com/apache/opendal/pull/4925
- docs(core): Fix comment for into_futures_async_write by @Xuanwo in https://github.com/apache/opendal/pull/4928
CI
- ci: Add issue template and pr template for opendal by @Xuanwo in https://github.com/apache/opendal/pull/4884
- ci: Remove CI reviewer since it doesn't work by @Xuanwo in https://github.com/apache/opendal/pull/4891
Chore
- chore!: fix typo customed should be customized by @tisonkun in https://github.com/apache/opendal/pull/4847
- chore: Fix spelling by @jbampton in https://github.com/apache/opendal/pull/4864
- chore: remove unneeded duplicate word by @jbampton in https://github.com/apache/opendal/pull/4865
- chore: fix spelling by @jbampton in https://github.com/apache/opendal/pull/4866
- chore: fix spelling by @NKID00 in https://github.com/apache/opendal/pull/4869
- chore: Make compfs able to test by @Xuanwo in https://github.com/apache/opendal/pull/4878
- chore(services/compfs): remove allow(dead_code) by @George-Miao in https://github.com/apache/opendal/pull/4879
- chore: Make rust 1.80 clippy happy by @Xuanwo in https://github.com/apache/opendal/pull/4927
- chore: Bump crates versions by @Xuanwo in https://github.com/apache/opendal/pull/4929
New Contributors
- @meteorgan made their first contribution in https://github.com/apache/opendal/pull/4853
- @LDeakin made their first contribution in https://github.com/apache/opendal/pull/4858
- @Lzzzzzt made their first contribution in https://github.com/apache/opendal/pull/4870
- @Zyyeric made their first contribution in https://github.com/apache/opendal/pull/4875
- @czy-29 made their first contribution in https://github.com/apache/opendal/pull/4912
Full Changelog: https://github.com/apache/opendal/compare/v0.47.3...v0.48.0