Skip to content

fix(spawn-docker-jdk): treat cancelled JSON stream reads as expected termination - #60

Merged
deer merged 1 commit into
mainfrom
quiet_tests
Aug 7, 2026
Merged

fix(spawn-docker-jdk): treat cancelled JSON stream reads as expected termination#60
deer merged 1 commit into
mainfrom
quiet_tests

Conversation

@deer

@deer deer commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

JsonNodeInputStreamProcessor.process reads NDJSON lines from a Docker response body and previously treated every exception thrown while reading as a genuine failure, logging a telemetry warning and calling subscriber.onError. When a caller cancels a long-running stream (e.g. system events) via Response#cancel(), the underlying channel is closed while a read is blocked, which surfaces as a ClosedChannelException or its AsynchronousCloseException subtype.

This is now caught separately from the generic Throwable handler and treated as an expected termination rather than a failure: no telemetry warning is recorded and subscriber.onError is not invoked, since the stream simply ends via the normal finally block instead.

This was verified by temporarily commenting out the new catch block and re-running SessionTests, which reproduced the spurious Failed while processing the JSON input stream warnings with AsynchronousCloseException/ClosedChannelException causes on every cancellation, confirming the new catch clause targets the exception actually thrown by UnixSocketHttpTransport's SocketChannel-backed body stream.

@deer
deer merged commit 89ec650 into main Aug 7, 2026
1 check passed
@deer
deer deleted the quiet_tests branch August 7, 2026 02:38
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.

1 participant