From 1325f14410f333e5a1a5027f85f351547fa9898b Mon Sep 17 00:00:00 2001 From: ifeanyi Date: Sun, 14 Mar 2021 14:11:05 +0100 Subject: [PATCH] Update proto submodules --- build.rs | 2 +- cloudbuild.yaml | 8 ++++---- proto/data-plane-api | 2 +- proto/googleapis | 2 +- proto/protoc-gen-validate | 2 +- proto/udpa | 2 +- src/xds/ads_client.rs | 1 + src/xds/cluster.rs | 9 +++++---- src/xds/listener.rs | 20 +++++++++++++++++--- src/xds/mod.rs | 8 +++++--- tests/xds.rs | 17 +++++++++++++---- 11 files changed, 50 insertions(+), 23 deletions(-) diff --git a/build.rs b/build.rs index c52ee224b6..d1190ac4bf 100644 --- a/build.rs +++ b/build.rs @@ -27,7 +27,7 @@ fn main() -> Result<(), Box> { "proto/data-plane-api/envoy/service/discovery/v3/discovery.proto", "proto/data-plane-api/envoy/type/metadata/v3/metadata.proto", "proto/data-plane-api/envoy/type/tracing/v3/custom_tag.proto", - "proto/udpa/udpa/core/v1/resource_name.proto", + "proto/udpa/xds/core/v3/resource_name.proto", "proto/quilkin/extensions/filters/debug/v1alpha1/debug.proto", "proto/quilkin/extensions/filters/capture_bytes/v1alpha1/capture_bytes.proto", "proto/quilkin/extensions/filters/compress/v1alpha1/compress.proto", diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 3bf36cde50..e961215536 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -19,13 +19,13 @@ steps: - '-c' - | git clone --depth 1000 https://github.com/envoyproxy/data-plane-api.git proto/data-plane-api - git -C proto/data-plane-api checkout b84d3bea45b59abc3fd21fba26140a379461fc67 + git -C proto/data-plane-api checkout c5f1620aa47b4dfdefebb5271c3135ef33029a0e git clone --depth 1000 https://github.com/cncf/udpa.git proto/udpa - git -C proto/udpa checkout efcf912fb35470672231c7b7bef620f3d17f655a + git -C proto/udpa checkout bff43e8824d093cb64afdc901266cfab5a9777f0 git clone --depth 1000 https://github.com/envoyproxy/protoc-gen-validate.git proto/protoc-gen-validate - git -C proto/protoc-gen-validate checkout e84d38a1a4c27d4662779c31a06528cdbc6b4b4f + git -C proto/protoc-gen-validate checkout 12afc6dcd71f00ea08deee4df84173aed4cc7f97 git clone --depth 1000 https://github.com/googleapis/googleapis.git proto/googleapis - git -C proto/googleapis checkout 2db5725bf898b544a0cf951e1694d3b0fce5eda3 + git -C proto/googleapis checkout a0d282daa691e95ec51131c81c3777fc95abf7f8 id: fetch-git-submodules # clippy tends to rely on cached results from other cargo sub-commands so # that it skips checking some files that were built previously. As a result diff --git a/proto/data-plane-api b/proto/data-plane-api index b84d3bea45..c5f1620aa4 160000 --- a/proto/data-plane-api +++ b/proto/data-plane-api @@ -1 +1 @@ -Subproject commit b84d3bea45b59abc3fd21fba26140a379461fc67 +Subproject commit c5f1620aa47b4dfdefebb5271c3135ef33029a0e diff --git a/proto/googleapis b/proto/googleapis index 2db5725bf8..a0d282daa6 160000 --- a/proto/googleapis +++ b/proto/googleapis @@ -1 +1 @@ -Subproject commit 2db5725bf898b544a0cf951e1694d3b0fce5eda3 +Subproject commit a0d282daa691e95ec51131c81c3777fc95abf7f8 diff --git a/proto/protoc-gen-validate b/proto/protoc-gen-validate index e84d38a1a4..12afc6dcd7 160000 --- a/proto/protoc-gen-validate +++ b/proto/protoc-gen-validate @@ -1 +1 @@ -Subproject commit e84d38a1a4c27d4662779c31a06528cdbc6b4b4f +Subproject commit 12afc6dcd71f00ea08deee4df84173aed4cc7f97 diff --git a/proto/udpa b/proto/udpa index efcf912fb3..bff43e8824 160000 --- a/proto/udpa +++ b/proto/udpa @@ -1 +1 @@ -Subproject commit efcf912fb35470672231c7b7bef620f3d17f655a +Subproject commit bff43e8824d093cb64afdc901266cfab5a9777f0 diff --git a/src/xds/ads_client.rs b/src/xds/ads_client.rs index 69c9156694..1019cc0d1e 100644 --- a/src/xds/ads_client.rs +++ b/src/xds/ads_client.rs @@ -307,6 +307,7 @@ impl AdsClient { id: node_id.clone(), cluster: "".into(), metadata: None, + dynamic_parameters: Default::default(), locality: None, user_agent_name: "quilkin".into(), extensions: vec![], diff --git a/src/xds/cluster.rs b/src/xds/cluster.rs index 7b2818bedf..8b1b868768 100644 --- a/src/xds/cluster.rs +++ b/src/xds/cluster.rs @@ -298,9 +298,10 @@ impl ClusterManager { Err(Error::new("no port specifier was provided".into())) }) } - address::Address::Pipe(_) => { - Err(Error::new("pipe addresses are not supported".into())) - } + invalid => Err(Error::new(format!( + "unsupported endpoint address type: {:?}", + invalid + ))), }) .unwrap_or_else(|| { Err(Error::new("received `Endpoint` with no `address`".into())) @@ -928,7 +929,7 @@ mod tests { track_timeout_budgets: false, upstream_config: None, track_cluster_stats: None, - prefetch_policy: None, + preconnect_policy: None, connection_pool_per_downstream_connection: false, cluster_discovery_type: Some(ClusterDiscoveryType::Type(0)), lb_config: None, diff --git a/src/xds/listener.rs b/src/xds/listener.rs index d9df6cf0bf..bce019c89b 100644 --- a/src/xds/listener.rs +++ b/src/xds/listener.rs @@ -145,9 +145,16 @@ impl ListenerManager { ) -> Result { let mut filters = vec![]; for filter in lds_filter_chain.filters { - let config = filter.config_type.map(|config| match config { - LdsConfigType::TypedConfig(config) => config, - }); + let config = filter + .config_type + .map(|config| match config { + LdsConfigType::TypedConfig(config) => Ok(config), + invalid => Err(Error::new(format!( + "unsupported filter.config_type: {:?}", + invalid + ))), + }) + .transpose()?; let create_filter_args = CreateFilterArgs::dynamic(self.metrics_registry.clone(), config); @@ -678,6 +685,7 @@ mod tests { ); } + #[allow(deprecated)] fn create_lds_filter_chain(filters: Vec) -> LdsFilterChain { LdsFilterChain { filter_chain_match: None, @@ -685,16 +693,20 @@ mod tests { use_proxy_proto: None, metadata: None, transport_socket: None, + transport_socket_connect_timeout: None, name: "test-lds-filter-chain".into(), on_demand_configuration: None, } } + #[allow(deprecated)] fn create_lds_listener(name: String, filter_chains: Vec) -> Listener { Listener { name, address: None, filter_chains, + default_filter_chain: None, + use_original_dst: None, per_connection_buffer_limit_bytes: None, metadata: None, deprecated_v1: None, @@ -714,6 +726,8 @@ mod tests { access_log: vec![], udp_writer_config: None, tcp_backlog_size: None, + bind_to_port: None, + listener_specifier: None, } } } diff --git a/src/xds/mod.rs b/src/xds/mod.rs index f44a45badb..3e41539282 100644 --- a/src/xds/mod.rs +++ b/src/xds/mod.rs @@ -14,11 +14,12 @@ * limitations under the License. */ -mod udpa { +#[allow(clippy::module_inception)] +mod xds { pub mod core { - pub mod v1 { + pub mod v3 { #![doc(hidden)] - tonic::include_proto!("udpa.core.v1"); + tonic::include_proto!("xds.core.v3"); } } } @@ -76,6 +77,7 @@ mod envoy { } pub mod listener { pub mod v3 { + #![allow(clippy::large_enum_variant)] #![doc(hidden)] tonic::include_proto!("envoy.config.listener.v3"); } diff --git a/tests/xds.rs b/tests/xds.rs index bfdd69b77a..0e16572889 100644 --- a/tests/xds.rs +++ b/tests/xds.rs @@ -14,11 +14,12 @@ * limitations under the License. */ -mod udpa { +#[allow(clippy::module_inception)] +mod xds { pub mod core { - pub mod v1 { + pub mod v3 { #![doc(hidden)] - tonic::include_proto!("udpa.core.v1"); + tonic::include_proto!("xds.core.v3"); } } } @@ -76,6 +77,7 @@ mod envoy { } pub mod listener { pub mod v3 { + #![allow(clippy::large_enum_variant)] #![doc(hidden)] tonic::include_proto!("envoy.config.listener.v3"); } @@ -456,7 +458,7 @@ dynamic: track_timeout_budgets: false, upstream_config: None, track_cluster_stats: None, - prefetch_policy: None, + preconnect_policy: None, connection_pool_per_downstream_connection: false, cluster_discovery_type: Some(ClusterDiscoveryType::Type(0)), lb_config: None, @@ -497,6 +499,7 @@ dynamic: } } + #[allow(deprecated)] fn create_lds_filter_chain(filters: Vec) -> LdsFilterChain { LdsFilterChain { filter_chain_match: None, @@ -504,16 +507,20 @@ dynamic: use_proxy_proto: None, metadata: None, transport_socket: None, + transport_socket_connect_timeout: None, name: "test-lds-filter-chain".into(), on_demand_configuration: None, } } + #[allow(deprecated)] fn create_lds_listener(name: String, filter_chains: Vec) -> Listener { Listener { name, address: None, filter_chains, + default_filter_chain: None, + use_original_dst: None, per_connection_buffer_limit_bytes: None, metadata: None, deprecated_v1: None, @@ -533,6 +540,8 @@ dynamic: access_log: vec![], udp_writer_config: None, tcp_backlog_size: None, + bind_to_port: None, + listener_specifier: None, } } }