Skip to content

Commit

Permalink
chore: Update dependencies and modify proto file for integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
scottopell committed Dec 27, 2024
1 parent f1486d4 commit df3602c
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 13 deletions.
7 changes: 4 additions & 3 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand All @@ -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]
Expand Down
1 change: 1 addition & 0 deletions integration/ducks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion integration/shared/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
10 changes: 5 additions & 5 deletions integration/shared/proto/integration_api.proto
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
3 changes: 2 additions & 1 deletion integration/shared/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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");
}

Expand Down
4 changes: 2 additions & 2 deletions lading/src/generator/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<HttpConnector, Body> = Client::builder()
let client: Client<HttpConnector, BoxBody> = Client::builder()
.pool_max_idle_per_host(self.parallel_connections as usize)
.retry_canceled_requests(false)
.build_http();
Expand All @@ -217,7 +217,7 @@ impl Http {
let body = Body::from(blk.bytes.clone());
let block_length = blk.bytes.len();

let mut request: Request<Body> = Request::builder()
let mut request: Request<BoxBody> = Request::builder()
.method(method.clone())
.uri(&uri)
.header(CONTENT_LENGTH, block_length)
Expand Down

0 comments on commit df3602c

Please sign in to comment.