From 975e18dec1dfef289ab2d43ef5b6523afcc16bae Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Fri, 10 Mar 2023 18:17:07 +0800 Subject: [PATCH] Bump OpenDAL to 0.30 (#1555) * Add key for registry Signed-off-by: Xuanwo * Bump OpenDAL to 0.30 Signed-off-by: Xuanwo * Bump versions Signed-off-by: Xuanwo * Add upgrade Signed-off-by: Xuanwo * FIx typo Signed-off-by: Xuanwo * Don't need to do cleanup work Signed-off-by: Xuanwo --------- Signed-off-by: Xuanwo --- .github/workflows/bindings_python.yml | 1 - .github/workflows/publish.yml | 2 + CHANGELOG.md | 62 +++++++++++++++++++ Cargo.lock | 8 +-- Cargo.toml | 2 +- binaries/oli/Cargo.toml | 2 +- bindings/nodejs/Cargo.toml | 4 +- bindings/nodejs/__test__/index.spec.ts | 10 --- bindings/nodejs/npm/darwin-x64/package.json | 4 +- .../nodejs/npm/linux-x64-gnu/package.json | 4 +- .../nodejs/npm/win32-x64-msvc/package.json | 4 +- bindings/nodejs/package.json | 2 +- bindings/object_store/Cargo.toml | 4 +- bindings/python/Cargo.toml | 4 +- src/docs/upgrade.md | 17 +++++ 15 files changed, 100 insertions(+), 30 deletions(-) diff --git a/.github/workflows/bindings_python.yml b/.github/workflows/bindings_python.yml index 46749b030bbd..efec809235a0 100644 --- a/.github/workflows/bindings_python.yml +++ b/.github/workflows/bindings_python.yml @@ -82,7 +82,6 @@ jobs: - name: Run pytest working-directory: "bindings/python" run: | - set -e python -m pip install opendal --find-links dist python -m pip install -r test_requirements.txt python -m pytest diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7b29da763594..d397ae403c59 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -44,9 +44,11 @@ jobs: run: cargo publish --all-features env: LD_LIBRARY_PATH: ${{ env.JAVA_HOME }}/lib/server:${{ env.LD_LIBRARY_PATH }} + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - name: Publish object_store_opendal run: cargo publish working-directory: "bindings/object_store" env: LD_LIBRARY_PATH: ${{ env.JAVA_HOME }}/lib/server:${{ env.LD_LIBRARY_PATH }} + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 35336bc21279..6f80451dfb2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,67 @@ 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.30.0] - 2023-03-10 + +### Added + +- RFC-1477: Remove Object Concept (#1477) +- feat(bindings/nodejs): fs Operator (#1485) +- feat(service/dashmap): Add scan support (#1492) +- feat(bindings/nodejs): Add Writer Support (#1490) +- feat: Add dummy implementation for accessor and builder (#1503) +- feat(bindings/nodejs): Support List & append all default services (#1505) +- feat(bindings/python): Setup operator init logic (#1513) +- feat(bindings/nodejs): write support string (#1520) +- feat(bindings/python): add support for services that opendal enables by default (#1522) +- feat(bindings/nodejs): Remove Operator.writer until we are ready (#1528) +- feat(bindings/nodejs): Support Operator.create_dir (#1529) +- feat(bindings/python): implement create_dir (#1534) +- feat(bindings/python): implement delete and export more metadata fields (#1539) +- feat(bindings/python): implement blocking list and scan (#1541) +- feat: Append EntryMode to Entry (#1543) +- feat: Entry refactoring to allow external creation (#1547) +- feat(bindings/nodejs): Support Operator.scanSync & Operator.listSync (#1546) +- feat: remove_via can delete files concurrently (#1495) + +### Changed + +- refactor: Split operator APIs into different part (#1483) +- refactor: Remove Object prefix for public API (#1488) +- refactor: Remove the concept of Object (#1496) +- refactor: remove ReadDir in FTP service (#1504) +- refactor: rename public api create to create_dir (#1512) +- refactor(bindings/python): return bytes directly and add type stub file (#1514) +- tests: Remove not needed create file test (#1516) +- refactor: improve the python binding implementation (#1517) +- refactor(bindings/nodejs): Remove scheme from bindings (#1552) + +### Fixed + +- fix(services/s3): Make sure the ureq's body has been consumed (#1497) +- fix(services/s3): Allow retry error RequestTimeout (#1532) + +### Docs + +- docs: Remove all references to object (#1500) +- docs(bindings/python): Add building docs (#1526) +- docs(bindings/nodejs): update readme (#1527) +- docs: Add detailed docs for create_dir (#1537) + +### CI + +- ci: Don't run binding tests if only services changes (#1498) +- ci: Improve rocksdb build speed by link dynamic libs (#1502) +- ci: Fix bindings CI not running on PR (#1530) +- ci: Polish scripts and prepare for releasing (#1553) + +### Chore + +- chore: Re-organize the project layout (#1489) +- chore: typo & clippy (#1499) +- chore: typo (#1501) +- chore: Move memcache-async into opendal (#1544) + ## [v0.29.1] - 2023-03-05 ### Added @@ -1482,6 +1543,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/). Hello, OpenDAL! +[v0.30.0]: https://github.com/datafuselabs/opendal/compare/v0.29.1...v0.30.0 [v0.29.1]: https://github.com/datafuselabs/opendal/compare/v0.29.0...v0.29.1 [v0.29.0]: https://github.com/datafuselabs/opendal/compare/v0.28.0...v0.29.0 [v0.28.0]: https://github.com/datafuselabs/opendal/compare/v0.27.2...v0.28.0 diff --git a/Cargo.lock b/Cargo.lock index 39f22a572bc9..db1d612c646d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2080,7 +2080,7 @@ dependencies = [ [[package]] name = "object_store_opendal" -version = "0.0.1" +version = "0.30.0" dependencies = [ "async-trait", "bytes", @@ -2120,7 +2120,7 @@ checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" [[package]] name = "opendal" -version = "0.29.1" +version = "0.30.0" dependencies = [ "anyhow", "async-compat", @@ -2180,7 +2180,7 @@ dependencies = [ [[package]] name = "opendal-nodejs" -version = "0.0.0" +version = "0.30.0" dependencies = [ "futures", "napi", @@ -2192,7 +2192,7 @@ dependencies = [ [[package]] name = "opendal-python" -version = "0.0.1" +version = "0.30.0" dependencies = [ "opendal", "pyo3", diff --git a/Cargo.toml b/Cargo.toml index f212e6bd3ea7..5f0f9b9065aa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ keywords = ["storage", "fs", "s3", "azblob", "gcs"] license = "Apache-2.0" name = "opendal" repository = "https://github.com/datafuselabs/opendal" -version = "0.29.1" +version = "0.30.0" # MSRV of OpenDAL. Please update this field while bump. rust-version = "1.60" diff --git a/binaries/oli/Cargo.toml b/binaries/oli/Cargo.toml index f8af7566e018..1521368ac209 100644 --- a/binaries/oli/Cargo.toml +++ b/binaries/oli/Cargo.toml @@ -30,7 +30,7 @@ clap = { version = "4", features = ["cargo", "string"] } env_logger = "0.10" futures = "0.3" log = "0.4" -opendal = { version = "0.29", path = "../../" } +opendal = { version = "0.30", path = "../../" } tokio = { version = "1.20", features = ["fs", "macros", "rt-multi-thread"] } [dev-dependencies] diff --git a/bindings/nodejs/Cargo.toml b/bindings/nodejs/Cargo.toml index 9cfad46561ef..5406717ca5ef 100644 --- a/bindings/nodejs/Cargo.toml +++ b/bindings/nodejs/Cargo.toml @@ -16,7 +16,7 @@ [package] edition = "2021" name = "opendal-nodejs" -version = "0.0.0" +version = "0.30.0" [lib] crate-type = ["cdylib"] @@ -28,7 +28,7 @@ napi = { version = "2.11.2", default-features = false, features = [ "async", ] } napi-derive = "2.11.1" -opendal = { version = "0.29", path = "../../" } +opendal = { version = "0.30", path = "../../" } time = { version = "0.3.17", features = ["formatting"] } [build-dependencies] diff --git a/bindings/nodejs/__test__/index.spec.ts b/bindings/nodejs/__test__/index.spec.ts index c2a6b14328b7..e84dae290a4f 100644 --- a/bindings/nodejs/__test__/index.spec.ts +++ b/bindings/nodejs/__test__/index.spec.ts @@ -32,8 +32,6 @@ test('test memory write & read', async (t) => { let res = await op.read(path) t.is(content, new TextDecoder().decode(res)) - - await op.delete(path) }) @@ -79,10 +77,6 @@ test('test scan', async (t) => { } t.is(entryCount, paths.length) - - paths.forEach(async (path) => { - await op.delete(path) - }) }) @@ -110,8 +104,4 @@ test('test scan sync', async (t) => { } t.is(entryCount, paths.length) - - paths.forEach(async (path) => { - await op.delete(path) - }) }) diff --git a/bindings/nodejs/npm/darwin-x64/package.json b/bindings/nodejs/npm/darwin-x64/package.json index 7c401be1b905..517c93c6666e 100644 --- a/bindings/nodejs/npm/darwin-x64/package.json +++ b/bindings/nodejs/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "opendal-darwin-x64", - "version": "0.0.1", + "version": "0.30.0", "os": [ "darwin" ], @@ -15,4 +15,4 @@ "engines": { "node": ">= 10" } -} \ No newline at end of file +} diff --git a/bindings/nodejs/npm/linux-x64-gnu/package.json b/bindings/nodejs/npm/linux-x64-gnu/package.json index 36ed7b50043d..5acbe4118e37 100644 --- a/bindings/nodejs/npm/linux-x64-gnu/package.json +++ b/bindings/nodejs/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "opendal-linux-x64-gnu", - "version": "0.0.1", + "version": "0.30.0", "os": [ "linux" ], @@ -18,4 +18,4 @@ "libc": [ "glibc" ] -} \ No newline at end of file +} diff --git a/bindings/nodejs/npm/win32-x64-msvc/package.json b/bindings/nodejs/npm/win32-x64-msvc/package.json index 388785bfa914..db9d364a843c 100644 --- a/bindings/nodejs/npm/win32-x64-msvc/package.json +++ b/bindings/nodejs/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "opendal-win32-x64-msvc", - "version": "0.0.1", + "version": "0.30.0", "os": [ "win32" ], @@ -15,4 +15,4 @@ "engines": { "node": ">= 10" } -} \ No newline at end of file +} diff --git a/bindings/nodejs/package.json b/bindings/nodejs/package.json index 976e0bd0b7e5..fdb5084dc9a9 100644 --- a/bindings/nodejs/package.json +++ b/bindings/nodejs/package.json @@ -1,7 +1,7 @@ { "name": "opendal", "author": "Databend Authors ", - "version": "0.0.1", + "version": "0.30.0", "main": "index.js", "types": "index.d.ts", "description": "Open Data Access Layer: Access data freely, painlessly, and efficiently", diff --git a/bindings/object_store/Cargo.toml b/bindings/object_store/Cargo.toml index ea7fd702e2f9..64cf09a6a9e4 100644 --- a/bindings/object_store/Cargo.toml +++ b/bindings/object_store/Cargo.toml @@ -18,7 +18,7 @@ edition = "2021" license = "Apache-2.0" name = "object_store_opendal" repository = "https://github.com/datafuselabs/opendal" -version = "0.0.1" +version = "0.30.0" # MSRV of OpenDAL. Please update this field while bump. rust-version = "1.60" @@ -28,7 +28,7 @@ bytes = "1" chrono = "0.4.23" futures = "0.3" object_store = "0.5" -opendal = { version = "0.29", path = "../../" } +opendal = { version = "0.30", path = "../../" } tokio = "1" [dev-dependencies] diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index 4cec3f69f265..362639c4e916 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -15,14 +15,14 @@ [package] edition = "2021" name = "opendal-python" -version = "0.0.1" +version = "0.30.0" [lib] crate-type = ["cdylib"] name = "opendal" [dependencies] -opendal = { version = "0.29", path = "../../" } +opendal = { version = "0.30", path = "../../" } pyo3 = { version = "0.18", features = ["extension-module"] } pyo3-asyncio = { version = "0.18", features = ["tokio-runtime"] } tokio = "1" diff --git a/src/docs/upgrade.md b/src/docs/upgrade.md index d85e83422120..1ed7a55c97dc 100644 --- a/src/docs/upgrade.md +++ b/src/docs/upgrade.md @@ -1,3 +1,20 @@ +# Upgrade to v0.30 + +In version 0.30, we made significant breaking changes by removing objects. Our goal in doing so was to provide our users with APIs that are easier to understand and maintain. + +More detailes could be found at [RFC: Remove Object Concept][crate::docs::rfcs::rfc_1477_remove_object_concept]. + +To upgrade to OpenDAL v0.30, users need to make the following changes: + +- regex replace `object\((.*)\).reader\(\)` to `reader($1)` + - replace the function on your case, it's recomanded to do it one by one +- rename `ObjectMetakey` => `Metakey` +- rename `ObjectMode` => `EntryMode` +- replace `ErrorKind::ObjectXxx` to `ErrorKind::Xxx` +- rename `AccessorMetadata` => `AccessorInfo` +- rename `ObjectMetadata` => `Metadata` +- replace `operator.metadata()` => `operator.info()` + # Upgrade to v0.29 In v0.29, we introduced [Object Writer][crate::docs::rfcs::rfc_1420_object_writer] to replace existing Multipart related APIs.