Skip to content

Conversation

@ehsavoie
Copy link
Collaborator

@ehsavoie ehsavoie commented Dec 16, 2025

  • Add tenant parameter to RestHandler.getTaskPushNotificationConfiguration to match other push notification methods

  • Add route with trailing slash to distinguish GET (single config) from LIST in A2AServerRoutes

  • Update RestTransport to use trailing slash when configId is null

  • Update tests to use new method signatures

  • Update REST routes to match the new teannt path element

    This ensures consistent tenant handling across all push notification endpoints and fixes routing ambiguity between GET and LIST operations.

  • Follow the CONTRIBUTING Guide.

  • [C] Make your Pull Request title in the https://www.conventionalcommits.org/ specification.

    • Important Prefixes for release-please:
      • fix: which represents bug fixes, and correlates to a SemVer patch.
      • feat: represents a new feature, and correlates to a SemVer minor.
      • feat!:, or fix!:, refactor!:, etc., which represent a breaking change (indicated by the !) and will result in a SemVer major.
  • [X Ensure the tests pass

  • Appropriate READMEs were updated (if necessary)

Fixes #531 🦕

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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 significantly enhances the client and server components by integrating multi-tenancy support through the addition of a tenant field in key API requests and interfaces. It also refines the agent card capabilities by renaming a boolean flag for better semantic understanding and simplifies data handling by removing an unnecessary metadata field from several parameter objects. These changes aim to make the API more robust for multi-tenant deployments and improve the overall maintainability of the codebase.

Highlights

  • Multi-tenancy Support: Introduced a tenant field across various gRPC and REST API requests and interfaces to enable multi-tenancy capabilities.
  • API Renaming: Renamed the supportsAuthenticatedExtendedCard field to supportsExtendedAgentCard in AgentCard definitions for improved clarity and consistency.
  • Data Structure Simplification: Removed the metadata field from several *Params classes and their corresponding mappers, streamlining data structures and reducing complexity.
  • Path Prefix Removal: Eliminated the /v1 path prefix from REST API endpoints and test requests, simplifying URL structures.
  • Protobuf Version Update: Updated the Protobuf Java version from 4.31.1 to 4.33.1, incorporating the latest protobuf features and fixes.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 introduces significant changes to support multi-tenancy, primarily by adding a tenant parameter to various API calls and updating URL routing. It also includes substantial refactoring, such as renaming supportsAuthenticatedExtendedCard to supportsExtendedAgentCard and cleaning up constructors. While the changes are extensive and mostly correct, I've identified several issues. There are critical errors in test data JSON that will cause parsing failures, buggy tenant path extraction logic in both client and server code, and several missing mappings in the gRPC mappers for the new tenant field. These issues could break multi-tenancy functionality and tests.

@ehsavoie ehsavoie force-pushed the issue_531 branch 2 times, most recently from 04f8704 to 45e3caf Compare December 16, 2025 10:59
@ehsavoie
Copy link
Collaborator Author

/gemini review

@ehsavoie ehsavoie marked this pull request as ready for review December 16, 2025 10:59
@ehsavoie ehsavoie changed the title Issue 531 ix: Add tenant parameter to REST push notification config endpoints Dec 16, 2025
@ehsavoie ehsavoie changed the title ix: Add tenant parameter to REST push notification config endpoints fix: Add tenant parameter to REST push notification config endpoints Dec 16, 2025
@ehsavoie ehsavoie changed the title fix: Add tenant parameter to REST push notification config endpoints feat: Add tenant parameter to REST push notification config endpoints Dec 16, 2025
@kabir
Copy link
Collaborator

kabir commented Dec 16, 2025

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 introduces significant changes to add multi-tenancy support, which involved refactoring API paths, request/parameter objects, and updating generated code. The /v1 prefix has been removed from REST API paths to accommodate tenant-specific routes. Additionally, there are several API cleanups, such as replacing generic metadata maps with a specific tenant field in parameter objects, and bug fixes, like handling nullable historyLength. My review identified a critical issue with an inconsistent regular expression for taskId in one of the REST routes, which could lead to routing failures. I also found several instances of inconsistent naming for the task identifier in path parameters, which I've flagged as medium-severity maintainability issues.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 introduces multi-tenancy support across the A2A client and server, primarily by adding an optional 'tenant' path parameter to various API endpoints and their corresponding client and server-side request objects. Key changes include updating protobuf definitions to include a 'tenant' field in request messages and agent interfaces, modifying REST and JSON-RPC transports to construct URLs and handle requests with tenant information, and adjusting related test cases. Additionally, the pull request renames supportsAuthenticatedExtendedCard to supportsExtendedAgentCard for clarity, refactors TextPart and DataPart constructors to remove an unused metadata parameter, and updates gRPC client error handling to include StatusException. Review comments highlighted several instances where the 'tenant' field was either incorrectly hardcoded to null or missing from mapper configurations in the server-side logic, and also pointed out an incorrect regex for the getAuthenticatedExtendedCard endpoint in the REST server routes.

@ehsavoie
Copy link
Collaborator Author

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 introduces a tenant parameter to various REST endpoints to standardize tenant handling and resolve routing ambiguities, particularly for push notification configurations. The changes are comprehensive, affecting the specification, transport layers, server handlers, and tests. The implementation is mostly solid, but I've identified a key issue with the getAuthenticatedExtendedCard endpoint where the new tenant functionality seems to be either incomplete or incorrectly implemented.

@ehsavoie ehsavoie force-pushed the issue_531 branch 2 times, most recently from 49a9160 to 0aefff0 Compare December 16, 2025 12:29
@kabir
Copy link
Collaborator

kabir commented Dec 16, 2025

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 introduces tenant support for REST push notification endpoints, a crucial feature for multi-tenancy. The changes are comprehensive, spanning the client, server, and specification modules to ensure consistent tenant handling across the board. The approach of using regular expressions for routing and a trailing slash to resolve ambiguity between GET and LIST operations is well-executed.

My review focuses on enhancing code maintainability by reducing duplication and addressing a potential issue with an unused parameter. I've identified a few areas in RestTransport.java that could be refactored to be more DRY (Don't Repeat Yourself). Additionally, I've flagged an unused tenant parameter in RestHandler.java that requires attention and suggested a style improvement in A2AServerRoutes.java.

Overall, these are solid changes that improve the API's consistency and capabilities.

- Add tenant parameter to RestHandler.getTaskPushNotificationConfiguration to match other push notification methods
- Add route with trailing slash to distinguish GET (single config) from LIST in A2AServerRoutes
- Update RestTransport to use trailing slash when configId is null
- Update tests to use new method signatures
- Update REST routes to match the new teannt path element

This ensures consistent tenant handling across all push notification endpoints and fixes routing ambiguity between GET and LIST operations.

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
@kabir kabir merged commit 6aad9cd into a2aproject:main Dec 16, 2025
11 checks passed
@ehsavoie ehsavoie deleted the issue_531 branch December 19, 2025 16:23
kabir pushed a commit to kabir/a2a-java that referenced this pull request Dec 23, 2025
…a2aproject#542)

- Add tenant parameter to
RestHandler.getTaskPushNotificationConfiguration to match other push
notification methods
- Add route with trailing slash to distinguish GET (single config) from
LIST in A2AServerRoutes
- Update RestTransport to use trailing slash when configId is null
- Update tests to use new method signatures
- Update REST routes to match the new teannt path element
    
This ensures consistent tenant handling across all push notification
endpoints and fixes routing ambiguity between GET and LIST operations.

- [X] Follow the [`CONTRIBUTING` Guide](../CONTRIBUTING.md).
- [C] Make your Pull Request title in the
<https://www.conventionalcommits.org/> specification.
- Important Prefixes for
[release-please](https://github.com/googleapis/release-please):
- `fix:` which represents bug fixes, and correlates to a
[SemVer](https://semver.org/) patch.
- `feat:` represents a new feature, and correlates to a SemVer minor.
- `feat!:`, or `fix!:`, `refactor!:`, etc., which represent a breaking
change (indicated by the `!`) and will result in a SemVer major.
- [X Ensure the tests pass
- [X] Appropriate READMEs were updated (if necessary)

Fixes a2aproject#531 🦕

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
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.

[Feat]: [spec-1.0] Client & spec API does not expose tenancy

2 participants