-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Envoy rate limit descriptor fix #11153
Changes from 13 commits
787c962
e0ef3e8
5fdb921
5fcdbc8
2eb2da7
a8b1a12
be0f75c
c6173f6
415de69
9db6ec9
8b1e906
5e2eb3a
d9495ef
5abb2ff
102860f
2a8b8fd
9cfaeaa
281b9e4
a60210c
df712d2
2360171
e80328b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,7 @@ Changes | |
tracing is not forced. | ||
* router: allow retries of streaming or incomplete requests. This removes stat `rq_retry_skipped_request_not_complete`. | ||
* router: allow retries by default when upstream responds with :ref:`x-envoy-overloaded <config_http_filters_router_x-envoy-overloaded_set>`. | ||
* router: allow Rate Limiting service to be called in case of missing request header for a descriptor if the :ref:`skip_if_absent <envoy_v3_api_field_config.route.v3.RateLimit.Action.RequestHeaders.skip_if_absent>` field is set to true. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: Rate Limiting SErvice |
||
* runtime: add new gauge :ref:`deprecated_feature_seen_since_process_start <runtime_stats>` that gets reset across hot restarts. | ||
* stats: added the option to :ref:`report counters as deltas <envoy_v3_api_field_config.metrics.v3.MetricsServiceConfig.report_counters_as_deltas>` to the metrics service stats sink. | ||
* tracing: tracing configuration has been made fully dynamic and every HTTP connection manager | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,10 +38,11 @@ bool RequestHeadersAction::populateDescriptor(const Router::RouteEntry&, | |
const Http::HeaderMap& headers, | ||
const Network::Address::Instance&) const { | ||
const Http::HeaderEntry* header_value = headers.get(header_name_); | ||
|
||
// If header is not present and skip_if_absent_ is not set to true, short circuit here and return. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: this comment is not quite accurate, as you return no matter what. Can you clarify? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hello @mattklein123 - Yes, you are right, I agree it can be misleading. Let me rephrase it. What I was going for was "do not add the descriptor". Thanks for pointing it out! |
||
if (!header_value) { | ||
return false; | ||
return skip_if_absent_; | ||
} | ||
|
||
descriptor.entries_.push_back( | ||
{descriptor_key_, std::string(header_value->value().getStringView())}); | ||
return true; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i.e. it's redundant to say that the default of a primitive proto3 type is false, but your description of the actual behavior is very helpful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, @htuch! Pushed the changes as you suggested! Thanks!