-
Notifications
You must be signed in to change notification settings - Fork 110
feat!: Upgrading to latest a2a.proto #539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ehsavoie
commented
Dec 15, 2025
- Generating new grpc specifications
- Updating code impacted by those changes
- Removing some unused metadata
Summary of ChangesHello @ehsavoie, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces significant updates to the core Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request upgrades the a2a.proto specification, introducing multi-tenancy support and removing some unused metadata fields. The changes are extensive, affecting generated gRPC code, transport layers, and tests. The review has identified a few issues, including some critical problems with invalid JSON in test data that will likely cause test failures. There is also a potential bug in a MapStruct mapper where a new tenant field is not being correctly mapped. Additionally, some commented-out code and a TODO comment were found, which should be addressed to maintain code quality.
client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JsonMessages.java
Outdated
Show resolved
Hide resolved
| {"url": "https://georoute-agent.example.com/a2a/v1", "protocolBinding": "JSONRPC", tenant=""}, | ||
| {"url": "https://georoute-agent.example.com/a2a/grpc", "protocolBinding": "GRPC", tenant=""}, | ||
| {"url": "https://georoute-agent.example.com/a2a/json", "protocolBinding": "HTTP+JSON", tenant=""} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JSON in this string is invalid. The syntax tenant="" is not valid JSON. It should be "tenant": "". This will cause JSON parsing to fail and break the tests that rely on this data.
| {"url": "https://georoute-agent.example.com/a2a/v1", "protocolBinding": "JSONRPC", tenant=""}, | |
| {"url": "https://georoute-agent.example.com/a2a/grpc", "protocolBinding": "GRPC", tenant=""}, | |
| {"url": "https://georoute-agent.example.com/a2a/json", "protocolBinding": "HTTP+JSON", tenant=""} | |
| {"url": "https://georoute-agent.example.com/a2a/v1", "protocolBinding": "JSONRPC", "tenant": ""}, | |
| {"url": "https://georoute-agent.example.com/a2a/grpc", "protocolBinding": "GRPC", "tenant": ""}, | |
| {"url": "https://georoute-agent.example.com/a2a/json", "protocolBinding": "HTTP+JSON", "tenant": ""} |
spec-grpc/src/main/java/io/a2a/grpc/mapper/SetTaskPushNotificationConfigMapper.java
Outdated
Show resolved
Hide resolved
| // if (request.tenant() != null && !request.tenant().isBlank()) { | ||
| // urlBuilder.append('/').append(request.tenant()); | ||
| // } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reference/rest/src/main/java/io/a2a/server/rest/quarkus/A2AServerRoutes.java
Show resolved
Hide resolved
* Generating new grpc specifications * Updating code impacted by those changes * Removing some unused metadata Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
b5267ab to
6bff7ba
Compare
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request upgrades the a2a.proto specification and applies the resulting changes across the codebase. The main changes include introducing a tenant parameter to many requests, renaming supportsAuthenticatedExtendedCard to supportsExtendedAgentCard, and removing some unused metadata fields from request parameter objects.
My review focuses on ensuring the implementation correctly reflects the new protobuf definitions. I've found a few areas for improvement:
- A redundant
elseblock that can be simplified. - An implementation detail where
tenantis read from a query parameter instead of the URL path as defined in the updated proto. - A logic change in history limiting that makes the corresponding Javadoc outdated and could be made more robust against negative values.
Overall, the changes are consistent with the goal of upgrading the gRPC specification.
| if(request.historyLength() != null) { | ||
| requestBuilder.setHistoryLength(request.historyLength()); | ||
| } else { | ||
| requestBuilder.clearHistoryLength(); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| //TODO replace by path extraction | ||
| String tenant = rc.request().params().get("tenant"); | ||
| if (tenant == null) { | ||
| tenant = ""; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| private static Task limitTaskHistory(Task task, @Nullable Integer historyLength) { | ||
| if (task.getHistory() == null || historyLength == null || historyLength >= task.getHistory().size()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The behavior for historyLength = 0 has changed from 'unlimited' to 'zero history items'. While this is more intuitive, the Javadoc for this method is now outdated and should be updated to reflect that null means unlimited. Additionally, a negative historyLength will now cause an IllegalArgumentException from subList. For robustness, consider adding an explicit check for negative values.
* Generating new grpc specifications * Updating code impacted by those changes * Removing some unused metadata Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>