Skip to content

Commit 705e158

Browse files
authored
build(deps): pin proxy-api to git (#3327)
While finalizing API changes for an upcoming release, we need to pin the `linkerd2-proxy-api` dependency to a specific commit in the `main` branch. This will allow us to completely validate end-to-end functionality before releasing the new version of the API crate.
1 parent 5cfc228 commit 705e158

File tree

8 files changed

+35
-12
lines changed

8 files changed

+35
-12
lines changed

Cargo.lock

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2514,8 +2514,7 @@ dependencies = [
25142514
[[package]]
25152515
name = "linkerd2-proxy-api"
25162516
version = "0.14.0"
2517-
source = "registry+https://github.com/rust-lang/crates.io-index"
2518-
checksum = "26c72fb98d969e1e94e95d52a6fcdf4693764702c369e577934256e72fb5bc61"
2517+
source = "git+https://github.com/linkerd/linkerd2-proxy-api.git?branch=main#2be6843a95360eaa370363c42e3aa85142b7a36c"
25192518
dependencies = [
25202519
"h2",
25212520
"http",

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,5 @@ debug = 1
8989
lto = true
9090

9191
[workspace.dependencies]
92-
linkerd2-proxy-api = "0.14.0"
92+
#linkerd2-proxy-api = "0.14.0"
93+
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api.git", branch = "main" }

linkerd/app/integration/src/controller.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,7 @@ impl From<DestinationBuilder> for pb::Update {
530530
tls_identity,
531531
authority_override: None,
532532
http2: None,
533+
resource_ref: None,
533534
}],
534535
metric_labels: set_labels,
535536
})),
@@ -610,7 +611,11 @@ pub fn retry_budget(
610611
}
611612

612613
pub fn dst_override(authority: String, weight: u32) -> pb::WeightedDst {
613-
pb::WeightedDst { authority, weight }
614+
pb::WeightedDst {
615+
authority,
616+
weight,
617+
backend_ref: None,
618+
}
614619
}
615620

616621
pub fn route() -> RouteBuilder {

linkerd/app/integration/src/policy.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ pub fn all_unauthenticated() -> inbound::Server {
4545
inbound::proxy_protocol::Detect {
4646
timeout: Some(Duration::from_secs(10).try_into().unwrap()),
4747
http_routes: vec![],
48+
http_local_rate_limit: None,
4849
},
4950
)),
5051
}),
@@ -161,12 +162,14 @@ pub fn outbound_default_opaque_route(dst: impl ToString) -> outbound::OpaqueRout
161162
metadata: Some(api::meta::Metadata {
162163
kind: Some(api::meta::metadata::Kind::Default("default".to_string())),
163164
}),
165+
error: None,
164166
rules: vec![outbound::opaque_route::Rule {
165167
backends: Some(opaque_route::Distribution {
166168
kind: Some(distribution::Kind::FirstAvailable(
167169
distribution::FirstAvailable {
168170
backends: vec![opaque_route::RouteBackend {
169171
backend: Some(backend(dst)),
172+
invalid: None,
170173
}],
171174
},
172175
)),

linkerd/proxy/api-resolve/src/pb.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ mod tests {
410410
#[test]
411411
fn zone_locality() {
412412
let addr = WeightedAddr {
413+
resource_ref: None,
413414
addr: Some(TcpAddress {
414415
ip: Some(IpAddress {
415416
ip: Some(Ip::Ipv4(0)),

linkerd/proxy/client-policy/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,10 @@ pub mod proto {
479479
proxy_protocol::Kind::Http2(http) => Protocol::Http2(http.try_into()?),
480480
proxy_protocol::Kind::Opaque(opaque) => Protocol::Opaque(opaque.try_into()?),
481481
proxy_protocol::Kind::Grpc(grpc) => Protocol::Grpc(grpc.try_into()?),
482+
proxy_protocol::Kind::Tls(_tls) => {
483+
// TODO(ver): impl TryFrom<proxy_protocol::Tls> for `tls::Tls`
484+
return Err(InvalidPolicy::Protocol("TLS not supported yet"));
485+
}
482486
};
483487

484488
let mut backends = BackendSet::default();

linkerd/proxy/client-policy/src/opaq.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,11 @@ pub(crate) mod proto {
7979
type Error = InvalidOpaqueRoute;
8080

8181
fn try_from(
82-
outbound::OpaqueRoute { metadata, rules }: outbound::OpaqueRoute,
82+
outbound::OpaqueRoute {
83+
metadata,
84+
rules,
85+
error: _, // TODO
86+
}: outbound::OpaqueRoute,
8387
) -> Result<Self, Self::Error> {
8488
let meta = Arc::new(
8589
metadata
@@ -175,7 +179,10 @@ pub(crate) mod proto {
175179
impl TryFrom<opaque_route::RouteBackend> for RouteBackend<Filter> {
176180
type Error = InvalidBackend;
177181
fn try_from(
178-
opaque_route::RouteBackend { backend }: opaque_route::RouteBackend,
182+
opaque_route::RouteBackend {
183+
backend,
184+
invalid: _, // TODO
185+
}: opaque_route::RouteBackend,
179186
) -> Result<Self, Self::Error> {
180187
let backend = backend.ok_or(InvalidBackend::Missing("backend"))?;
181188
RouteBackend::try_from_proto(backend, std::iter::empty::<()>())

linkerd/proxy/server-policy/src/lib.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ pub mod proto {
154154
api::proxy_protocol::Kind::Detect(api::proxy_protocol::Detect {
155155
http_routes,
156156
timeout,
157+
http_local_rate_limit: _,
157158
}) => Protocol::Detect {
158159
http: mk_routes!(http, http_routes, authorizations.clone())?,
159160
timeout: timeout
@@ -162,13 +163,15 @@ pub mod proto {
162163
tcp_authorizations: authorizations,
163164
},
164165

165-
api::proxy_protocol::Kind::Http1(api::proxy_protocol::Http1 { routes }) => {
166-
Protocol::Http1(mk_routes!(http, routes, authorizations)?)
167-
}
166+
api::proxy_protocol::Kind::Http1(api::proxy_protocol::Http1 {
167+
routes,
168+
local_rate_limit: _,
169+
}) => Protocol::Http1(mk_routes!(http, routes, authorizations)?),
168170

169-
api::proxy_protocol::Kind::Http2(api::proxy_protocol::Http2 { routes }) => {
170-
Protocol::Http2(mk_routes!(http, routes, authorizations)?)
171-
}
171+
api::proxy_protocol::Kind::Http2(api::proxy_protocol::Http2 {
172+
routes,
173+
local_rate_limit: _,
174+
}) => Protocol::Http2(mk_routes!(http, routes, authorizations)?),
172175

173176
api::proxy_protocol::Kind::Grpc(api::proxy_protocol::Grpc { routes }) => {
174177
Protocol::Grpc(mk_routes!(grpc, routes, authorizations)?)

0 commit comments

Comments
 (0)