Skip to content

Commit 88f7a76

Browse files
authored
chore: Bump poem to 3.0 (#15486)
* chore: Bump poem to 3.0 Signed-off-by: Xuanwo <github@xuanwo.io> * remove not used crates Signed-off-by: Xuanwo <github@xuanwo.io> * remove the crate who have problem Signed-off-by: Xuanwo <github@xuanwo.io> * Fix test Signed-off-by: Xuanwo <github@xuanwo.io> --------- Signed-off-by: Xuanwo <github@xuanwo.io>
1 parent 2b7d881 commit 88f7a76

File tree

30 files changed

+126
-123
lines changed

30 files changed

+126
-123
lines changed

Cargo.lock

Lines changed: 49 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ itertools = "0.10.5"
167167
match-template = "0.0.1"
168168
mysql_async = { version = "0.33", default-features = false, features = ["rustls-tls"] }
169169
ordered-float = { version = "4.1.0", default-features = false }
170-
poem = { version = "~1.3.57", features = ["rustls", "multipart", "compression"] }
170+
poem = { version = "3.0", features = ["rustls", "multipart", "compression"] }
171171
prometheus-client = "0.22"
172172
rand = { version = "0.8.5", features = ["small_rng"] }
173173
regex = "1.8.1"
@@ -247,7 +247,6 @@ opentelemetry = { version = "0.22", features = ["trace", "logs"] }
247247
opentelemetry-otlp = { version = "0.15", features = ["trace", "logs", "grpc-tonic"] }
248248
opentelemetry_sdk = { version = "0.22", features = ["trace", "logs", "rt-tokio"] }
249249
tracing = "0.1.40"
250-
opentelemetry-http = "0.11.0"
251250
tracing-appender = "0.2.3"
252251
console-subscriber = { version = "0.2.0" }
253252
tracing-subscriber = { version = "0.3.17", features = ["env-filter", "json", "valuable"] }

src/common/http/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ databend-common-exception = { path = "../exception" }
2525
# Crates.io dependencies
2626
anyerror = { workspace = true }
2727
futures = { workspace = true }
28+
http = { workspace = true }
2829
log = { workspace = true }
2930
poem = { workspace = true }
3031
serde = { workspace = true }

src/common/http/src/debug/jeprof.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
use databend_common_base::mem_allocator::dump_profile;
1616
use databend_common_exception::ErrorCode;
17+
use http::StatusCode;
1718
use poem::error::InternalServerError;
18-
use poem::http::StatusCode;
1919
use poem::web::IntoResponse;
2020
use poem::web::Query;
2121
use poem::Error;

src/common/http/tests/it/health.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414

1515
use databend_common_base::base::tokio;
1616
use databend_common_http::health_handler;
17+
use http::Method;
18+
use http::StatusCode;
19+
use http::Uri;
1720
use poem::get;
18-
use poem::http::Method;
19-
use poem::http::StatusCode;
20-
use poem::http::Uri;
2121
use poem::Endpoint;
2222
use poem::Request;
2323
use poem::Route;

src/meta/service/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ derive_more = { workspace = true }
5151
feature-set = { workspace = true }
5252
futures = { workspace = true }
5353
futures-async-stream = { workspace = true }
54+
http = { workspace = true }
5455
itertools = { workspace = true }
5556
log = { workspace = true }
5657
logcall = { workspace = true }

src/meta/service/src/api/http/v1/cluster_state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
use std::sync::Arc;
1616

17-
use poem::http::StatusCode;
17+
use http::StatusCode;
1818
use poem::web::Data;
1919
use poem::web::IntoResponse;
2020
use poem::web::Json;

src/meta/service/src/api/http/v1/ctrl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use std::sync::Arc;
1616
use std::time::Duration;
1717

18-
use poem::http::StatusCode;
18+
use http::StatusCode;
1919
use poem::web::Data;
2020
use poem::web::IntoResponse;
2121
use poem::web::Json;

src/meta/service/tests/it/api/http/cluster_state_test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ use databend_meta::api::http::v1::cluster_state::nodes_handler;
2525
use databend_meta::api::http::v1::cluster_state::status_handler;
2626
use databend_meta::api::HttpService;
2727
use databend_meta::meta_service::MetaNode;
28+
use http::Method;
29+
use http::StatusCode;
30+
use http::Uri;
2831
use log::info;
2932
use poem::get;
30-
use poem::http::Method;
31-
use poem::http::StatusCode;
32-
use poem::http::Uri;
3333
use poem::Endpoint;
3434
use poem::EndpointExt;
3535
use poem::Request;

src/meta/service/tests/it/api/http/config.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
use databend_common_base::base::tokio;
1616
use databend_meta::api::http::v1::config::config_handler;
1717
use databend_meta::configs::Config;
18+
use http::Method;
19+
use http::StatusCode;
20+
use http::Uri;
1821
use poem::get;
19-
use poem::http::Method;
20-
use poem::http::StatusCode;
21-
use poem::http::Uri;
2222
use poem::Endpoint;
2323
use poem::EndpointExt;
2424
use poem::Request;

0 commit comments

Comments
 (0)