grpc-go icon indicating copy to clipboard operation
grpc-go copied to clipboard

stream: initialize decompressor for health check streams

Open sanki92 opened this issue 1 week ago • 2 comments

stream: initialize decompressor for health check streams

Fixes #8162

Health checks fail when using legacy compression options (WithDecompressor on client or RPCDecompressor on server). The health check stream created via newNonRetryClientStream does not initialize the decompressorV0 field with the legacy decompressor from dial options, causing an Internal error when attempting to decompress server responses.

This fix initializes the decompressorV0 field in addrConnStream with ac.cc.dopts.dc, matching the behavior of the regular clientStream path (line 492) to ensure health check streams can properly decompress responses when legacy compression options are configured.

RELEASE NOTES:

  • health: Fixed health checks failing when using legacy compression options WithDecompressor or RPCDecompressor.

sanki92 avatar Dec 11 '25 15:12 sanki92

CLA Signed
The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: sanki92 / name: Sankalp Tripathi (08437ede908fdecc5c4ba5d9d190c9de4d0134f0)

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 83.33%. Comparing base (ae4bd1e) to head (08437ed).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8765      +/-   ##
==========================================
- Coverage   83.51%   83.33%   -0.19%     
==========================================
  Files         418      418              
  Lines       32485    32486       +1     
==========================================
- Hits        27130    27072      -58     
- Misses       3992     4027      +35     
- Partials     1363     1387      +24     
Files with missing lines Coverage Δ
stream.go 81.59% <100.00%> (-0.21%) :arrow_down:

... and 26 files with indirect coverage changes

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

codecov[bot] avatar Dec 11 '25 15:12 codecov[bot]