diff --git a/docs/root/version_history/current.rst b/docs/root/version_history/current.rst index a58a8d074ec96..d5923ca8292ab 100644 --- a/docs/root/version_history/current.rst +++ b/docs/root/version_history/current.rst @@ -107,4 +107,3 @@ Deprecated * http: deprecated ``envoy.http.headermap.lazy_map_min_size``. If you are using this config knob you can revert this temporarily by setting ``envoy.reloadable_features.deprecate_global_ints`` to true but you MUST file an upstream issue to ensure this feature remains available. * http: removing support for long-deprecated old style filter names, e.g. envoy.router, envoy.lua. * re2: removed undocumented histograms ``re2.program_size`` and ``re2.exceeded_warn_level``. -* re2: deprecated ``re2.max_program_size.error_level`` and ``re2.max_program_size.warn_level``. If you are using these config knobs you can revert this temporarily by setting ``envoy.reloadable_features.deprecate_global_ints`` to true but you MUST file an upstream issue to ensure this feature remains available. diff --git a/source/common/runtime/runtime_features.cc b/source/common/runtime/runtime_features.cc index 221d9f840effd..571e5c48628dd 100644 --- a/source/common/runtime/runtime_features.cc +++ b/source/common/runtime/runtime_features.cc @@ -95,7 +95,7 @@ bool runtimeFeatureEnabled(absl::string_view feature) { uint64_t getInteger(absl::string_view feature, uint64_t default_value) { if (absl::StartsWith(feature, "envoy.")) { - // DO NOT ADD MORE FLAGS HERE. This function deprecated and being removed. + // DO NOT ADD MORE FLAGS HERE. This function deprecated. if (feature == "envoy.http.headermap.lazy_map_min_size") { return absl::GetFlag(FLAGS_envoy_headermap_lazy_map_min_size); } @@ -186,30 +186,25 @@ void maybeSetRuntimeGuard(absl::string_view name, bool value) { absl::SetFlag(flag, value); } -// TODO(alyssawilk) deprecate use of this void maybeSetDeprecatedInts(absl::string_view name, uint32_t value) { if (!absl::StartsWith(name, "envoy.") && !absl::StartsWith(name, "re2.")) { return; } - bool set = false; // DO NOT ADD MORE FLAGS HERE. This function deprecated and being removed. if (name == "envoy.http.headermap.lazy_map_min_size") { - set = true; + if (Runtime::runtimeFeatureEnabled("envoy.reloadable_features.deprecate_global_ints")) { + IS_ENVOY_BUG(absl::StrCat( + "The Envoy community is attempting to remove global integers. Given you use ", name, + " please immediately file an upstream issue to retain the functionality as it will " + "otherwise be removed following the usual deprecation cycle.")); + } absl::SetFlag(&FLAGS_envoy_headermap_lazy_map_min_size, value); } else if (name == "re2.max_program_size.error_level") { - set = true; absl::SetFlag(&FLAGS_re2_max_program_size_error_level, value); } else if (name == "re2.max_program_size.warn_level") { - set = true; absl::SetFlag(&FLAGS_re2_max_program_size_warn_level, value); } - if (set && Runtime::runtimeFeatureEnabled("envoy.reloadable_features.deprecate_global_ints")) { - IS_ENVOY_BUG(absl::StrCat( - "The Envoy community is attempting to remove global integers. Given you use ", name, - " please immediately file an upstream issue to retain the functionality as it will " - "otherwise be removed following the usual deprecation cycle.")); - } } std::string swapPrefix(std::string name) {