Repository navigation
Commit d830036
fix(compat): list push notification configs in the v0.3 REST client (a2aproject#1424)
# Description
`CompatRestTransport.list_task_push_notification_configs` raised
`NotImplementedError`, so a client using the HTTP+JSON binding could not
list push notification configs on a v0.3 agent. The v0.3 REST binding
defines the call as `GET /v1/tasks/{id}/pushNotificationConfigs`. This
SDK's own v0.3 compat server (`REST03Adapter`) serves it, and the v0.3
JSON-RPC and gRPC client transports already implement it.
This change sends the `GET` request and converts the
`ListTaskPushNotificationConfigResponse` with the existing converters,
as the v0.3 gRPC transport does. `delete_task_push_notification_config`
keeps raising `NotImplementedError`, since the compat REST server does
not mount a delete route.
The unit test that asserted `NotImplementedError` now checks the request
path and the parsed configs. Listing two configs against a server built
with `create_rest_routes(..., enable_v0_3_compat=True)` also returns
both of them now.
- [x] Follow the [`CONTRIBUTING`
Guide](https://github.com/a2aproject/a2a-python/blob/main/CONTRIBUTING.md).
- [x] Make your Pull Request title in the
<https://www.conventionalcommits.org/> specification.
- [x] Ensure the tests and linter pass (Run `bash scripts/format.sh`
from the repository root to format)
- [x] Appropriate docs were updated (if necessary)
Fixes a2aproject#1423
Co-authored-by: mykytanetipa <mykytanetipa@google.com>1 parent 5e0d415 commit d830036
2 files changed
Lines changed: 51 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
264 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
265 | 277 | | |
266 | 278 | | |
267 | 279 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
517 | 550 | | |
518 | 551 | | |
519 | 552 | | |
| |||
0 commit comments