Skip to content

Commit

Permalink
http: add filter names to route-specific filter config warning (envoy…
Browse files Browse the repository at this point in the history
…proxy#31068)

* http: add filter names to route-specific filter config warning

---------

Signed-off-by: Paul Ogilby <[email protected]>
  • Loading branch information
paul-r-gall authored Nov 28, 2023
1 parent ddcaf1c commit 24ee071
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions source/common/http/filter_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,13 @@ ActiveStreamFilterBase::mostSpecificPerFilterConfig() const {
result = current_route->mostSpecificPerFilterConfig(filter_context_.filter_name);

if (result != nullptr) {
ENVOY_LOG_FIRST_N(warn, 10,
"No per filter config is found by filter config name and fallback to use "
"filter canonical name. This is deprecated and will be forbidden very "
"soon. Please use the filter config name to index per filter config. See "
"https://github.com/envoyproxy/envoy/issues/29461 for more detail.");
ENVOY_LOG_FIRST_N(
warn, 10,
"No per filter config is found by filter config name \"{}\" and fallback to use "
"filter canonical name \"{}\". This is deprecated and will be forbidden very "
"soon. Please use the filter config name to index per filter config. See "
"https://github.com/envoyproxy/envoy/issues/29461 for more detail.",
filter_context_.config_name, filter_context_.filter_name);
}
}
return result;
Expand All @@ -328,12 +330,14 @@ void ActiveStreamFilterBase::traversePerFilterConfig(
}

current_route->traversePerFilterConfig(
filter_context_.filter_name, [&cb](const Router::RouteSpecificFilterConfig& config) {
ENVOY_LOG_FIRST_N(warn, 10,
"No per filter config is found by filter config name and fallback to use "
"filter canonical name. This is deprecated and will be forbidden very "
"soon. Please use the filter config name to index per filter config. See "
"https://github.com/envoyproxy/envoy/issues/29461 for more detail.");
filter_context_.filter_name, [&cb, this](const Router::RouteSpecificFilterConfig& config) {
ENVOY_LOG_FIRST_N(
warn, 10,
"No per filter config is found by filter config name \"{}\" and fallback to use "
"filter canonical name \"{}\". This is deprecated and will be forbidden very "
"soon. Please use the filter config name to index per filter config. See "
"https://github.com/envoyproxy/envoy/issues/29461 for more detail.",
filter_context_.config_name, filter_context_.filter_name);
cb(config);
});
}
Expand Down

0 comments on commit 24ee071

Please sign in to comment.