Skip to content

xds: bypass sidecar readiness for non-GRPC responses & fix draining conformance in ext_proc filter - #12914

Merged
kannanjgithub merged 3 commits into
grpc:masterfrom
kannanjgithub:ext-proc-draining-skip-queueing-or-saving-headers-when-send-mode-is-off
Jul 30, 2026
Merged

xds: bypass sidecar readiness for non-GRPC responses & fix draining conformance in ext_proc filter#12914
kannanjgithub merged 3 commits into
grpc:masterfrom
kannanjgithub:ext-proc-draining-skip-queueing-or-saving-headers-when-send-mode-is-off

Conversation

@kannanjgithub

Copy link
Copy Markdown
Contributor
  • Bypass sidecar readiness checks in request(int) when observability mode is false and response body mode is not GRPC.
  • Ensure that when response headers, body, or trailers are skipped/disabled, they bypass request draining and stream directly downstream instead of being blocked.

…onformance

- Bypass sidecar readiness checks in `request(int)` when observability mode is false and response body mode is not `GRPC`.
- Ensure that when response headers, body, or trailers are skipped/disabled, they bypass request draining and stream directly downstream instead of being blocked.
- Fix sidecar mocks in tests to properly call `onCompleted()` when the request stream completes, preventing background stream leaks.
- Set appropriate processing modes in existing tests to match their flow control expectations under the updated logic.
@kannanjgithub
kannanjgithub requested a review from sauravzg July 21, 2026 09:03
…eaders draining

Modifies the `testRequestBodyDrainingBypassedWhenRequestBodyModeNone` unit test
to utilize a bidirectional streaming method (`METHOD_BIDI_STREAMING`) instead of
a unary call. This allows the backend data plane server to send headers and
responses back to the interceptor client listener before the client half-closes
the call, ensuring the `isDraining && sendResponseHeaders` branch inside
`onHeaders` is successfully reached and covered during the `DRAINING` state.

Verifies that response headers and messages are correctly buffered while the
external processor stream is draining, and are successfully delivered to the
application listener once the external processor stream completes.
Allow DataPlaneClientCall.halfClose() to proceed immediately during
ext_proc request draining if it is safe to do so. This is safe if:
- RequestBodyMode is NONE.
- RequestBodyMode is GRPC (or others) but no body messages have been
  sent to ext_proc and no messages are buffered.

If messages have been sent to ext_proc, halfClose remains deferred until
the ext_proc stream completes to ensure all messages are processed.

This prevents hangs when the application calls halfClose during draining
but no further interaction with ext_proc is needed.
@kannanjgithub
kannanjgithub merged commit 7fdcde1 into grpc:master Jul 30, 2026
17 of 18 checks passed
@kannanjgithub
kannanjgithub deleted the ext-proc-draining-skip-queueing-or-saving-headers-when-send-mode-is-off branch July 30, 2026 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants