-
Notifications
You must be signed in to change notification settings - Fork 5.5k
http filter: Add overrideable function to http filter factory interface for specifying FilterDependencies #15157
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
Changes from 3 commits
51513a7
ec1d1e4
80f3d20
91364e7
0bf6a1a
116922b
dcdb15e
83358a1
fb8b464
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 |
|---|---|---|
|
|
@@ -93,6 +93,7 @@ New Features | |
| * http: added support for `Envoy::ScopeTrackedObject` for HTTP/1 and HTTP/2 dispatching. Crashes while inside the dispatching loop should dump debug information. | ||
| * http: added support for :ref:`preconnecting <envoy_v3_api_msg_config.cluster.v3.Cluster.PreconnectPolicy>`. Preconnecting is off by default, but recommended for clusters serving latency-sensitive traffic, especially if using HTTP/1.1. | ||
| * http: change frame flood and abuse checks to the upstream HTTP/2 codec to ON by default. It can be disabled by setting the `envoy.reloadable_features.upstream_http2_flood_checks` runtime key to false. | ||
| * http filter: add function to `NamedHttpFilterConfigFactory` which can be overridden to return a :ref`FilterDependencies <envoy_api_file_envoy/extensions/filters/common/dependency/v3/dependency.proto>` specification. Config-plane validation of dependencies is currently WIP. | ||
|
Member
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. I think you can skip this for now, since its very internally focused. I'd add a single release note when we have the filter chain deps validation working.
Author
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. Sounds good. |
||
| * json: introduced new JSON parser (https://github.com/nlohmann/json) to replace RapidJSON. The new parser is disabled by default. To test the new RapidJSON parser, enable the runtime feature `envoy.reloadable_features.remove_legacy_json`. | ||
| * original_dst: added support for :ref:`Original Destination <config_listener_filters_original_dst>` on Windows. This enables the use of Envoy as a sidecar proxy on Windows. | ||
| * overload: add support for scaling :ref:`transport connection timeouts<envoy_v3_api_enum_value_config.overload.v3.ScaleTimersOverloadActionConfig.TimerType.TRANSPORT_SOCKET_CONNECT>`. This can be used to reduce the TLS handshake timeout in response to overload. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
| #include <functional> | ||
|
|
||
| #include "envoy/config/typed_config.h" | ||
| #include "envoy/extensions/filters/common/dependency/v3/dependency.pb.h" | ||
| #include "envoy/http/filter.h" | ||
| #include "envoy/init/manager.h" | ||
| #include "envoy/network/filter.h" | ||
|
|
@@ -201,6 +202,15 @@ class NamedHttpFilterConfigFactory : public ProtocolOptionsFactory { | |
| * @return bool true if this filter must be the last filter in a filter chain, false otherwise. | ||
| */ | ||
| virtual bool isTerminalFilter() { return false; } | ||
|
|
||
| /** | ||
| * @return FilterDependencies specification of dependencies required or | ||
|
aunu53 marked this conversation as resolved.
Outdated
|
||
| * provided on the decode and encode paths. | ||
| */ | ||
| virtual envoy::extensions::filters::common::dependency::v3::FilterDependencies dependencies() { | ||
|
Member
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: probably
Author
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. I could try declaring a static helper function to return it? But I imagine this will cause problems for overriders of this function anyway, who will have to construct the proto somehow.
Member
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. Oh, I see what's going on. This is more similar I think to
Author
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. I don't understand what the value of that would be; the dependency specification protos won't typically be very large, so passing it by copy seems ok to me. What do you think? @snowp in case you have any thoughts
Contributor
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. With the protos being small I don't think it matters a whole lot, but a unique_ptr might better future proof this in case this changes? I can imagine some filter potentially providing a lot of different dependencies even if none do so today
Member
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. Right, the protos contain multiple strings and we try not copy them around in general. |
||
| envoy::extensions::filters::common::dependency::v3::FilterDependencies dependency; | ||
| return dependency; | ||
| } | ||
| }; | ||
|
|
||
| } // namespace Configuration | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.