api: make any serialization stable (#6241)

Using proto.MarshalAny results in unstable output due to non-deterministic map ordering. This in turn causes Envoy's diff to reload a config since the hash of the structure changes.
Enable stable marshaler for gogoproto to avoid this problem. See #6252
Risk Level: low
Testing: n/a

Signed-off-by: Kuat Yessenov <kuat@google.com>

Mirrored from https://github.com/envoyproxy/envoy @ 15a19b9cb1cc8bd5a5ec71d125177b3f6c9a3cf5
pull/620/head
data-plane-api(CircleCI) 6 years ago
parent f4bc9d841c
commit 4f4ee118c5
  1. 1
      envoy/api/v2/cds.proto
  2. 1
      envoy/api/v2/core/base.proto
  3. 1
      envoy/api/v2/discovery.proto
  4. 1
      envoy/api/v2/eds.proto
  5. 1
      envoy/api/v2/route/route.proto
  6. 3
      envoy/config/filter/http/ext_authz/v2/ext_authz.proto
  7. 2
      envoy/config/filter/http/health_check/v2/health_check.proto
  8. 3
      envoy/config/filter/http/jwt_authn/v2alpha/config.proto
  9. 2
      envoy/config/filter/network/dubbo_proxy/v2alpha1/route.proto
  10. 3
      envoy/config/rbac/v2alpha/rbac.proto
  11. 2
      envoy/data/accesslog/v2/accesslog.proto
  12. 3
      envoy/service/auth/v2/attribute_context.proto

@ -30,6 +30,7 @@ import "validate/validate.proto";
import "gogoproto/gogo.proto";
option (gogoproto.equal_all) = true;
option (gogoproto.stable_marshaler_all) = true;
// Return list of all clusters this proxy will load balance to.
service ClusterDiscoveryService {

@ -17,6 +17,7 @@ import "gogoproto/gogo.proto";
import "envoy/type/percent.proto";
option (gogoproto.equal_all) = true;
option (gogoproto.stable_marshaler_all) = true;
// [#protodoc-title: Common types]

@ -14,6 +14,7 @@ import "google/rpc/status.proto";
import "gogoproto/gogo.proto";
option (gogoproto.equal_all) = true;
option (gogoproto.stable_marshaler_all) = true;
// [#protodoc-title: Common discovery API components]

@ -19,6 +19,7 @@ import "gogoproto/gogo.proto";
import "google/protobuf/wrappers.proto";
option (gogoproto.equal_all) = true;
option (gogoproto.stable_marshaler_all) = true;
// [#protodoc-title: EDS]
// Endpoint discovery :ref:`architecture overview <arch_overview_service_discovery_types_eds>`

@ -21,6 +21,7 @@ import "validate/validate.proto";
import "gogoproto/gogo.proto";
option (gogoproto.equal_all) = true;
option (gogoproto.stable_marshaler_all) = true;
// [#protodoc-title: HTTP route]
// * Routing :ref:`architecture overview <arch_overview_http_routing>`

@ -14,6 +14,9 @@ import "envoy/api/v2/core/http_uri.proto";
import "envoy/type/matcher/string.proto";
import "validate/validate.proto";
import "gogoproto/gogo.proto";
option (gogoproto.stable_marshaler_all) = true;
// [#protodoc-title: External Authorization]
// External Authorization :ref:`configuration overview <config_http_filters_ext_authz>`.

@ -16,6 +16,8 @@ import "envoy/type/percent.proto";
import "validate/validate.proto";
import "gogoproto/gogo.proto";
option (gogoproto.stable_marshaler_all) = true;
// [#protodoc-title: Health check]
// Health check :ref:`configuration overview <config_http_filters_health_check>`.

@ -14,6 +14,9 @@ import "google/protobuf/duration.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/wrappers.proto";
import "validate/validate.proto";
import "gogoproto/gogo.proto";
option (gogoproto.stable_marshaler_all) = true;
// [#protodoc-title: JWT Authentication]
// JWT Authentication :ref:`configuration overview <config_http_filters_jwt_authn>`.

@ -16,6 +16,8 @@ import "google/protobuf/wrappers.proto";
import "validate/validate.proto";
import "gogoproto/gogo.proto";
option (gogoproto.stable_marshaler_all) = true;
// [#protodoc-title: Dubbo route configuration]
message RouteConfiguration {

@ -1,6 +1,7 @@
syntax = "proto3";
import "validate/validate.proto";
import "gogoproto/gogo.proto";
import "envoy/api/v2/core/address.proto";
import "envoy/api/v2/route/route.proto";
import "envoy/type/matcher/metadata.proto";
@ -13,6 +14,8 @@ option java_multiple_files = true;
option java_package = "io.envoyproxy.envoy.config.rbac.v2alpha";
option go_package = "v2alpha";
option (gogoproto.stable_marshaler_all) = true;
// [#protodoc-title: Role Based Access Control (RBAC)]
// Role Based Access Control (RBAC) provides service-level and method-level access control for a

@ -15,6 +15,8 @@ import "google/protobuf/wrappers.proto";
import "gogoproto/gogo.proto";
import "validate/validate.proto";
option (gogoproto.stable_marshaler_all) = true;
// [#protodoc-title: gRPC access logs]
// Envoy access logs describe incoming interaction with Envoy over a fixed
// period of time, and typically cover a single request/response exchange,

@ -9,6 +9,9 @@ option java_package = "io.envoyproxy.envoy.service.auth.v2";
import "envoy/api/v2/core/address.proto";
import "google/protobuf/timestamp.proto";
import "gogoproto/gogo.proto";
option (gogoproto.stable_marshaler_all) = true;
// [#protodoc-title: Attribute Context ]

Loading…
Cancel
Save