Repository navigation
Conversation
…trailers (connectrpc#346) A gRPC/gRPC-Web stream that ends part-way through an envelope and then carries grpc-status 0 now ends with internal instead of a clean end. A Trailers-Only clean end records the response headers (minus content-type) as its trailers, as connect-go does. The conformance harness's bidi handler reports the terminal error's metadata when the stream failed during response-head handling. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Oleg Tsarev <[email protected]>
This branch has not been deployed
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.
Fixes #346.
What
Two fixes to the gRPC / gRPC-Web stream end, plus one conformance-harness change.
Together they make the client pass all 4618 cases of
connectconformancev1.0.7(it failed 12).
internal.classify_grpc_endnow turns a would-beclean end into
internal("stream ended with an incomplete message") when theEnvelopeAssemblerstill holds a partial envelope (has_partial()), i.e. the bodystopped inside a 5-byte prefix or a payload and then
grpc-status: 0arrived.Failed ends keep their own classification (server error in the trailers, deadline,
missing status).
body,
grpc-statusin the response headers, no trailers of its own),ServerStream::trailers()now returns the response headers minuscontent-type,as connect-go does, instead of
None.headers()is unchanged.(e.g. a Trailers-Only error, which leaves
BidiRecvHalfinFailed), report theheaders/trailers carried by the returned
ConnectError, as the server-stream pathalready does via
connect_error_to_result.Why
conformance v1.0.7 added
server-stream/incomplete-message{,-prefix}(connectrpc/conformance#1159) andchanged the grpc-go reference server to defer half-duplex bidi headers (connectrpc/conformance#1177), so
gRPC-Web bidi streams with no responses now come back as Trailers-Only responses.
Tests
client::tests: Trailers-Only trailers, truncated payload andprefix before OK trailers, a trailer error keeping precedence, a past deadline
keeping
deadline_exceeded, gRPC-Web truncation.connectconformancev1.0.7, default config: client 4618/4618, server 3620/3620.v1.0.5: client 4574/4574, server 3600/3600.
Bumping the pinned runner to v1.0.7 in
download-conformance.sh/Taskfile.yamlcould follow separately.
This change was written with Claude Code.
🤖 Generated with Claude Code