Skip to content

set filter state: add listener filter#43801

Merged
kyessenov merged 9 commits intoenvoyproxy:mainfrom
kyessenov:set_filter_state_filter
Mar 10, 2026
Merged

set filter state: add listener filter#43801
kyessenov merged 9 commits intoenvoyproxy:mainfrom
kyessenov:set_filter_state_filter

Conversation

@kyessenov
Copy link
Contributor

Commit Message: Add listener filter for set_filter_state. This is useful when there are many filter chains with network set_filter_state, as they all can be collapsed into one instance. Additionally, pull forward listener info metadata setter to make it accessible. This is safe since filter state carries over from listener filters to network filters, and in the special case of re-balancing/original_dst listener, stream info is re-created for the new listener.
Additional Description: Mostly AI generated.
Risk Level: low
Testing: added
Docs Changes: yes
Release Notes: yes

Signed-off-by: Kuat Yessenov <kuat@google.com>
Signed-off-by: Kuat Yessenov <kuat@google.com>
@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @mattklein123
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #43801 was opened by kyessenov.

see: more, trace.

Signed-off-by: Kuat Yessenov <kuat@google.com>
@kyessenov kyessenov assigned wbpcode and unassigned mattklein123 Mar 5, 2026
@kyessenov
Copy link
Contributor Author

@wbpcode are you OK co-owning it, just like the other versions of this filter?

Signed-off-by: Kuat Yessenov <kuat@google.com>
Signed-off-by: Kuat Yessenov <kuat@google.com>
Change-Id: Ie6588dabb5a4e506058a92a09db6f6a1c6ec74cf
Signed-off-by: Kuat Yessenov <kuat@google.com>
@agrawroh
Copy link
Member

agrawroh commented Mar 9, 2026

@wbpcode are you OK co-owning it, just like the other versions of this filter?

I'm happy to co-own as well. It's super useful for us!

Change-Id: Iefd479a98da699d1499f4d174ddb6607b8a585df
Signed-off-by: Kuat Yessenov <kuat@google.com>
@kyessenov
Copy link
Contributor Author

Thanks @agrawroh, added you as well!

message Config {
// A sequence of the filter state values to apply in the specified order
// when a new connection is received.
repeated common.set_filter_state.v3.FilterStateValue on_new_connection = 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: may be on_accept ? to clearly show it's used for listener filter? But not a strong point.

Copy link
Member

@wbpcode wbpcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall with only one nit comment

/lgtm-any

@wbpcode
Copy link
Member

wbpcode commented Mar 10, 2026

@wbpcode are you OK co-owning it, just like the other versions of this filter?

Yeah. It's fine to me. :)

agrawroh
agrawroh previously approved these changes Mar 10, 2026
Copy link
Member

@agrawroh agrawroh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as well. As @wbpcode said, on_accept might be better but again no strong opinions on that.

Change-Id: I62c1b9275cab863d01027e0c395b456b52462bd3
Signed-off-by: Kuat Yessenov <kuat@google.com>
…lter

Change-Id: I4d4b847cc3f3f5c6ee5eab07c1b04248ac72f5dc
Copy link
Member

@wbpcode wbpcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for this great contribution.

@kyessenov kyessenov merged commit 68d760a into envoyproxy:main Mar 10, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants