refactor(gax-internal): extract helpers and abort on receiver drop - #6473
Conversation
…er drop Move gRPC streaming request and response transformations into a dedicated internal streaming module with unit test coverage. Abort the in-flight bidi stream connection attempt immediately when the ResponseReceiver is dropped before the stream is established. Remove DEFAULT_REQUEST_CHANNEL_CAPACITY from public options::internal.
There was a problem hiding this comment.
Code Review
This pull request refactors gRPC streaming helpers by moving them into a dedicated internal streaming module in src/gax-internal/src/grpc/streaming.rs and adding comprehensive unit tests. The feedback suggests improving code style in the test mocks by removing unnecessary else blocks to keep the logic flow linear, and provides guidance on how to implement tracing span propagation for the spawned task in spawn_bidi_stream.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6473 +/- ##
==========================================
+ Coverage 96.36% 96.37% +0.01%
==========================================
Files 295 296 +1
Lines 83762 84073 +311
==========================================
+ Hits 80716 81025 +309
- Misses 3046 3048 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Move gRPC streaming request and response transformations into a dedicated internal streaming module with unit test coverage.
Abort the in-flight bidi stream connection attempt immediately when the ResponseReceiver is dropped before the stream is established.
Remove DEFAULT_REQUEST_CHANNEL_CAPACITY from public options::internal.