Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update proto submodules #212

Merged
merged 2 commits into from
Mar 15, 2021
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
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
"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",
Expand Down
8 changes: 4 additions & 4 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion proto/data-plane-api
Submodule data-plane-api updated 391 files
2 changes: 1 addition & 1 deletion proto/googleapis
Submodule googleapis updated 4264 files
2 changes: 1 addition & 1 deletion proto/protoc-gen-validate
1 change: 1 addition & 0 deletions src/xds/ads_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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![],
Expand Down
9 changes: 5 additions & 4 deletions src/xds/cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand Down Expand Up @@ -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,
Expand Down
20 changes: 17 additions & 3 deletions src/xds/listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,16 @@ impl ListenerManager {
) -> Result<ProxyFilterChain, Error> {
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);

Expand Down Expand Up @@ -678,23 +685,28 @@ mod tests {
);
}

#[allow(deprecated)]
fn create_lds_filter_chain(filters: Vec<LdsFilter>) -> LdsFilterChain {
LdsFilterChain {
filter_chain_match: None,
filters,
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<LdsFilterChain>) -> 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,
Expand All @@ -714,6 +726,8 @@ mod tests {
access_log: vec![],
udp_writer_config: None,
tcp_backlog_size: None,
bind_to_port: None,
listener_specifier: None,
}
}
}
8 changes: 5 additions & 3 deletions src/xds/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
}
Expand Down Expand Up @@ -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");
}
Expand Down
17 changes: 13 additions & 4 deletions tests/xds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
}
Expand Down Expand Up @@ -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");
}
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -497,23 +499,28 @@ dynamic:
}
}

#[allow(deprecated)]
fn create_lds_filter_chain(filters: Vec<LdsFilter>) -> LdsFilterChain {
LdsFilterChain {
filter_chain_match: None,
filters,
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<LdsFilterChain>) -> 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,
Expand All @@ -533,6 +540,8 @@ dynamic:
access_log: vec![],
udp_writer_config: None,
tcp_backlog_size: None,
bind_to_port: None,
listener_specifier: None,
}
}
}