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

grpc / grpc-java / #20524
89%

Build:
DEFAULT BRANCH: master
Ran 13 Oct 2026 02:24PM UTC
Jobs 1
Files 696
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

13 Oct 2026 02:07PM UTC coverage: 89.422% (+0.05%) from 89.377%
#20524

push

github

web-flow
xDS: Support retries in RawMessageClientInterceptor and conditionally add it to the filter chain (#13042)

### 1. Supporting retries
Previously, `RawMessageClientInterceptor.sendMessage()` forwarded a
single-use
InputStream directly to `rawCall.sendMessage()`. When retries were
triggered by
RetriableStream, attempt 1 drained the InputStream to EOF. Subsequent
retry
attempts would then serialize the already-drained stream, sending an
empty (0-byte)
request payload.

Fix this by:
1. Buffering the request stream into an immutable `ByteString` (using
`Drainable`
when supported) in `RawMessageClientInterceptor.sendMessage()` and
wrapping it
   in a `KnownLengthInputStream`.
2. Exposing `getByteString()` on `KnownLengthInputStream`.
3. Having `RAW_MARSHALLER.stream()` return a fresh
`KnownLengthInputStream` wrapping
the underlying `ByteString` on each attempt, allowing retries to read
the payload
   from byte 0.

### 2. Conditional addition of `RawMessageClientInterceptor` 

Also we need to only install `RawMessageClientInterceptor` when a filter
requires payload access to avoid the performance hit for non ext_proc
cases. As suggested in the [grfc
discussion](https://github.com/grpc/proposal/pull/484#discussion_r3960018060),
introduce `Filter.requiresPayloadAccess(config, overrideConfig)` to
allow filters to declare whether they need access to message payloads.
Update `ExternalProcessorFilter` to implement this method, returning
false when body send mode is NONE for both request and response. Update
`XdsNameResolver` to only install `RawMessageClientInterceptor` when at
least one configured filter requires payload access. Generalize
`ExternalProcessorClientInterceptor` to support generic request/response
types when payload interception is not needed.

#### Generalizing `ExternalProcessorClientInterceptor` to Support
Pass-through Types

`ExternalProcessorClientInterceptor` previously hardcoded
`ClientCall<InputStream, InputStream>` and
`SimpleForwardingClien... (continued)

39299 of 43948 relevant lines covered (89.42%)

0.89 hits per line

Coverage Regressions

Lines Coverage ∆ File
52
91.76
-0.11% ../xds/src/main/java/io/grpc/xds/XdsNameResolver.java
22
97.53
1.44% ../xds/src/main/java/io/grpc/xds/ExternalProcessorClientInterceptor.java
11
91.24
0.13% ../xds/src/main/java/io/grpc/xds/internal/extproc/ExternalProcessorUtil.java
5
83.02
-9.43% ../core/src/main/java/io/grpc/internal/Http2Ping.java
3
73.27
-2.97% ../servlet/src/main/java/io/grpc/servlet/AsyncServletOutputStreamWriter.java
2
93.1
0.51% ../xds/src/main/java/io/grpc/xds/Filter.java
2
80.0
5.0% ../xds/src/main/java/io/grpc/xds/internal/extproc/KnownLengthInputStream.java
1
98.03
0.8% ../xds/src/main/java/io/grpc/xds/ExternalProcessorFilter.java
Jobs
ID Job ID Ran Files Coverage
1 #20524.1 13 Oct 2026 02:25PM UTC 696
89.42
Source Files on build #20524
  • Tree
  • List 696
  • Changed 12
  • Source Changed 0
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #20524
  • 29d07ccd on github
  • Prev Build on master
  • Next Build on master
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc