Upstream Merge - #192
Merged
Merged
Conversation
`StreamHandler.handleEvent` called `ResponseConverter.clientEventToEvent` with no guard, so a conversion failure escaped into the transport's read loop and whether the caller saw anything at all depended on what that loop did with it. On the default JSON-RPC/SSE transport it does terminate today, but only by accident of an implementation detail: the throw escapes the body subscriber in `JdkA2AHttpClient` and the JDK's own line-subscriber adapter catches it, cancels the subscription and re-signals it as `onError`. Nothing in the A2A client guarantees that - `Client` catches only `A2AClientError` and the SSE listener only `JsonProcessingException` - and a gRPC `StreamObserver` or a custom `A2AHttpClient` need not behave the same way. The error also arrives mislabelled as `Failed to communicate with the remote agent` when the connection was fine and the payload was not. Fail the flow in the handler with a message that names the real cause, then rethrow so the transport still tears the connection down as it does today. The rethrow is skipped in exactly one case: synchronous dispatch, where `Client.sendMessage` invokes the consumer inline and `Flowable.create` has already failed the flow, so throwing into it would only add an undeliverable through `RxJavaPlugins`. That case is identified by both being inside the `sendMessage` call and running on the subscribe thread. Each condition alone misses a different transport, and both misses silently leak the connection: thread identity alone misses a transport that delivers on the subscribe thread after `sendMessage` returns, and the `sendMessage` window alone misses a transport thread that delivers while the call is still on the stack. `handleError` is idempotent, so a transport that re-signals cannot double-report to the subscriber. Behaviour change for non-streaming callers: a conversion failure previously reached the subscriber as the raw `IllegalArgumentException`, because `Flowable.create` passed the throw straight through. It is now wrapped in `A2AClientError` with the original as the cause, which is what makes the two paths consistent. PiperOrigin-RevId: 962031390
Introduce an adk.build.directory property (default ${project.basedir}/target)
used as the build output directory, so the location can be relocated with
-Dadk.build.directory=... without changing the default.
PiperOrigin-RevId: 962178122
… history PiperOrigin-RevId: 962714340
PiperOrigin-RevId: 963992173
… and interrupted task states PiperOrigin-RevId: 964059169
PiperOrigin-RevId: 965862323
… IDs on AUTH_REQUIRED state PiperOrigin-RevId: 965910141
PiperOrigin-RevId: 966619735
PiperOrigin-RevId: 967164996
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.
Please ensure you have read the contribution guide before creating a pull request.
Link to Issue or Description of Change
1. Link to an existing issue (if applicable):
2. Or, if no issue exists, describe the change:
If applicable, please follow the issue templates to provide as much detail as
possible.
Problem:
A clear and concise description of what the problem is.
Solution:
A clear and concise description of what you want to happen and why you choose
this solution.
Testing Plan
Please describe the tests that you ran to verify your changes. This is required
for all PRs that are not small documentation or typo fixes.
Unit Tests:
Please include a summary of passed java test results.
Manual End-to-End (E2E) Tests:
Please provide instructions on how to manually test your changes, including any
necessary setup or configuration. Please provide logs or screenshots to help
reviewers better understand the fix.
Checklist
Additional context
Add any other context or screenshots about the feature request here.