Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
613 changes: 329 additions & 284 deletions Cargo.lock

Large diffs are not rendered by default.

48 changes: 31 additions & 17 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,35 +41,49 @@ orion-tracing = { path = "orion-tracing" }
orion-xds = { path = "orion-xds" }

abort-on-drop = "0.2"
bounded-integer = "0.5.8"
bounded-integer = "0.6.1"
bytes = "1"
compact_str = { version = "0.8.0", features = ["serde"] }
exponential-backoff = "1.2.0"
compact_str = { version = "0.9", features = ["serde"] }
exponential-backoff = "2.1"
futures = "0.3"
http = "1.0"
http = "1.3"
http-body = "1.0"
http-body-util = "0.1.0"
http-body-util = "0.1.3"
num_cpus = "1"
opentelemetry = "0.31"
opentelemetry-otlp = {version = "0.31", features = [
"tonic",
"tokio",
"grpc-tonic",
"hyper-client",
"serde",
"serde_json",
"serialize",
"http-json",
] }
opentelemetry_sdk = "0.31"
ppp = "2.3"
prost = "0.13"
prost-build = "^0.13"
prost-reflect = { version = "0.14", features = ["derive", "serde"] }
regex = "1.10.2"
prost = "0.14"
prost-build = "0.14"
prost-reflect = { version = "0.16", features = ["derive", "serde"] }
regex = "1.12.2"
serde = { version = "1", features = ["derive", "rc"] }
serde_json = { version = "1" }
serde_yaml = "0.9.34"
thiserror = "1.0.57"
tokio = { version = "1.37", features = ["full"] }
tokio-stream = { version = "0.1.15", features = ["net", "sync"] }
tonic = "^0.12"
tonic-build = "^0.12"
tonic-health = "^0.12"
tower = { version = "0.5.1", features = ["make"] }
thiserror = "2.0.17"
tokio = { version = "1.48", features = ["full"] }
tokio-stream = { version = "0.1.17", features = ["net", "sync"] }
tonic = "0.14"
tonic-build = "0.14"
tonic-prost = "0.14"
tonic-prost-build = "0.14"
tonic-health = "0.14"
tower = { version = "0.5.2", features = ["make"] }
tracing = "0.1"
tracing-subscriber = "0.3"
tracing-test = { version = "0.2", features = ["no-env-filter"] }
url = "2"
hyper-util = { version = "0.1.15", features = ["full"] }
hyper-util = { version = "0.1.17", features = ["full"] }


[profile.release]
Expand Down
3 changes: 2 additions & 1 deletion envoy-data-plane-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ serde.workspace = true
serde_json.workspace = true
serde_yaml.workspace = true
tonic.workspace = true
tonic-prost.workspace = true
tonic-health.workspace = true

[build-dependencies]
glob = "^0.3"
prost-build.workspace = true
prost-reflect.workspace = true
tonic-build.workspace = true

tonic-prost-build.workspace = true

[lib]
doctest = false
46 changes: 30 additions & 16 deletions envoy-data-plane-api/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
use std::path::PathBuf;
// Copyright 2025 The kmesh Authors
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//

use glob::glob;
use std::path::{Path, PathBuf};

/// std::env::set_var("PROTOC", The Path of Protoc);
fn main() -> std::io::Result<()> {
Expand All @@ -15,16 +31,16 @@ fn main() -> std::io::Result<()> {
protos.extend(custom_protos);

let include_paths = [
"data-plane-api/",
"xds/",
"protoc-gen-validate/",
"googleapis/",
"opencensus-proto/src/",
"opentelemetry-proto/",
"prometheus-client-model/",
"cel-spec/proto",
"protobuf/src/",
"udpa/udpa/type/v1",
"./data-plane-api/",
"./xds/",
"./protoc-gen-validate/",
"./googleapis/",
"./opencensus-proto/src/",
"./opentelemetry-proto/",
"./prometheus-client-model/",
"./cel-spec/proto",
"./protobuf/src/",
"./udpa/udpa/type/v1",
"../proto/",
];

Expand Down Expand Up @@ -52,13 +68,11 @@ fn main() -> std::io::Result<()> {
.type_attribute(full_name, format!(r#"#[prost_reflect(message_name = "{}")]"#, full_name,))
.type_attribute(full_name, pool_attribute);
}

let include_paths = include_paths.into_iter().map(|p| Path::new(p).to_path_buf()).collect::<Vec<PathBuf>>();
// Proceed w/ tonic_build
tonic_build::configure().build_server(true).build_client(true).compile_protos_with_config(
tonic_prost_build::configure().build_server(true).build_client(true).compile_with_config(
config,
&protos,
&include_paths,
)?;

Ok(())
)
}
20 changes: 8 additions & 12 deletions orion-configuration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,29 @@ version.workspace = true
[dependencies]
base64 = "0.22.1"
base64-serde = "0.7.0"
bounded-integer = { version = "0.5.8", features = ["serde", "types"] }
bounded-integer = { version = "0.6.1", features = ["serde1"] }
bytes.workspace = true
clap = { version = "4.5.46", features = ["derive"] }
clap = { version = "4.5.51", features = ["derive"] }
compact_str.workspace = true
exponential-backoff.workspace = true
http.workspace = true
http-serde-ext = "1.0.2"
humantime-serde = "1.1.1"
ipnet = { version = "2.9", features = ["serde"] }
ipnet = { version = "2.11", features = ["serde"] }
itertools = "0.14.0"
num_cpus.workspace = true
num-traits = "0.2.19"
opentelemetry-otlp = { version = "0.29.0", features = [
"serde",
"serde_json",
"serialize",
] }
opentelemetry-otlp.workspace=true
orion-data-plane-api = { workspace = true, optional = true }
orion-error.workspace = true
orion-format.workspace = true
orion-interner.workspace = true
prost = "0.13.0"
prost-types = "0.13.0"
prost = "0.13.5"
prost-types = "0.13.5"
regex.workspace = true
serde = { workspace = true, features = ["rc"] }
serde_json.workspace = true
serde_path_to_error = "0.1.16"
serde_path_to_error = "0.1.20"
serde_regex = "1.1.0"
serde_yaml.workspace = true
thiserror.workspace = true
Expand All @@ -49,7 +45,7 @@ url.workspace = true

[dev-dependencies]
tracing-test.workspace = true
tempfile = "3.8"
tempfile = "3.23"

[features]
default = ["envoy-conversions"]
Expand Down
3 changes: 3 additions & 0 deletions orion-data-plane-api/tests/bootstrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ fn read_static_resource() {
}

#[test]
#[allow(deprecated)]
fn read_dynamic_resource() {
let mut path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
path.push("tests");
Expand All @@ -92,6 +93,7 @@ fn read_dynamic_resource() {
}

#[test]
#[allow(deprecated)]
fn read_ads_config() {
const ADS_BOOTSTRAP: &str = r#"
dynamic_resources:
Expand Down Expand Up @@ -158,6 +160,7 @@ static_resources:
}

#[test]
#[allow(deprecated)]
fn read_mixture_config() {
const BOOTSTRAP: &str = r#"
dynamic_resources:
Expand Down
12 changes: 6 additions & 6 deletions orion-format/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ orion-http-header.workspace = true
orion-interner.workspace = true
thiserror.workspace = true

ahash = "0.8.11"
bitflags = { version = "2.9.0", features = ["serde"] }
chrono = "0.4.40"
compact_str = "0.8.0"
ahash = "0.8.12"
bitflags = { version = "2.10.0", features = ["serde"] }
chrono = "0.4.42"
compact_str = "0.8.1"
criterion = "0.5.1"
dhat = "0.3.3"
http-serde-ext = "1.0.2"
Expand All @@ -26,9 +26,9 @@ itoa = "1.0.15"
ptrie = "0.7.2"
serde = { workspace = true, features = ["rc"] }
smol_str = { version = "0.3.2", features = ["serde"] }
thread_local = "1.1.8"
thread_local = "1.1.9"
traceparent = "0.0.3"
uuid = { version = "1.16.0", features = ["v4"] }
uuid = { version = "1.18.1", features = ["v4"] }

[features]
dhat-heap = []
Expand Down
28 changes: 14 additions & 14 deletions orion-lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,30 @@ version.workspace = true

[dependencies]
abort-on-drop.workspace = true
ahash = "0.8.11"
ahash = "0.8.12"
arc-swap = "1.7.1"
arrayvec = "0.7.6"
async-stream = "0.3"
atomic-time = "0.1.4"
atomic-time = "0.1.5"
bytes.workspace = true
compact_str.workspace = true
enum_dispatch = "0.3.13"
exponential-backoff.workspace = true
futures.workspace = true
futures-util = { version = "0.3", default-features = false }
h2 = "0.4.5"
h2 = "0.4.12"
hickory-resolver = { version = "0.24", features = ["system-config"] }
http.workspace = true
http-body.workspace = true
http-body-util.workspace = true
hyper = { version = "1", features = ["full"] }
hyper-rustls = { version = "0.27.1", features = ["default", "http2"] }
hyper-rustls = { version = "0.27.7", features = ["default", "http2"] }
if-addrs = "0.14"
ipnet = "2.9"
ipnet = "2.11"
lru_time_cache = "0.11.11"
multimap = "0.10.0"
once_cell = { version = "1.19" }
opentelemetry = "0.29.0"
multimap = "0.10.1"
once_cell = { version = "1.21" }
opentelemetry.workspace = true
hyper-util.workspace = true
orion-configuration.workspace = true
orion-data-plane-api.workspace = true
Expand All @@ -41,17 +41,17 @@ orion-interner.workspace = true
orion-metrics.workspace = true
orion-tracing.workspace = true
orion-xds.workspace = true
parking_lot = "0.12.3"
parking_lot = "0.12.5"
bounded-integer.workspace = true
pin-project = "1.1.5"
pin-project = "1.1.10"
pingora-timeout = "0.3.0"
ppp.workspace = true
pretty-duration = "0.1.1"
rand = { version = "0.8.5", features = ["small_rng"] }
regex.workspace = true
rustc-hash = "1.1.0"
rustls = "0.23"
rustls-pemfile = "2.1"
rustls-pemfile = "2.2"
rustls-platform-verifier = { version = "0.3" }
rustls-webpki = "0.102"
scopeguard = "1.2.0"
Expand All @@ -60,19 +60,19 @@ serde.workspace = true
smol_str = "0.3.2"
thiserror.workspace = true
thread-id = "5.0.0"
thread_local = "1.1.8"
thread_local = "1.1.9"
tokio.workspace = true
tokio-rustls = "0.26"
tokio-stream.workspace = true
tower.workspace = true
tower-service = "0.3.2"
tower-service = "0.3.3"
traceparent = "0.0.3"
tracing.workspace = true
tracing-appender = "0.2.3"
twox-hash = "1.6.3"
typed-builder = "0.18.2"
url.workspace = true
uuid = { version = "1.17.0", features = ["v4"] }
uuid = { version = "1.18.1", features = ["v4"] }
x509-parser = { version = "0.17", features = ["default"] }
hyperlocal = "0.9.1"
tokio-util = "0.7.16"
Expand Down
1 change: 0 additions & 1 deletion orion-lib/src/clusters/cluster/dynamic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ use orion_configuration::config::{
ClusterLoadAssignment as ClusterLoadAssignmentConfig, HealthCheck, HealthStatus,
LbEndpoint as LbEndpointConfig, LbPolicy, LocalityLbEndpoints as LocalityLbEndpointsConfig,
},
core::envoy_conversions::Address,
transport::BindDeviceOptions,
};

Expand Down
1 change: 1 addition & 0 deletions orion-lib/src/listeners/listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ enum ListenerAddress {
Internal(InternalListenerConfig),
}

#[allow(dead_code)]
#[derive(Debug, Clone)]
struct InternalListenerConfig {
buffer_size_kb: Option<u32>,
Expand Down
7 changes: 5 additions & 2 deletions orion-lib/src/transport/grpc_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use http::{
};
use std::{iter::Cycle, sync::Arc, vec::IntoIter};

use orion_xds::grpc_deps::{to_grpc_body, GrpcBody};
use orion_xds::grpc_deps::GrpcBody;
use tower::Service;

use crate::{
Expand Down Expand Up @@ -70,7 +70,10 @@ impl GrpcService {

let svc_resp =
self.inner.to_response(&Arc::new(TransactionHandler::default()), RequestExt::new(http_req)).await?;
Ok(svc_resp.map(to_grpc_body))
let (header, body) = svc_resp.into_parts();
let body = GrpcBody::new(body);
let svc_resp = http::Response::from_parts(header, body);
Ok(svc_resp)
}
}

Expand Down
7 changes: 5 additions & 2 deletions orion-lib/src/transport/http_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ use webpki::types::ServerName;

#[cfg(feature = "metrics")]
use {
hyper_util::client::legacy::pool::{ConnectionEvent, EventHandler, Tag},
hyper_util::client::legacy::PoolKey,
hyper_util::client::legacy::{
pool::{ConnectionEvent, EventHandler, Tag},
PoolKey,
},
std::any::Any,
};
const DEFAULT_IDLE_TIMEOUT: Duration = Duration::from_secs(30);
Expand Down Expand Up @@ -510,6 +512,7 @@ impl HttpChannel {

let mut total_requests = 0;
for (index, back_off) in retry_policy.exponential_back_off().iter().enumerate() {
let back_off = back_off.unwrap_or(Duration::from_secs(1));
total_requests += 1;
let cloned_body =
BodyWithMetrics { inner: body.clone().into(), guard: guard.clone(), state: state.clone() };
Expand Down
Loading
Loading