diff --git a/Cargo.lock b/Cargo.lock index 4dbc4192a..e4e96b0ce 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -716,6 +716,7 @@ dependencies = [ "anyhow", "bytes", "entropy", + "http-body-util", "hyper 1.5.2", "once_cell", "shared", @@ -1668,7 +1669,7 @@ dependencies = [ "opentelemetry-proto", "proptest", "proptest-derive", - "prost 0.11.9", + "prost 0.13.4", "rand", "rmp-serde", "rustc-hash", @@ -2329,7 +2330,7 @@ version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0f3e5beed80eb580c68e2c600937ac2c4eedabdfd5ef1e5b7ea4f3fba84497b" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "itertools", "log", "multimap", @@ -2830,7 +2831,7 @@ dependencies = [ name = "shared" version = "0.1.0" dependencies = [ - "prost 0.11.9", + "prost 0.13.4", "serde", "serde_json", "tonic 0.12.3", diff --git a/Cargo.toml b/Cargo.toml index 0cab77a1a..8d2dba35f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ metrics-exporter-prometheus = { version = "0.15.3", default-features = false, fe "http-listener", "uds-listener", ] } -prost = "0.11" +prost = "0.13" rand = { version = "0.8", default-features = false } rustc-hash = { version = "1.1" } serde = { version = "1.0", features = ["std", "derive"] } @@ -37,6 +37,7 @@ once_cell = { version = "1.20" } hyper = { version = "1.5.2", default-features = false } http = "1.2.0" http-serde = "2.1.1" +http-body-util = "0.1" [profile.release] diff --git a/integration/ducks/Cargo.toml b/integration/ducks/Cargo.toml index 1643dbd89..9ac56f18e 100644 --- a/integration/ducks/Cargo.toml +++ b/integration/ducks/Cargo.toml @@ -12,6 +12,7 @@ anyhow = "1.0" bytes = { workspace = true } entropy = "0.4" hyper = { version = "1.5.2", features = ["http1", "server"] } +http-body-util = { workspace = true } once_cell = { workspace = true } shared = { path = "../shared" } sketches-ddsketch = "0.3" diff --git a/integration/shared/Cargo.toml b/integration/shared/Cargo.toml index f858fb378..27621fdaf 100644 --- a/integration/shared/Cargo.toml +++ b/integration/shared/Cargo.toml @@ -14,7 +14,7 @@ tonic = { workspace = true, default-features = false, features = [ "prost", "transport", ] } -prost = "0.11" +prost = { workspace = true } serde_json = "1.0" [build-dependencies] diff --git a/integration/shared/proto/integration_api.proto b/integration/shared/proto/integration_api.proto index f910df072..4ec9c31de 100644 --- a/integration/shared/proto/integration_api.proto +++ b/integration/shared/proto/integration_api.proto @@ -1,25 +1,25 @@ syntax = "proto3"; package integration_api; -import "google/protobuf/empty.proto"; -import "google/protobuf/descriptor.proto"; // Integration test target service. This is hosted by Ducks. service IntegrationTarget { // (Not implemented) Get a stream of log messages from the target // // this is necessary for modes where ducks is launched by lading - rpc GetLogs (google.protobuf.Empty) returns (stream LogMessage) {} + rpc GetLogs (Empty) returns (stream LogMessage) {} // Launch a test endpoint rpc StartTest (TestConfig) returns (ListenInfo) {} // Request all recorded metrics - rpc GetMetrics (google.protobuf.Empty) returns (Metrics) {} + rpc GetMetrics (Empty) returns (Metrics) {} // Shut down all operations and exit - rpc Shutdown (google.protobuf.Empty) returns (google.protobuf.Empty) {} + rpc Shutdown (Empty) returns (Empty) {} } +message Empty {} + // Holds a json-serialized [`DucksConfig`] message TestConfig { string json_blob = 1; diff --git a/integration/shared/src/lib.rs b/integration/shared/src/lib.rs index 4b68c6c02..39c2a7458 100644 --- a/integration/shared/src/lib.rs +++ b/integration/shared/src/lib.rs @@ -1,9 +1,10 @@ use integration_api::TestConfig; use serde::{Deserialize, Serialize}; +use tonic::IntoRequest; +use tonic::Request; #[allow(clippy::derive_partial_eq_without_eq)] pub mod integration_api { - use tonic::{IntoRequest, Request}; tonic::include_proto!("integration_api"); } diff --git a/lading/src/generator/http.rs b/lading/src/generator/http.rs index 216c2f688..821e78ed2 100644 --- a/lading/src/generator/http.rs +++ b/lading/src/generator/http.rs @@ -193,7 +193,7 @@ impl Http { /// Function will panic if it is unable to create HTTP requests for the /// target. pub async fn spin(mut self) -> Result<(), Error> { - let client: Client = Client::builder() + let client: Client = Client::builder() .pool_max_idle_per_host(self.parallel_connections as usize) .retry_canceled_requests(false) .build_http(); @@ -217,7 +217,7 @@ impl Http { let body = Body::from(blk.bytes.clone()); let block_length = blk.bytes.len(); - let mut request: Request = Request::builder() + let mut request: Request = Request::builder() .method(method.clone()) .uri(&uri) .header(CONTENT_LENGTH, block_length)