Skip to content

Conversation

@wbpcode
Copy link
Member

@wbpcode wbpcode commented Jan 4, 2026

Commit Message: filter chain refactoring: add more context for FilterChainFactoryCallbacks
Additional Description:

This PRs contains:

  1. expose request headers, stream info and so on at the FilterChainFactoryCallbacks, the the filter factory could get more context about current stream to create a filter.
  2. allow the filter factory to set the filterConfigName() which is helpful for the case where a single filter factory want to inject multiple different filters to chain.

Risk Level: mid. core code change.
Testing: n/a.
Docs Changes: n/a.
Release Notes: n/a.
Platform Specific Features: n/a.

@wbpcode
Copy link
Member Author

wbpcode commented Jan 4, 2026

I initially thought this could help to address the problem in the #42807. But as @yanavlasov said, it is not general solution. We need more discussion about 42807.

After a thought, I think this is still helpful for filters who want to control the filter creation based on known context anyway (although cannot control the filter creation based on the previous filters' processing). So I still kept this PR.

Signed-off-by: wbpcode/wangbaiping <[email protected]>
@wbpcode wbpcode force-pushed the dev-add-method-to-filter-chain-callback branch from 89bb424 to 9d6d3a5 Compare January 5, 2026 08:12
Signed-off-by: wbpcode/wangbaiping <[email protected]>
@wbpcode
Copy link
Member Author

wbpcode commented Jan 5, 2026

/retest

Signed-off-by: wbpcode/wangbaiping <[email protected]>
@wbpcode
Copy link
Member Author

wbpcode commented Jan 6, 2026

/retest

1 similar comment
@wbpcode
Copy link
Member Author

wbpcode commented Jan 6, 2026

/retest

@yanavlasov yanavlasov merged commit 78df6c1 into envoyproxy:main Jan 6, 2026
25 checks passed
botengyao pushed a commit to botengyao/envoy that referenced this pull request Jan 6, 2026
…backs (envoyproxy#42844)

This PRs contains:
1. expose request headers, stream info and so on at the
`FilterChainFactoryCallbacks`, the the filter factory could get more
context about current stream to create a filter.
2. allow the filter factory to set the filterConfigName() which is
helpful for the case where a single filter factory want to inject
multiple different filters to chain.

Risk Level: mid. core code change.
Testing: n/a.
Docs Changes: n/a.
Release Notes: n/a.
Platform Specific Features: n/a.

---------

Signed-off-by: wbpcode/wangbaiping <[email protected]>
Signed-off-by: Boteng Yao <[email protected]>
@wbpcode wbpcode deleted the dev-add-method-to-filter-chain-callback branch January 6, 2026 23:23
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.

3 participants