Skip to content

Commit

Permalink
Merge branch 'main' into madsim_layer_archive
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyFan2002 authored Apr 18, 2023
2 parents 01a3ca8 + 22eda0f commit 81f1108
Show file tree
Hide file tree
Showing 69 changed files with 3,137 additions and 370 deletions.
2 changes: 1 addition & 1 deletion .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# NOTE: All configurations could be found here: https://cwiki.apache.org/confluence/display/INFRA/Git+-+.asf.yaml+features
github:
description: "Apache OpenDAL: Access data freely, painlessly, and efficiently."
description: "Apache OpenDAL: access data freely."
homepage: https://opendal.apache.org
labels:
- rust
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/service_test_fs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Test
shell: bash
working-directory: core
run: cargo test fs -- --show-output
run: cargo test services_fs -- --show-output
env:
RUST_BACKTRACE: full
RUST_LOG: debug
Expand Down
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,53 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/)
and this project adheres to [Semantic Versioning](https://semver.org/).

## [v0.31.1] - 2023-04-17

### Added

- feat(services/azdfs): support rename (#1929)
- test: Increate copy/move nested path test depth (#1932)
- feat(layers): add a basic minitrace layer (#1931)
- feat: add Writer::abort method (#1937)
- feat(services/gcs): Allow setting PredefinedAcl (#1989)
- feat(services/oss): add oss cache-control header support (#1986)
- feat: Add PreconditionFailed Error so users can handle them (#1993)
- feat: add http if_none_match support (#1995)
- feat: add oss if-none-match support (#1997)
- feat(services/gcs): Allow setting default storage_class (#1996)
- feat(binding/C): add clang-format for c binding (#2003)

### Changed

- refactor: Polish the behavior of scan (#1926)
- refactor: Polish the implementation of webhdfs (#1935)

### Fixed

- fix: sled should not be enabled by default (#1923)
- fix: kv adapter's writer implementation fixed to honour empty writes (#193
4)
- fix(services/azblob): fix copy missing content-length (#2000)

### Docs

- docs: Adding docs link to python binding (#1921)
- docs(bindings/python): fix wrong doc link (#1928)
- docs: Add contributing for OpenDAL (#1984)
- docs: Add explanation in contributing (#1985)
- docs: Feel relax in community and don't hurry (#1987)
- docs: update contributing (#1998)
- docs(services/memory): Fix wrong explanation (#2002)
- docs: Add OpenDAL VISION (#2007)
- docs: update VISION and behavior tests doc (#2009)

### CI

- ci(bindings/nodejs): Access should be set to public before publish (#1919)
- ci: Re-enable webhdfs test (#1925)
- chore: add .editorconfig (#1988)
- ci: Fix format after adding editorconfig (#1990)

## [v0.31.0] - 2023-04-12

### Added
Expand Down Expand Up @@ -1840,6 +1887,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).

Hello, OpenDAL!

[v0.31.1]: https://github.com/apache/incubator-opendal/compare/v0.31.0...v0.31.1
[v0.31.0]: https://github.com/apache/incubator-opendal/compare/v0.30.5...v0.31.0
[v0.30.5]: https://github.com/apache/incubator-opendal/compare/v0.30.4...v0.30.5
[v0.30.4]: https://github.com/apache/incubator-opendal/compare/v0.30.3...v0.30.4
Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ homepage = "https://opendal.apache.org/"
license = "Apache-2.0"
repository = "https://github.com/apache/incubator-opendal"
rust-version = "1.64"
version = "0.31.0"
version = "0.31.1"

[workspace.dependencies]
opendal = { version = "0.31", path = "core" }
22 changes: 13 additions & 9 deletions bin/oli/src/bin/oli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,19 @@ fn new_cmd(name: &'static str) -> Result<Command> {
let d = config_dir().ok_or_else(|| anyhow!("unknown config dir"))?;
let default_config_path = d.join("oli/config.toml").as_os_str().to_owned();

Ok(Command::new(name).version(env!("CARGO_PKG_VERSION")).arg(
Arg::new("config")
.long("config")
.help("Path to the config file")
.global(true)
.default_value(default_config_path)
.value_parser(value_parser!(PathBuf))
.required(false),
))
Ok(Command::new(name)
.version(env!("CARGO_PKG_VERSION"))
.arg(
Arg::new("config")
.long("config")
.help("Path to the config file")
.global(true)
.default_value(default_config_path)
.value_parser(value_parser!(PathBuf))
.required(false),
)
.subcommand_required(true)
.arg_required_else_help(true))
}

#[tokio::main]
Expand Down
4 changes: 4 additions & 0 deletions bindings/c/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

# Build C bindings

To compile OpenDAL from source code, you'll need:
- C/C++ Toolchain: provides basic tools for compiling and linking OpenDAL C binding. This is available as `build-essential` on Ubuntu and similar names on other platforms.
- `clang-format`: OpenDAL uses clang-format to keep C binding code base clean.

```bash
make
make format
Expand Down
17 changes: 16 additions & 1 deletion bindings/c/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,27 @@

extern crate cbindgen;

use std::path::Path;
use std::io::ErrorKind;
use std::{path::Path, process::Command};

fn main() {
let header_file = Path::new("include").join("opendal.h");

cbindgen::generate(".")
.expect("Unable to generate bindings")
.write_to_file(header_file);

if let Err(e) = Command::new("clang-format")
.arg("--style=WebKit")
.arg("--verbose")
.arg("-i")
.arg("include/opendal.h")
.spawn()
{
if e.kind() == ErrorKind::NotFound {
panic!("\x1b[31mclang-format\x1b[0m not found, please install it through package manager first");
} else {
panic!("Failed to run build.rs: {}", e)
}
}
}
39 changes: 18 additions & 21 deletions bindings/c/include/opendal.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ typedef enum opendal_code {
*/
OPENDAL_NOT_A_DIRECTORY,
/*
The given path already exists thus we failed to the specified operation on
it.
The given path already exists thus we failed to the specified operation on it.
*/
OPENDAL_ALREADY_EXISTS,
/*
Expand Down Expand Up @@ -160,17 +159,15 @@ extern "C" {
#endif // __cplusplus

/*
Returns a result type [`opendal_result_op`], with operator_ptr. If the
construction succeeds the error is nullptr, otherwise it contains the error
information.
Returns a result type [`opendal_result_op`], with operator_ptr. If the construction succeeds
the error is nullptr, otherwise it contains the error information.
# Safety
It is [safe] under two cases below
* The memory pointed to by `scheme` must contain a valid nul terminator at the
end of the string.
* The `scheme` points to NULL, this function simply returns you a null
opendal_operator_ptr
* The memory pointed to by `scheme` must contain a valid nul terminator at the end of
the string.
* The `scheme` points to NULL, this function simply returns you a null opendal_operator_ptr
*/
opendal_operator_ptr opendal_operator_new(const char* scheme);

Expand All @@ -180,14 +177,14 @@ opendal_operator_ptr opendal_operator_new(const char* scheme);
void opendal_operator_free(opendal_operator_ptr op_ptr);

/*
Write the data into the path blockingly by operator, returns the error code
OPENDAL_OK if succeeds, others otherwise
Write the data into the path blockingly by operator, returns the error code OPENDAL_OK
if succeeds, others otherwise
# Safety
It is [safe] under two cases below
* The memory pointed to by `path` must contain a valid nul terminator at the
end of the string.
* The memory pointed to by `path` must contain a valid nul terminator at the end of
the string.
# Panic
Expand All @@ -205,15 +202,15 @@ enum opendal_code opendal_operator_blocking_write(opendal_operator_ptr op_ptr,
# Safety
It is [safe] under two cases below
* The memory pointed to by `path` must contain a valid nul terminator at the
end of the string.
* The memory pointed to by `path` must contain a valid nul terminator at the end of
the string.
# Panic
* If the `path` points to NULL, this function panics
*/
struct opendal_result_read opendal_operator_blocking_read(
opendal_operator_ptr op_ptr, const char* path);
struct opendal_result_read opendal_operator_blocking_read(opendal_operator_ptr op_ptr,
const char* path);

/*
Check whether the path exists.
Expand All @@ -226,15 +223,15 @@ struct opendal_result_read opendal_operator_blocking_read(
# Safety
It is [safe] under two cases below
* The memory pointed to by `path` must contain a valid nul terminator at the
end of the string.
* The memory pointed to by `path` must contain a valid nul terminator at the end of
the string.
# Panic
* If the `path` points to NULL, this function panics
*/
struct opendal_result_is_exist opendal_operator_is_exist(
opendal_operator_ptr op_ptr, const char* path);
struct opendal_result_is_exist opendal_operator_is_exist(opendal_operator_ptr op_ptr,
const char* path);

/*
Frees the heap memory used by the [`opendal_bytes`]
Expand Down
2 changes: 1 addition & 1 deletion bindings/nodejs/npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opendal/lib-darwin-arm64",
"version": "0.31.0",
"version": "0.31.1",
"os": [
"darwin"
],
Expand Down
2 changes: 1 addition & 1 deletion bindings/nodejs/npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opendal/lib-darwin-x64",
"version": "0.31.0",
"version": "0.31.1",
"os": [
"darwin"
],
Expand Down
2 changes: 1 addition & 1 deletion bindings/nodejs/npm/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opendal/lib-linux-x64-gnu",
"version": "0.31.0",
"version": "0.31.1",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion bindings/nodejs/npm/win32-x64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opendal/lib-win32-x64-msvc",
"version": "0.31.0",
"version": "0.31.1",
"os": [
"win32"
],
Expand Down
2 changes: 1 addition & 1 deletion bindings/nodejs/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "opendal",
"author": "OpenDAL Contributors <dev@opendal.apache.org>",
"version": "0.31.0",
"version": "0.31.1",
"license": "Apache-2.0",
"main": "index.js",
"types": "index.d.ts",
Expand Down
5 changes: 5 additions & 0 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ services-s3 = [
"reqsign?/reqwest_request",
]
services-sled = ["dep:sled"]
services-wasabi = [
"dep:reqsign",
"reqsign?/services-aws",
"reqsign?/reqwest_request",
]
services-webdav = []
services-webhdfs = []

Expand Down
2 changes: 1 addition & 1 deletion core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[chat]: https://img.shields.io/discord/1081052318650339399
[discord]: https://discord.gg/XQy8yGR2dg

**Open** **D**ata **A**ccess **L**ayer: Access data freely, painlessly, and efficiently
**Open** **D**ata **A**ccess **L**ayer: access data freely.

- Documentation: [stable](https://docs.rs/opendal/) | [main](https://opendal.apache.org/docs/rust/opendal/)
- [Release notes](https://docs.rs/opendal/latest/opendal/docs/changelog/index.html)
Expand Down
2 changes: 1 addition & 1 deletion core/src/docs/comparisons/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
//! All documents listed should be treated as highly biased. Because:
//!
//! - OpenDAL's maintainers and contributors write them.
//! - Writers may not be familiar with the compared projects (at least not as //!familiar as with OpenDAL)
//! - Writers may not be familiar with the compared projects (at least not as familiar with OpenDAL)
//!
//! Let's see OpenDAL:
//!
Expand Down
2 changes: 1 addition & 1 deletion core/src/docs/internals/accessor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
//!
//! ```ignore
//! pub trait Accessor {
//! async fn create(&self, path: &str) -> Result<()>;
//! async fn create_dir(&self, path: &str) -> Result<()>;
//! }
//! ```
//!
Expand Down
Loading

0 comments on commit 81f1108

Please sign in to comment.