• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

grpc / grpc-java / #19827
89%
master: 89%

Build:
Build:
LAST BUILD BRANCH: v1.77.x
DEFAULT BRANCH: master
Ran 23 May 2025 11:04AM UTC
Jobs 1
Files 609
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 May 2025 10:54AM UTC coverage: 88.613% (-0.002%) from 88.615%
#19827

push

github

web-flow
xds: Change how xDS filters are created by introducing Filter.Provider (#11883) (#12089)

This is the first step towards supporting filter state retention in
Java. The mechanism will be similar to the one described in [A83]
(https://github.com/grpc/proposal/blob/master/A83-xds-gcp-authn-filter.md#filter-call-credentials-cache)
for C-core, and will serve the same purpose. However, the
implementation details are very different due to the different nature
of xDS HTTP filter support in C-core and Java.

In Java, xDS HTTP filters are backed by classes implementing
`io.grpc.xds.Filter`, from here just called "Filters". To support
Filter state retention (next PR), Java's xDS implementation must be
able to create unique Filter instances per:
- Per HCM
  `envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager`
- Per filter name as specified in
  `envoy.extensions.filters.network.http_connection_manager.v3.HttpFilter.name`

This PR **does not** implements Filter state retention, but lays the
groundwork for it by changing how filters are registered and
instantiated. To achieve this, all existing Filter classes had to be
updated to the new instantiation mechanism described below.

Prior to these this PR, Filters had no livecycle. FilterRegistry
provided singleton instances for a given typeUrl. This PR introduces
a new interface `Filter.Provider`, which instantiates Filter classes.
All functionality that doesn't need an instance of a Filter is moved
to the Filter.Provider. This includes parsing filter config proto
into FilterConfig and determining the filter kind
(client-side, server-side, or both).

This PR is limited to refactoring, and there's no changes to the
existing behavior. Note that all Filter Providers still return
singleton Filter instances. However, with this PR, it is now possible
to create Providers that return a new Filter instance each time
`newInstance` is called.

Co-authored-by: Sergii Tkachenko <sergiitk@google.com>

34286 of 38692 relevant lines covered (88.61%)

0.89 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
88.89
-0.41% ../core/src/main/java/io/grpc/internal/DelayedClientCall.java
1
90.91
0.91% ../xds/src/main/java/io/grpc/xds/RouterFilter.java
2
78.95
-2.11% ../okhttp/src/main/java/io/grpc/okhttp/ExceptionHandlingFrameWriter.java
2
90.0
2.5% ../xds/src/main/java/io/grpc/xds/Filter.java
3
93.26
-1.69% ../core/src/main/java/io/grpc/internal/AbstractClientStream.java
3
0.0
0.0% ../xds/src/main/java/io/grpc/xds/InternalRbacFilter.java
5
84.89
0.22% ../xds/src/main/java/io/grpc/xds/XdsListenerResource.java
17
86.23
-0.43% ../xds/src/main/java/io/grpc/xds/RbacFilter.java
18
71.23
-0.2% ../xds/src/main/java/io/grpc/xds/GcpAuthenticationFilter.java
20
93.73
-0.44% ../xds/src/main/java/io/grpc/xds/XdsServerWrapper.java
21
94.81
-0.17% ../xds/src/main/java/io/grpc/xds/XdsNameResolver.java
22
89.77
-0.33% ../xds/src/main/java/io/grpc/xds/FaultFilter.java
Jobs
ID Job ID Ran Files Coverage
1 #19827.1 23 May 2025 11:04AM UTC 609
88.61
Source Files on build #19827
  • Tree
  • List 609
  • Changed 16
  • Source Changed 0
  • Coverage Changed 16
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #19827
  • 2fd84478 on github
  • Prev Build on v1.71.x
  • Next Build on v1.71.x
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc