Skip to content

v0.48.0

Compare
Choose a tag to compare
@Xuanwo Xuanwo released this 29 Jul 12:35
· 219 commits to main since this release
v0.48.0
aee7446

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 #4853
  • feat(services): init monoiofs by @NKID00 in #4855
  • feat(core/types): avoid a copy in Buffer::to_bytes() by cloning contiguous bytes by @LDeakin in #4858
  • feat(core): Add object versioning for OSS by @Lzzzzzt in #4870
  • feat: fs add concurrent write by @hoslo in #4817
  • feat(services/s3): Add object versioning for S3 by @Lzzzzzt in #4873
  • feat(integrations/cloudfilter): read only cloud filter by @ho-229 in #4856
  • feat(bindings/go): Add full native support from C to Go. by @yuchanns in #4886
  • feat(bindings/go): add benchmark. by @yuchanns in #4893
  • feat(core): support user defined metadata for oss by @meteorgan in #4881
  • feat(service/fastrace): rename minitrace to fastrace by @andylokandy in #4906
  • feat(prometheus-client): add metric label about root on using PrometheusClientLayer by @flaneur2020 in #4907
  • feat(services/monoiofs): monoio wrapper by @NKID00 in #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 #4912
  • feat(core)!: Make config data object by @tisonkun in #4915
  • feat(core)!: from_map is now fallible by @tisonkun in #4917
  • ci(bindings/go): always test against the latest core by @yuchanns in #4913
  • feat(!): Allow users to build operator from config by @Xuanwo in #4919
  • feat: Add from_iter and via_iter for operator by @Xuanwo in #4921

Changed

  • refactor(services/s3)!: renamed security_token to session_token by @Zyyeric in #4875
  • refactor(core)!: Make oio::Write always write all given buffer by @Xuanwo in #4880
  • refactor(core)!: Return Arc<AccessInfo> for metadata by @Lzzzzzt in #4883
  • refactor(core!): Make service builder takes ownership by @Xuanwo in #4922
  • refactor(integrations/cloudfilter): implement Filter instead of SyncFilter by @ho-229 in #4920

Fixed

  • fix(services/s3): NoSuchBucket is a ConfigInvalid for OpenDAL by @tisonkun in #4895
  • fix: oss will not use the port by @Lzzzzzt in #4899

Docs

CI

  • ci: Add issue template and pr template for opendal by @Xuanwo in #4884
  • ci: Remove CI reviewer since it doesn't work by @Xuanwo in #4891

Chore

New Contributors

Full Changelog: v0.47.3...v0.48.0