Skip to content

Conversation

@easwars
Copy link
Contributor

@easwars easwars commented Feb 3, 2026

While working on xDS HTTP filter state retention changes required for A83 and A86 in #8745, I realized that the current implementation of HTTP filters on the server-side does not lend itself well to the changes we want to make to support filter state retention. The crux of the problem in the current implementation is as follows:

  • The xdsresource package builds a FilterChainManager type that does the following:
    • Keeps track of the list of Route Configuration resources to be requested based on the HTTP filters configured on the Listener resource
    • Updates the interceptors on the different filter chains based on Route Configuration resource updates (that contain filter config overrides)
    • Maintaining runtime state in a type that is supposed to represent a configuration blob seems to have been a wrong implementation choice
  • Everytime a Listener resource update is received, the xdsresource package builds a brand new FilterChainManager
    • This means that we cannot retain filter state across resource updates

This PR makes the following changes:

  • Changes the layout of the ListenerUpdate struct to clearly separate client-side and server-side fields
    • Also groups information that is shared across client and server listener types into a logical struct
    • The ListenerUpdate will only contain information directly sources from the listener proto
  • The xDS server implementation will build the runtime representation of the filter chains using the configuration update provided by the xdsresource package
    • This would move the responsibility of updating the interceptors on the filter chain to the xDS server, which is the correct place to be doing such a thing
    • This would make it possible for the xDS server implementation to retain filter state across listener resource updates

RELEASE NOTES: none

@easwars easwars added Type: Internal Cleanup Refactors, etc Area: xDS Includes everything xDS related, including LB policies used with xDS. labels Feb 3, 2026
@easwars easwars added this to the 1.80 Release milestone Feb 3, 2026
@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

❌ Patch coverage is 92.59259% with 36 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.31%. Comparing base (b7b1cce) to head (f313996).

Files with missing lines Patch % Lines
internal/xds/server/filter_chain_manager.go 90.78% 7 Missing and 7 partials ⚠️
internal/xds/server/routing.go 85.18% 7 Missing and 5 partials ⚠️
...nternal/xds/xdsclient/xdsresource/unmarshal_lds.go 97.89% 3 Missing and 1 partial ⚠️
...ds/xdsclient/xdsresource/listener_resource_type.go 85.71% 1 Missing and 1 partial ⚠️
internal/xds/xdsdepmgr/xds_dependency_manager.go 66.66% 1 Missing and 1 partial ⚠️
internal/xds/resolver/xds_resolver.go 66.66% 1 Missing ⚠️
internal/xds/server/listener_wrapper.go 96.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8878      +/-   ##
==========================================
+ Coverage   83.20%   83.31%   +0.10%     
==========================================
  Files         414      416       +2     
  Lines       32751    32812      +61     
==========================================
+ Hits        27250    27336      +86     
+ Misses       4084     4069      -15     
+ Partials     1417     1407      -10     
Files with missing lines Coverage Δ
internal/xds/server/conn_wrapper.go 76.27% <100.00%> (-0.78%) ⬇️
internal/xds/xdsclient/xdsresource/filter_chain.go 92.15% <100.00%> (-1.77%) ⬇️
internal/xds/xdsclient/xdsresource/matcher.go 60.68% <ø> (-3.50%) ⬇️
xds/server.go 82.55% <100.00%> (+1.10%) ⬆️
internal/xds/resolver/xds_resolver.go 88.76% <66.66%> (ø)
internal/xds/server/listener_wrapper.go 79.41% <96.66%> (+0.12%) ⬆️
...ds/xdsclient/xdsresource/listener_resource_type.go 93.65% <85.71%> (-2.51%) ⬇️
internal/xds/xdsdepmgr/xds_dependency_manager.go 80.69% <66.66%> (+0.55%) ⬆️
...nternal/xds/xdsclient/xdsresource/unmarshal_lds.go 93.49% <97.89%> (+5.02%) ⬆️
internal/xds/server/routing.go 85.18% <85.18%> (ø)
... and 1 more

... and 26 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@easwars easwars modified the milestone: 1.80 Release Feb 3, 2026
@easwars easwars requested a review from arjan-bal February 3, 2026 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: xDS Includes everything xDS related, including LB policies used with xDS. Type: Internal Cleanup Refactors, etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants