From f552826a0fdc10bf1a43dfbe632f3eba7dfd434e Mon Sep 17 00:00:00 2001 From: "data-plane-api(CircleCI)" Date: Tue, 22 Oct 2019 04:06:57 +0000 Subject: [PATCH] Fix PGV location references and TODOs. (#8708) Fix PGV location references and TODOs. Remove some unused imports. Risk Level: Low (locations in comments and simple TODOs as outlined by @htuch) Testing: bazel build @envoy_api//envoy/..., bazel test //test/... Signed-off-by: Michael Payne Mirrored from https://github.com/envoyproxy/envoy @ 68ca6746d168c6cea26d21479ef50b2be9aaa25d --- envoy/api/v2/cluster/circuit_breaker.proto | 6 +++--- envoy/api/v2/route/route.proto | 4 +--- envoy/api/v3alpha/cluster/circuit_breaker.proto | 6 +++--- envoy/api/v3alpha/route/route.proto | 4 +--- .../config/filter/network/dubbo_proxy/v2alpha1/route.proto | 2 -- envoy/config/filter/network/dubbo_proxy/v3alpha/route.proto | 2 -- envoy/data/accesslog/v2/accesslog.proto | 4 +--- envoy/data/accesslog/v3alpha/accesslog.proto | 4 +--- 8 files changed, 10 insertions(+), 22 deletions(-) diff --git a/envoy/api/v2/cluster/circuit_breaker.proto b/envoy/api/v2/cluster/circuit_breaker.proto index d4e32df5..2a194417 100644 --- a/envoy/api/v2/cluster/circuit_breaker.proto +++ b/envoy/api/v2/cluster/circuit_breaker.proto @@ -12,6 +12,8 @@ import "envoy/api/v2/core/base.proto"; import "google/protobuf/wrappers.proto"; +import "validate/validate.proto"; + // [#protodoc-title: Circuit breakers] // :ref:`Circuit breaking` settings can be @@ -23,9 +25,7 @@ message CircuitBreakers { message Thresholds { // The :ref:`RoutingPriority` // the specified CircuitBreaker settings apply to. - // [#comment:TODO(htuch): add (validate.rules).enum.defined_only = true once - // https://github.com/lyft/protoc-gen-validate/issues/42 is resolved.] - core.RoutingPriority priority = 1; + core.RoutingPriority priority = 1 [(validate.rules).enum = {defined_only: true}]; // The maximum number of connections that Envoy will make to the upstream // cluster. If not specified, the default is 1024. diff --git a/envoy/api/v2/route/route.proto b/envoy/api/v2/route/route.proto index 937a511f..118fe852 100644 --- a/envoy/api/v2/route/route.proto +++ b/envoy/api/v2/route/route.proto @@ -792,9 +792,7 @@ message RouteAction { RequestMirrorPolicy request_mirror_policy = 10; // Optionally specifies the :ref:`routing priority `. - // [#comment:TODO(htuch): add (validate.rules).enum.defined_only = true once - // https://github.com/lyft/protoc-gen-validate/issues/42 is resolved.] - core.RoutingPriority priority = 11; + core.RoutingPriority priority = 11 [(validate.rules).enum = {defined_only: true}]; // Specifies a set of rate limit configurations that could be applied to the // route. diff --git a/envoy/api/v3alpha/cluster/circuit_breaker.proto b/envoy/api/v3alpha/cluster/circuit_breaker.proto index 272a231a..0e229e53 100644 --- a/envoy/api/v3alpha/cluster/circuit_breaker.proto +++ b/envoy/api/v3alpha/cluster/circuit_breaker.proto @@ -10,6 +10,8 @@ import "envoy/api/v3alpha/core/base.proto"; import "google/protobuf/wrappers.proto"; +import "validate/validate.proto"; + // [#protodoc-title: Circuit breakers] // :ref:`Circuit breaking` settings can be @@ -21,9 +23,7 @@ message CircuitBreakers { message Thresholds { // The :ref:`RoutingPriority` // the specified CircuitBreaker settings apply to. - // [#comment:TODO(htuch): add (validate.rules).enum.defined_only = true once - // https://github.com/lyft/protoc-gen-validate/issues/42 is resolved.] - core.RoutingPriority priority = 1; + core.RoutingPriority priority = 1 [(validate.rules).enum = {defined_only: true}]; // The maximum number of connections that Envoy will make to the upstream // cluster. If not specified, the default is 1024. diff --git a/envoy/api/v3alpha/route/route.proto b/envoy/api/v3alpha/route/route.proto index f1540406..7650ee28 100644 --- a/envoy/api/v3alpha/route/route.proto +++ b/envoy/api/v3alpha/route/route.proto @@ -746,9 +746,7 @@ message RouteAction { RequestMirrorPolicy request_mirror_policy = 10; // Optionally specifies the :ref:`routing priority `. - // [#comment:TODO(htuch): add (validate.rules).enum.defined_only = true once - // https://github.com/lyft/protoc-gen-validate/issues/42 is resolved.] - core.RoutingPriority priority = 11; + core.RoutingPriority priority = 11 [(validate.rules).enum = {defined_only: true}]; // Specifies a set of rate limit configurations that could be applied to the // route. diff --git a/envoy/config/filter/network/dubbo_proxy/v2alpha1/route.proto b/envoy/config/filter/network/dubbo_proxy/v2alpha1/route.proto index edd40003..9f76a007 100644 --- a/envoy/config/filter/network/dubbo_proxy/v2alpha1/route.proto +++ b/envoy/config/filter/network/dubbo_proxy/v2alpha1/route.proto @@ -10,8 +10,6 @@ import "envoy/api/v2/route/route.proto"; import "envoy/type/matcher/string.proto"; import "envoy/type/range.proto"; -import "google/protobuf/wrappers.proto"; - import "validate/validate.proto"; // [#protodoc-title: Dubbo Proxy Route Configuration] diff --git a/envoy/config/filter/network/dubbo_proxy/v3alpha/route.proto b/envoy/config/filter/network/dubbo_proxy/v3alpha/route.proto index 6697c467..066e6158 100644 --- a/envoy/config/filter/network/dubbo_proxy/v3alpha/route.proto +++ b/envoy/config/filter/network/dubbo_proxy/v3alpha/route.proto @@ -10,8 +10,6 @@ import "envoy/api/v3alpha/route/route.proto"; import "envoy/type/matcher/v3alpha/string.proto"; import "envoy/type/v3alpha/range.proto"; -import "google/protobuf/wrappers.proto"; - import "validate/validate.proto"; // [#protodoc-title: Dubbo Proxy Route Configuration] diff --git a/envoy/data/accesslog/v2/accesslog.proto b/envoy/data/accesslog/v2/accesslog.proto index d2f75d4d..581b2d4c 100644 --- a/envoy/data/accesslog/v2/accesslog.proto +++ b/envoy/data/accesslog/v2/accesslog.proto @@ -289,9 +289,7 @@ message TLSProperties { // [#next-free-field: 14] message HTTPRequestProperties { // The request method (RFC 7231/2616). - // [#comment:TODO(htuch): add (validate.rules).enum.defined_only = true once - // https://github.com/lyft/protoc-gen-validate/issues/42 is resolved.] - api.v2.core.RequestMethod request_method = 1; + api.v2.core.RequestMethod request_method = 1 [(validate.rules).enum = {defined_only: true}]; // The scheme portion of the incoming request URI. string scheme = 2; diff --git a/envoy/data/accesslog/v3alpha/accesslog.proto b/envoy/data/accesslog/v3alpha/accesslog.proto index 177fb666..f97f5e00 100644 --- a/envoy/data/accesslog/v3alpha/accesslog.proto +++ b/envoy/data/accesslog/v3alpha/accesslog.proto @@ -289,9 +289,7 @@ message TLSProperties { // [#next-free-field: 14] message HTTPRequestProperties { // The request method (RFC 7231/2616). - // [#comment:TODO(htuch): add (validate.rules).enum.defined_only = true once - // https://github.com/lyft/protoc-gen-validate/issues/42 is resolved.] - api.v3alpha.core.RequestMethod request_method = 1; + api.v3alpha.core.RequestMethod request_method = 1 [(validate.rules).enum = {defined_only: true}]; // The scheme portion of the incoming request URI. string scheme = 2;