tooling: restoring runtime fatal-by-defaults and changing to fully qualified (#9591)

Changing from relative name to absolute name, and fixing the fatal-by-defaults that were broken by the v3 switch.

The old way to allow fatal-by-defaults was
envoy.deprecated_features:proto_file.proto:field_name
the new way is
envoy.deprecated_features:full.namespace.field_name

When we switched to v3, all the hard-coded v2 names stopped working. This reinstates them via hopefully more permanent proto annotation.

The only remaining ugly bit is that unfortunately the full namespace and field name are the v3 versions even if the original config was v2. Between @htuch and I we should fix that before merging.

Risk Level: Medium
Testing: added new unit tests
Docs Changes: updated
Release Notes: n/a

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>

Mirrored from https://github.com/envoyproxy/envoy @ 156d7c90083c196a206c07fc03b2de6be8260bd3
master-ci-test
data-plane-api(CircleCI) 5 years ago
parent 52dab5a477
commit 046ebe5f95
  1. 1
      envoy/admin/v2alpha/BUILD
  2. 7
      envoy/admin/v2alpha/server_info.proto
  3. 1
      envoy/admin/v3alpha/BUILD
  4. 2
      envoy/admin/v3alpha/server_info.proto
  5. 21
      envoy/annotations/deprecation.proto
  6. 1
      envoy/api/v2/core/BUILD
  7. 4
      envoy/api/v2/core/config_source.proto
  8. 1
      envoy/api/v2/route/BUILD
  9. 6
      envoy/api/v2/route/route_components.proto
  10. 1
      envoy/config/bootstrap/v2/BUILD
  11. 3
      envoy/config/bootstrap/v2/bootstrap.proto
  12. 1
      envoy/config/bootstrap/v3alpha/BUILD
  13. 1
      envoy/config/bootstrap/v3alpha/bootstrap.proto
  14. 1
      envoy/config/core/v3alpha/BUILD
  15. 4
      envoy/config/core/v3alpha/config_source.proto
  16. 1
      envoy/config/filter/fault/v2/BUILD
  17. 3
      envoy/config/filter/fault/v2/fault.proto
  18. 1
      envoy/config/filter/http/ext_authz/v2/BUILD
  19. 3
      envoy/config/filter/http/ext_authz/v2/ext_authz.proto
  20. 1
      envoy/config/filter/network/redis_proxy/v2/BUILD
  21. 6
      envoy/config/filter/network/redis_proxy/v2/redis_proxy.proto
  22. 1
      envoy/config/route/v3alpha/BUILD
  23. 1
      envoy/config/route/v3alpha/route_components.proto
  24. 1
      envoy/extensions/filters/common/fault/v3alpha/BUILD
  25. 1
      envoy/extensions/filters/common/fault/v3alpha/fault.proto
  26. 1
      envoy/extensions/filters/http/ext_authz/v3alpha/BUILD
  27. 1
      envoy/extensions/filters/http/ext_authz/v3alpha/ext_authz.proto
  28. 1
      envoy/extensions/filters/network/redis_proxy/v3alpha/BUILD
  29. 1
      envoy/extensions/filters/network/redis_proxy/v3alpha/redis_proxy.proto

@ -6,6 +6,7 @@ licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
"//envoy/annotations:pkg",
"//envoy/api/v2/core:pkg",
"//envoy/config/bootstrap/v2:pkg",
"//envoy/service/tap/v2alpha:pkg",

@ -4,6 +4,8 @@ package envoy.admin.v2alpha;
import "google/protobuf/duration.proto";
import "envoy/annotations/deprecation.proto";
option java_package = "io.envoyproxy.envoy.admin.v2alpha";
option java_outer_classname = "ServerInfoProto";
option java_multiple_files = true;
@ -128,9 +130,10 @@ message CommandLineOptions {
Mode mode = 19;
// max_stats and max_obj_name_len are now unused and have no effect.
uint64 max_stats = 20 [deprecated = true];
uint64 max_stats = 20 [deprecated = true, (envoy.annotations.disallowed_by_default) = true];
uint64 max_obj_name_len = 21 [deprecated = true];
uint64 max_obj_name_len = 21
[deprecated = true, (envoy.annotations.disallowed_by_default) = true];
// See :option:`--disable-hot-restart` for details.
bool disable_hot_restart = 22;

@ -7,6 +7,7 @@ licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
"//envoy/admin/v2alpha:pkg",
"//envoy/annotations:pkg",
"//envoy/config/bootstrap/v3alpha:pkg",
"//envoy/config/core/v3alpha:pkg",
"//envoy/config/tap/v3alpha:pkg",

@ -6,6 +6,8 @@ import "google/protobuf/duration.proto";
import "udpa/annotations/versioning.proto";
import "envoy/annotations/deprecation.proto";
option java_package = "io.envoyproxy.envoy.admin.v3alpha";
option java_outer_classname = "ServerInfoProto";
option java_multiple_files = true;

@ -0,0 +1,21 @@
syntax = "proto3";
package envoy.annotations;
import "google/protobuf/descriptor.proto";
// Allows tagging proto fields as fatal by default. One Envoy release after
// deprecation, deprecated fields will be disallowed by default, a state which
// is reversible with :ref:`runtime overrides <config_runtime_deprecation>`.
// Magic number in this file derived from top 28bit of SHA256 digest of
// "envoy.annotation.disallowed_by_default"
extend google.protobuf.FieldOptions {
bool disallowed_by_default = 189503207;
}
// Magic number in this file derived from top 28bit of SHA256 digest of
// "envoy.annotation.disallowed_by_default_enum"
extend google.protobuf.EnumValueOptions {
bool disallowed_by_default_enum = 70100853;
}

@ -6,6 +6,7 @@ licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
"//envoy/annotations:pkg",
"//envoy/type:pkg",
"//envoy/type/matcher:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",

@ -7,6 +7,7 @@ import "envoy/api/v2/core/grpc_service.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/wrappers.proto";
import "envoy/annotations/deprecation.proto";
import "udpa/annotations/migrate.proto";
import "validate/validate.proto";
@ -40,7 +41,8 @@ message ApiConfigSource {
enum ApiType {
// Ideally this would be 'reserved 0' but one can't reserve the default
// value. Instead we throw an exception if this is ever used.
UNSUPPORTED_REST_LEGACY = 0 [deprecated = true];
UNSUPPORTED_REST_LEGACY = 0
[deprecated = true, (envoy.annotations.disallowed_by_default_enum) = true];
// REST-JSON v2 API. The `canonical JSON encoding
// <https://developers.google.com/protocol-buffers/docs/proto3#json>`_ for

@ -6,6 +6,7 @@ licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
"//envoy/annotations:pkg",
"//envoy/api/v2/core:pkg",
"//envoy/type:pkg",
"//envoy/type/matcher:pkg",

@ -14,6 +14,7 @@ import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto";
import "envoy/annotations/deprecation.proto";
import "udpa/annotations/migrate.proto";
import "validate/validate.proto";
@ -494,7 +495,8 @@ message CorsPolicy {
//
// **This field is deprecated**. Set the
// :ref:`filter_enabled<envoy_api_field_route.CorsPolicy.filter_enabled>` field instead.
google.protobuf.BoolValue enabled = 7 [deprecated = true];
google.protobuf.BoolValue enabled = 7
[deprecated = true, (envoy.annotations.disallowed_by_default) = true];
// Specifies the % of requests for which the CORS filter is enabled.
//
@ -558,7 +560,7 @@ message RouteAction {
// **This field is deprecated**. Set the
// :ref:`runtime_fraction
// <envoy_api_field_route.RouteAction.RequestMirrorPolicy.runtime_fraction>` field instead.
string runtime_key = 2 [deprecated = true];
string runtime_key = 2 [deprecated = true, (envoy.annotations.disallowed_by_default) = true];
// If both :ref:`runtime_key
// <envoy_api_field_route.RouteAction.RequestMirrorPolicy.runtime_key>` and this field are not

@ -6,6 +6,7 @@ licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
"//envoy/annotations:pkg",
"//envoy/api/v2:pkg",
"//envoy/api/v2/auth:pkg",
"//envoy/api/v2/core:pkg",

@ -16,6 +16,7 @@ import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto";
import "envoy/annotations/deprecation.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.config.bootstrap.v2";
@ -119,7 +120,7 @@ message Bootstrap {
// Configuration for the runtime configuration provider (deprecated). If not
// specified, a null provider will be used which will result in all defaults
// being used.
Runtime runtime = 11 [deprecated = true];
Runtime runtime = 11 [deprecated = true, (envoy.annotations.disallowed_by_default) = true];
// Configuration for the runtime configuration provider. If not
// specified, a null provider will be used which will result in all defaults

@ -6,6 +6,7 @@ licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
"//envoy/annotations:pkg",
"//envoy/config/bootstrap/v2:pkg",
"//envoy/config/cluster/v3alpha:pkg",
"//envoy/config/core/v3alpha:pkg",

@ -18,6 +18,7 @@ import "google/protobuf/wrappers.proto";
import "udpa/annotations/versioning.proto";
import "envoy/annotations/deprecation.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.config.bootstrap.v3alpha";

@ -6,6 +6,7 @@ licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
"//envoy/annotations:pkg",
"//envoy/api/v2/core:pkg",
"//envoy/type/matcher/v3alpha:pkg",
"//envoy/type/v3alpha:pkg",

@ -9,6 +9,7 @@ import "google/protobuf/wrappers.proto";
import "udpa/annotations/versioning.proto";
import "envoy/annotations/deprecation.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.config.core.v3alpha";
@ -42,7 +43,8 @@ message ApiConfigSource {
enum ApiType {
// Ideally this would be 'reserved 0' but one can't reserve the default
// value. Instead we throw an exception if this is ever used.
DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE = 0 [deprecated = true];
DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE = 0
[deprecated = true, (envoy.annotations.disallowed_by_default_enum) = true];
// REST-JSON v2 API. The `canonical JSON encoding
// <https://developers.google.com/protocol-buffers/docs/proto3#json>`_ for

@ -6,6 +6,7 @@ licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
"//envoy/annotations:pkg",
"//envoy/type:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],

@ -6,6 +6,7 @@ import "envoy/type/percent.proto";
import "google/protobuf/duration.proto";
import "envoy/annotations/deprecation.proto";
import "udpa/annotations/migrate.proto";
import "validate/validate.proto";
@ -35,7 +36,7 @@ message FaultDelay {
reserved 2;
// Unused and deprecated. Will be removed in the next release.
FaultDelayType type = 1 [deprecated = true];
FaultDelayType type = 1 [deprecated = true, (envoy.annotations.disallowed_by_default) = true];
oneof fault_delay_secifier {
option (validate.required) = true;

@ -6,6 +6,7 @@ licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
"//envoy/annotations:pkg",
"//envoy/api/v2/core:pkg",
"//envoy/type:pkg",
"//envoy/type/matcher:pkg",

@ -8,6 +8,7 @@ import "envoy/api/v2/core/http_uri.proto";
import "envoy/type/http_status.proto";
import "envoy/type/matcher/string.proto";
import "envoy/annotations/deprecation.proto";
import "udpa/annotations/migrate.proto";
import "validate/validate.proto";
@ -50,7 +51,7 @@ message ExtAuthz {
// useful when transitioning from alpha to release versions assuming that both definitions are
// semantically compatible. Deprecation note: This field is deprecated and should only be used for
// version upgrade. See release notes for more details.
bool use_alpha = 4 [deprecated = true];
bool use_alpha = 4 [deprecated = true, (envoy.annotations.disallowed_by_default) = true];
// Enables filter to buffer the client request body and send it within the authorization request.
// A ``x-envoy-auth-partial-body: false|true`` metadata header will be added to the authorization

@ -6,6 +6,7 @@ licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
"//envoy/annotations:pkg",
"//envoy/api/v2/core:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],

@ -7,6 +7,7 @@ import "envoy/api/v2/core/base.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/wrappers.proto";
import "envoy/annotations/deprecation.proto";
import "udpa/annotations/migrate.proto";
import "validate/validate.proto";
@ -162,7 +163,8 @@ message RedisProxy {
// This field is deprecated. Use a :ref:`catch_all
// route<envoy_api_field_config.filter.network.redis_proxy.v2.RedisProxy.PrefixRoutes.catch_all_route>`
// instead.
string catch_all_cluster = 3 [deprecated = true];
string catch_all_cluster = 3
[deprecated = true, (envoy.annotations.disallowed_by_default) = true];
// Optional catch-all route to forward commands that doesn't match any of the routes. The
// catch-all route becomes required when no routes are specified.
@ -181,7 +183,7 @@ message RedisProxy {
// This field is deprecated. Use a :ref:`catch_all
// route<envoy_api_field_config.filter.network.redis_proxy.v2.RedisProxy.PrefixRoutes.catch_all_route>`
// instead.
string cluster = 2 [deprecated = true];
string cluster = 2 [deprecated = true, (envoy.annotations.disallowed_by_default) = true];
// Network settings for the connection pool to the upstream clusters.
ConnPoolSettings settings = 3 [(validate.rules).message = {required: true}];

@ -6,6 +6,7 @@ licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
"//envoy/annotations:pkg",
"//envoy/api/v2:pkg",
"//envoy/api/v2/route:pkg",
"//envoy/config/core/v3alpha:pkg",

@ -16,6 +16,7 @@ import "google/protobuf/wrappers.proto";
import "udpa/annotations/versioning.proto";
import "envoy/annotations/deprecation.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.config.route.v3alpha";

@ -6,6 +6,7 @@ licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
"//envoy/annotations:pkg",
"//envoy/config/filter/fault/v2:pkg",
"//envoy/type/v3alpha:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",

@ -8,6 +8,7 @@ import "google/protobuf/duration.proto";
import "udpa/annotations/versioning.proto";
import "envoy/annotations/deprecation.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.extensions.filters.common.fault.v3alpha";

@ -6,6 +6,7 @@ licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
"//envoy/annotations:pkg",
"//envoy/config/core/v3alpha:pkg",
"//envoy/config/filter/http/ext_authz/v2:pkg",
"//envoy/type/matcher/v3alpha:pkg",

@ -10,6 +10,7 @@ import "envoy/type/v3alpha/http_status.proto";
import "udpa/annotations/versioning.proto";
import "envoy/annotations/deprecation.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.extensions.filters.http.ext_authz.v3alpha";

@ -6,6 +6,7 @@ licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
"//envoy/annotations:pkg",
"//envoy/config/core/v3alpha:pkg",
"//envoy/config/filter/network/redis_proxy/v2:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",

@ -9,6 +9,7 @@ import "google/protobuf/wrappers.proto";
import "udpa/annotations/versioning.proto";
import "envoy/annotations/deprecation.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.extensions.filters.network.redis_proxy.v3alpha";

Loading…
Cancel
Save