Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Klein <mklein@lyft.com>
  • Loading branch information
mattklein123 committed Jun 5, 2019
1 parent b2222be commit 0ee5e15
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions docs/root/intro/deprecated.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Version 1.11.0 (Pending)
* Specifying "deprecated_v1: true" in HTTP and network filter configuration to allow loading JSON
configuration is now deprecated and will be removed in a following release. Update any custom
filters to use protobuf configuration. A struct can be used for a mostly 1:1 conversion if needed.
The `envoy.deprecated_features.v1_filter_json_config` runtime key can be used to temporarily
enable this feature once the deprecation becomes fail by default.

Version 1.10.0 (Apr 5, 2019)
============================
Expand Down
4 changes: 3 additions & 1 deletion source/common/config/utility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,9 @@ bool Utility::allowDeprecatedV1Config(Runtime::Loader& runtime, const Json::Obje
constexpr char error[] =
"Using deprecated v1 JSON config load via 'deprecated_v1: true'. This configuration will "
"be removed from Envoy soon. Please see "
"https://www.envoyproxy.io/docs/envoy/latest/intro/deprecated for details.";
"https://www.envoyproxy.io/docs/envoy/latest/intro/deprecated for details. The "
"`envoy.deprecated_features.v1_filter_json_config` runtime key can be used to temporarily "
"enable this feature once the deprecation becomes fail by default.";

if (!runtime.snapshot().deprecatedFeatureEnabled(
"envoy.deprecated_features.v1_filter_json_config")) {
Expand Down
8 changes: 6 additions & 2 deletions test/common/config/utility_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ TEST(UtilityTest, AllowDeprecatedV1Config) {
Utility::allowDeprecatedV1Config(runtime, *v1_config), EnvoyException,
"Using deprecated v1 JSON config load via 'deprecated_v1: true'. This configuration will be "
"removed from Envoy soon. Please see "
"https://www.envoyproxy.io/docs/envoy/latest/intro/deprecated for details.");
"https://www.envoyproxy.io/docs/envoy/latest/intro/deprecated for details. The "
"`envoy.deprecated_features.v1_filter_json_config` runtime key can be used to temporarily "
"enable this feature once the deprecation becomes fail by default.");

// v1 config, runtime allowed.
EXPECT_CALL(runtime.snapshot_,
Expand All @@ -197,7 +199,9 @@ TEST(UtilityTest, AllowDeprecatedV1Config) {
"warning",
"Using deprecated v1 JSON config load via 'deprecated_v1: true'. This configuration will be "
"removed from Envoy soon. Please see "
"https://www.envoyproxy.io/docs/envoy/latest/intro/deprecated for details.",
"https://www.envoyproxy.io/docs/envoy/latest/intro/deprecated for details. The "
"`envoy.deprecated_features.v1_filter_json_config` runtime key can be used to temporarily "
"enable this feature once the deprecation becomes fail by default.",
Utility::allowDeprecatedV1Config(runtime, *v1_config));
}

Expand Down

0 comments on commit 0ee5e15

Please sign in to comment.