Support server-streaming in transcoding - #284
Open
zZHorizonZz wants to merge 4 commits into
Open
Conversation
Member
Author
|
This PR depends on #281 |
zZHorizonZz
force-pushed
the
transcoding-streaming
branch
2 times, most recently
from
August 16, 2026 10:28
53c01e2 to
911fe6b
Compare
zZHorizonZz
marked this pull request as ready for review
August 16, 2026 11:24
zZHorizonZz
force-pushed
the
transcoding-streaming
branch
3 times, most recently
from
August 25, 2026 11:24
ef061fd to
857e4de
Compare
… formatting. Motivation: - Extend JSON transcoding support for server-streaming RPCs to enhance compatibility with streaming APIs. - Improve response flexibility with support for JSON Array, NDJSON, and SSE formats based on the `Accept` header. Changes: - Added `streaming` and `StreamFormat` fields to `TranscodingGrpcOutboundStream` for response format negotiation. - Implemented JSON Array, NDJSON, and SSE response formatting for server-streaming. - Derived the streaming cardinality from `ServiceMethod#serverStreaming()`. - Updated `MessageWeaver` to handle `JsonObject` outputs for request/response weaving. - Modified tests to validate new streaming response formats and HTTP transcoding logic. Signed-off-by: Daniel Fiala <danfiala23@gmail.com>
Motivation: - The server-streaming transcoding formats were only covered by unit tests using hand-built service methods, leaving the protoc plugin path untested end to end. Changes: - Exercise the generated `StreamingTranscodingGreeter` service method over HTTP for the JSON array, NDJSON and SSE formats. - Cover the empty stream and the coexistence of the transcoded and gRPC routes for the same method. Signed-off-by: Daniel Fiala <danfiala23@gmail.com>
Motivation: - `GrpcServer#addService` only registered the canonical `/package.Service/Method` path, so the HTTP rules of a transcoded service method were ignored and the transcoded routes returned a 500. `GrpcServer#callHandler` already mounts these paths. Changes: - Mount the `MountPoint` paths of a service method in `addService`, like `callHandler` does. - Add integration tests binding a transcoded unary and server-streaming service with `addService`. Signed-off-by: Daniel Fiala <danfiala23@gmail.com>
… message. Motivation: Transcoding defers the HTTP head until the response body is known, so writeHead returns a promise resolved by writeUnaryMessage. A unary call that ends without ever writing a message never resolves it and leaves the caller waiting. Changes: Resolve the head promise from writeEnd when it is still pending. Fix the indentation of the SSE branch.
zZHorizonZz
force-pushed
the
transcoding-streaming
branch
from
August 25, 2026 16:18
857e4de to
4a8f270
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation:
Acceptheader.Changes:
streamingandStreamFormatfields toTranscodingGrpcOutboundStreamfor response format negotiation.MessageWeaverto handleJsonObjectoutputs for request/response weaving.grpc-service.mustache) and tests to support method-levelisManyOutputconfigurations.