feat: handle tenant in a2aclient and a2asrv#237
feat: handle tenant in a2aclient and a2asrv#237yarolegovich merged 15 commits intorelease/spec-v1from
Conversation
The spec was unspecified, so the implementation restricts task continuation to TaskStateInputRequired. However, TCK tests expect continuation for any non-terminal state. Added an interceptor to the SUT agent so 2 of TCK tests would pass.
# Description This PR fixes typos across code comments. No functional changes. ## Changes | File | Before | After | |---|---|---| | `a2a/core.go` | `TastState defines a set of...` | `TaskState defines a set of...` | | `a2aclient/doc.go` | `agentcard.DefaultResolved.Resolve` | `agentcard.DefaultResolver.Resolve` | | `a2aclient/agentcard/doc.go` | `but custom this can be configured` | `but this can be customized` | --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Pure plumbing - no new business logic. Each layer gets the obvious `ListTasks` method that delegates to the next: - `Transport` interface + `unimplementedTransport` stub - JSON-RPC client: sends `tasks/list`, unmarshals `ListTasksResponse` - JSON-RPC server: dispatches `tasks/list` to `onListTasks` - gRPC client: converts via pbconv, calls proto `ListTasks` - `RequestHandler` interface + default impl delegates to `taskStore.List()` - `InterceptedHandler`: wraps with before/after interceptors - `MethodTasksList` constant added Release-As: 0.3.7
we rely on optimistic concurrency control to propagate cancelation signal in distributed deployments. if a task gets cancelled the next task update fails and stops execution. in case of cancelations OCC also applies, but this also makes cancelations fragile, especially when execution generates events rapidly the solution for now is to provide a built-in retry mechanism on task update level where in cases of concurrent modification task status update to failed is going to be retried up to a max number of attempts
🤖 I have created a release *beep* *boop* --- ## [0.3.7](v0.3.6...v0.3.7) (2026-02-20) ### Features * implement tasks/list RPC ([#210](#210)) ([6e04698](6e04698)) * retry cancelations ([#222](#222)) ([3057474](3057474)) ### Bug Fixes * handle internal error: tck failure ([#186](#186)) ([b55fbfd](b55fbfd)) * **sse:** support data: prefix without space ([#188](#188)) ([6657a6d](6657a6d)), closes [#162](#162) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Summary of ChangesHello @yarolegovich, 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 comprehensive multi-tenancy support across both the Highlights
Changelog
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.
Code Review
This pull request introduces tenant handling across a2aclient and a2asrv. The client-side changes involve a decorator to inject the tenant into requests, and REST transport modifications to prepend the tenant to the URL path. The server-side changes add a StripTenant middleware to extract the tenant from the URL and propagate it through the context to handlers and executors. The changes are comprehensive and well-structured.
My review identified several critical issues regarding potential nil pointer dereferences in a2asrv/intercepted_handler.go due to removed nil checks. I've also found a high-severity bug in a2asrv/agentexec.go where tenant information could be incorrectly overwritten. Additionally, there's a performance improvement opportunity in a2aclient/rest.go and a style guide violation regarding a stale TODO comment in a2asrv/rest.go. All identified issues are detailed in the comments below, with suggestions provided where applicable.
There was a problem hiding this comment.
nit: we might change the file name as it is representing ExecutorContext now (not RequestContext)
There was a problem hiding this comment.
will fix on merge of the next pr to avoid merge conflicts
a2asrv.NewTenantRESTHandlerwhich takes a prefix template which it strips and injects the part captured by {} into the regular REST handler.a2asrv.CallContext.a2asrv.ExecutorContext(previously known as RequestContext).