From 647eb9bb0272a2c06bba2ae8aee710b3f46cdcce Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Thu, 18 Jan 2024 10:54:35 +0800 Subject: [PATCH 1/6] fix: Don't call wake_by_ref in OperatorFuture (#4003) * fix: Don't call wake_by_ref in OperatorFuture Signed-off-by: Xuanwo * Fix dead loop Signed-off-by: Xuanwo * Polish error message Signed-off-by: Xuanwo --------- Signed-off-by: Xuanwo --- core/src/raw/http_util/client.rs | 4 +-- core/src/types/operator/operator_futures.rs | 31 +++++++++++---------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/core/src/raw/http_util/client.rs b/core/src/raw/http_util/client.rs index f83c18840985..2c5e4bc5c78b 100644 --- a/core/src/raw/http_util/client.rs +++ b/core/src/raw/http_util/client.rs @@ -156,8 +156,8 @@ impl HttpClient { err.is_status() ); - let mut oerr = Error::new(ErrorKind::Unexpected, "send async request") - .with_operation("http_util::Client::send_async") + let mut oerr = Error::new(ErrorKind::Unexpected, "send http request") + .with_operation("http_util::Client::send") .with_context("url", uri.to_string()) .set_source(err); if is_temporary { diff --git a/core/src/types/operator/operator_futures.rs b/core/src/types/operator/operator_futures.rs index 4faf5ea52301..fda23d1dff0c 100644 --- a/core/src/types/operator/operator_futures.rs +++ b/core/src/types/operator/operator_futures.rs @@ -95,22 +95,23 @@ where /// /// In general, `Empty` state should not be polled. fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { - *self = match mem::replace(self.as_mut().get_mut(), OperatorFuture::Empty) { - OperatorFuture::Idle(inner, path, args, f) => { - // Wake up to make sure the future is ready after the - // future has been built. - cx.waker().wake_by_ref(); - OperatorFuture::Poll(f(inner, path, args)) + loop { + match mem::replace(self.as_mut().get_mut(), OperatorFuture::Empty) { + OperatorFuture::Idle(inner, path, args, f) => { + *self = OperatorFuture::Poll(f(inner, path, args)) + } + OperatorFuture::Poll(mut fut) => match fut.as_mut().poll(cx) { + Poll::Ready(v) => return Poll::Ready(v), + Poll::Pending => { + *self = OperatorFuture::Poll(fut); + return Poll::Pending; + } + }, + OperatorFuture::Empty => { + panic!("future polled after completion"); + } } - OperatorFuture::Poll(mut fut) => match fut.as_mut().poll(cx) { - Poll::Pending => OperatorFuture::Poll(fut), - Poll::Ready(v) => return Poll::Ready(v), - }, - OperatorFuture::Empty => { - panic!("future polled after completion"); - } - }; - Poll::Pending + } } } From 521eb673061983c83577019920a05942d2c626d3 Mon Sep 17 00:00:00 2001 From: Nadeshiko Manju Date: Thu, 18 Jan 2024 13:42:37 +0800 Subject: [PATCH 2/6] chore(bindings/python): Enable sftp service by default for unix platform (#4006) Signed-off-by: Manjusaka --- bindings/python/Cargo.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index 711a11a98e99..fe00e54af13a 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -155,3 +155,10 @@ opendal.workspace = true pyo3 = "0.20.1" pyo3-asyncio = { version = "0.20", features = ["tokio-runtime"] } tokio = "1" + +[target.'cfg(unix)'.dependencies.opendal] +features = [ + # Depend on "openssh" which depends on "tokio-pipe" that is unavailable on Windows. + "services-sftp", +] +workspace = true \ No newline at end of file From 2d6d416bd1b71d229e5140dea8759b04402526a5 Mon Sep 17 00:00:00 2001 From: Suyan Date: Thu, 18 Jan 2024 13:53:27 +0800 Subject: [PATCH 3/6] docs(website): update footer (#4008) website: update footer Signed-off-by: suyanhanx --- website/docusaurus.config.js | 6 +- website/static/img/asf_logo_wide.svg | 279 +++++++++++++++++++++++++++ website/static/img/incubator.svg | 155 --------------- 3 files changed, 282 insertions(+), 158 deletions(-) create mode 100644 website/static/img/asf_logo_wide.svg delete mode 100755 website/static/img/incubator.svg diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 3e0a0ea8ba57..4a3ffebe02de 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -209,11 +209,11 @@ const config = { style: 'light', logo: { alt: 'Apache Software Foundation', - src: './img/incubator.svg', + src: './img/asf_logo_wide.svg', href: 'https://www.apache.org/', - width: 200, + width: 300, }, - copyright: `Apache OpenDAL (incubating) is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.

Copyright © 2022-${new Date().getFullYear()}, The Apache Software Foundation. Apache OpenDAL, OpenDAL, Apache, Apache Incubator, the Apache feather, the Apache Incubator logo and the Apache OpenDAL project logo are either registered trademarks or trademarks of the Apache Software Foundation.`, + copyright: `Copyright © 2022-${new Date().getFullYear()}, The Apache Software Foundation
Apache OpenDAL, OpenDAL, Apache, the Apache feather and the Apache OpenDAL project logo are either registered trademarks or trademarks of the Apache Software Foundation.`, }, prism: { theme: lightCodeTheme, diff --git a/website/static/img/asf_logo_wide.svg b/website/static/img/asf_logo_wide.svg new file mode 100644 index 000000000000..35d28f703d59 --- /dev/null +++ b/website/static/img/asf_logo_wide.svg @@ -0,0 +1,279 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/website/static/img/incubator.svg b/website/static/img/incubator.svg deleted file mode 100755 index aed990f5bd6e..000000000000 --- a/website/static/img/incubator.svg +++ /dev/null @@ -1,155 +0,0 @@ - - - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From 37cc1080decad58f9e8ec69685a8ada5f3570bca Mon Sep 17 00:00:00 2001 From: Suyan Date: Thu, 18 Jan 2024 13:54:10 +0800 Subject: [PATCH 4/6] chore: remove disclaimer (#4009) Signed-off-by: suyanhanx --- DISCLAIMER | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 DISCLAIMER diff --git a/DISCLAIMER b/DISCLAIMER deleted file mode 100644 index 213aa0561385..000000000000 --- a/DISCLAIMER +++ /dev/null @@ -1,10 +0,0 @@ -Apache OpenDAL (incubating) is an effort undergoing incubation at the Apache -Software Foundation (ASF), sponsored by the Apache Incubator PMC. - -Incubation is required of all newly accepted projects until a further review -indicates that the infrastructure, communications, and decision making process -have stabilized in a manner consistent with other successful ASF projects. - -While incubation status is not necessarily a reflection of the completeness -or stability of the code, it does indicate that the project has yet to be -fully endorsed by the ASF. From d0124baed3b1b219e3caedd9575eab55f41e5351 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Thu, 18 Jan 2024 14:02:24 +0800 Subject: [PATCH 5/6] chore: Remove incubating from releases (#4010) Signed-off-by: Xuanwo --- scripts/release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/release.sh b/scripts/release.sh index 2217047d732e..95c25e55648e 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -62,7 +62,7 @@ for package in "${PACKAGES[@]}"; do done echo "> Start package" -git archive --format=tar.gz --output="dist/apache-opendal-incubating-$release_version-src.tar.gz" --prefix="apache-opendal-incubating-$release_version-src/" --add-file=Cargo.toml "$git_branch" +git archive --format=tar.gz --output="dist/apache-opendal-$release_version-src.tar.gz" --prefix="apache-opendal-$release_version-src/" --add-file=Cargo.toml "$git_branch" cd dist echo "> Generate signature" From 223e8106cdb691d2e48eeeb69e3178b087a41e72 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Thu, 18 Jan 2024 15:55:29 +0800 Subject: [PATCH 6/6] fix: async fn resumed after initiate part failed (#4013) Signed-off-by: Xuanwo --- core/src/raw/oio/write/multipart_write.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/raw/oio/write/multipart_write.rs b/core/src/raw/oio/write/multipart_write.rs index 3ca119144000..60c6f7d52984 100644 --- a/core/src/raw/oio/write/multipart_write.rs +++ b/core/src/raw/oio/write/multipart_write.rs @@ -272,8 +272,9 @@ where } State::Init(fut) => { let upload_id = ready!(fut.as_mut().poll(cx)); - self.upload_id = Some(Arc::new(upload_id?)); + // Make sure the future is dropped after it returned ready. self.state = State::Idle; + self.upload_id = Some(Arc::new(upload_id?)); } State::Close(_) => { unreachable!("MultipartWriter must not go into State::Close during poll_write")