Skip to content

Commit 0e6df7c

Browse files
authored
proxy-api: Update proxy-api to use the main branch (#1029)
While we prepare for upcoming policy work, we should move the proxy to use the updated crate from the main branch of the repo. This updated version exposes a feature for each API--and for server- and client-generation--so that we can more narrowly express dependencies in the proxy.
1 parent d4f72c1 commit 0e6df7c

File tree

9 files changed

+18
-17
lines changed

9 files changed

+18
-17
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,14 +1484,14 @@ dependencies = [
14841484
[[package]]
14851485
name = "linkerd2-proxy-api"
14861486
version = "0.1.18"
1487-
source = "git+https://github.com/linkerd/linkerd2-proxy-api?tag=v0.1.18#4c424593d934a22635c06706a3c399d0875a49a1"
1487+
source = "git+https://github.com/linkerd/linkerd2-proxy-api?branch=main#453ac1ea2b73fe12bb26a05c2bc6d44eb3d8c77b"
14881488
dependencies = [
14891489
"h2",
14901490
"http",
1491+
"ipnet",
14911492
"prost",
14921493
"prost-types",
14931494
"quickcheck",
1494-
"rand",
14951495
"tonic",
14961496
"tonic-build",
14971497
]

linkerd/app/core/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ linkerd-metrics = { path = "../../metrics" }
4242
linkerd-transport-header = { path = "../../transport-header" }
4343
linkerd-opencensus = { path = "../../opencensus" }
4444
linkerd-proxy-core = { path = "../../proxy/core" }
45-
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api", tag = "v0.1.18" }
45+
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api", branch = "main" }
4646
linkerd-proxy-api-resolve = { path = "../../proxy/api-resolve" }
4747
linkerd-proxy-discover = { path = "../../proxy/discover" }
4848
linkerd-proxy-identity = { path = "../../proxy/identity" }
@@ -85,5 +85,5 @@ features = [
8585
linkerd-system = { path = "../../system" }
8686

8787
[dev-dependencies]
88-
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api", tag = "v0.1.18", features = ["arbitrary"] }
88+
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api", branch = "main", features = ["arbitrary"] }
8989
prost-types = "0.7.0"

linkerd/app/inbound/fuzz/Cargo.lock

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1286,10 +1286,11 @@ dependencies = [
12861286
[[package]]
12871287
name = "linkerd2-proxy-api"
12881288
version = "0.1.18"
1289-
source = "git+https://github.com/linkerd/linkerd2-proxy-api?tag=v0.1.18#4c424593d934a22635c06706a3c399d0875a49a1"
1289+
source = "git+https://github.com/linkerd/linkerd2-proxy-api?branch=main#453ac1ea2b73fe12bb26a05c2bc6d44eb3d8c77b"
12901290
dependencies = [
12911291
"h2",
12921292
"http",
1293+
"ipnet",
12931294
"prost",
12941295
"prost-types",
12951296
"tonic",

linkerd/app/integration/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ hyper = { version = "0.14.2", features = ["http1", "http2", "stream", "client",
2626
linkerd-app = { path = "..", features = ["allow-loopback"] }
2727
linkerd-app-core = { path = "../core" }
2828
linkerd-metrics = { path = "../../metrics", features = ["test_util"] }
29-
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api", tag = "v0.1.18", features = ["arbitrary"] }
29+
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api", branch = "main", features = ["destination", "arbitrary"] }
3030
linkerd-app-test = { path = "../test" }
3131
linkerd-tracing = { path = "../../tracing" }
3232
regex = "1"

linkerd/proxy/api-resolve/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ async-stream = "0.3"
1414
futures = "0.3.15"
1515
linkerd-addr = { path = "../../addr" }
1616
linkerd-error = { path = "../../error" }
17-
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api", tag = "v0.1.18" }
17+
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api", branch = "main", features = ["destination", "client"] }
1818
linkerd-proxy-core = { path = "../core" }
1919
linkerd-stack = { path = "../../stack" }
2020
linkerd-tls = { path = "../../tls" }

linkerd/proxy/identity/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ publish = false
88

99
[dependencies]
1010
futures = "0.3.15"
11-
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api", tag = "v0.1.18" }
11+
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api", branch = "main", features = ["identity", "client"] }
1212
linkerd-error = { path = "../../error" }
1313
linkerd-identity = { path = "../../identity" }
1414
linkerd-metrics = { path = "../../metrics" }

linkerd/proxy/tap/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ hyper = { version = "0.14.2", features = ["http1", "http2"] }
1212
futures = "0.3.15"
1313
indexmap = "1.0"
1414
ipnet = "2.0"
15-
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api", tag = "v0.1.18" }
15+
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api", branch = "main", features = ["tap", "server"] }
1616
linkerd-conditional = { path = "../../conditional" }
1717
linkerd-error = { path = "../../error" }
1818
linkerd-identity = { path = "../../identity" }
@@ -30,5 +30,5 @@ tracing = "0.1.23"
3030
pin-project = "1"
3131

3232
[dev-dependencies]
33-
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api", tag = "v0.1.18", features = ["arbitrary"] }
33+
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api", branch = "main", features = ["arbitrary"] }
3434
prost-types = "0.7.0"

linkerd/proxy/tap/src/grpc/server.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use crate::{iface, Inspect, Registry};
33
use futures::ready;
44
use futures::stream::Stream;
55
use hyper::body::{Buf, HttpBody};
6-
use linkerd2_proxy_api::{http_types, pb_duration, tap as api};
6+
use linkerd2_proxy_api::{http_types, tap as api};
77
use linkerd_conditional::Conditional;
88
use linkerd_proxy_http::HasH2Reason;
99
use linkerd_tls as tls;
@@ -373,7 +373,7 @@ impl iface::TapResponse for TapResponse {
373373

374374
let init = api::tap_event::http::Event::ResponseInit(api::tap_event::http::ResponseInit {
375375
id: Some(self.tap.id.clone()),
376-
since_request_init: Some(pb_duration(response_init_at - self.request_init_at)),
376+
since_request_init: Some((response_init_at - self.request_init_at).into()),
377377
http_status: rsp.status().as_u16().into(),
378378
headers,
379379
});
@@ -406,7 +406,7 @@ impl iface::TapResponse for TapResponse {
406406
let reason = err.h2_reason();
407407
let end = api::tap_event::http::Event::ResponseEnd(api::tap_event::http::ResponseEnd {
408408
id: Some(self.tap.id.clone()),
409-
since_request_init: Some(pb_duration(response_end_at - self.request_init_at)),
409+
since_request_init: Some((response_end_at - self.request_init_at).into()),
410410
since_response_init: None,
411411
response_bytes: 0,
412412
eos: Some(api::Eos {
@@ -472,8 +472,8 @@ impl TapResponsePayload {
472472
};
473473
let end = api::tap_event::http::ResponseEnd {
474474
id: Some(self.tap.id),
475-
since_request_init: Some(pb_duration(response_end_at - self.request_init_at)),
476-
since_response_init: Some(pb_duration(response_end_at - self.response_init_at)),
475+
since_request_init: Some((response_end_at - self.request_init_at).into()),
476+
since_response_init: Some((response_end_at - self.response_init_at).into()),
477477
response_bytes: self.response_bytes as u64,
478478
eos: Some(api::Eos { end }),
479479
trailers,

linkerd/service-profiles/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ indexmap = "1.0"
1818
linkerd-addr = { path = "../addr" }
1919
linkerd-dns-name = { path = "../dns/name" }
2020
linkerd-error = { path = "../error" }
21-
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api", tag = "v0.1.18" }
21+
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api", branch = "main", features = ["destination", "client"] }
2222
linkerd-proxy-api-resolve = { path = "../proxy/api-resolve" }
2323
linkerd-stack = { path = "../stack" }
2424
rand = { version = "0.8", features = ["small_rng"] }
@@ -32,6 +32,6 @@ tracing = "0.1.23"
3232
pin-project = "1"
3333

3434
[dev-dependencies]
35-
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api", tag = "v0.1.18", features = ["arbitrary"] }
35+
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api", branch = "main", features = ["arbitrary"] }
3636
prost-types = "0.7.0"
3737
quickcheck = { version = "1", default-features = false }

0 commit comments

Comments
 (0)