a2aproject / a2aproject/a2a-python

Create push notification config returns no id on database-backed stores

未關閉
#1,237 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
2.1k
分支
496
平均合併
4 天 17 小時
30 天內合併 PR
12

描述

## What happens

Creating a push notification config against a database-backed server returns a config with no `id`. Reading it back with that id raises `InvalidParamsError`.

```
create returned id = ''
get FAILED -> InvalidParamsError: Validation failed
```

The same calls against the in-memory store return `id='task-123'` and the get succeeds.

## Why

`on_create_task_push_notification_config` returns the caller's request object rather than what the store persisted (`default_request_handler.py:556`, `default_request_handler_v2.py:394`).

Both stores default an empty `id` to the task id, on different objects:

- `inmemory_push_notification_config_store.py:51` sets it on the caller's object, so `return params` carries it.
- `database_push_notification_config_store.py:292` copies first and sets it on the copy, so `params` never gets it.

The store holds the right id either way; only the response differs.

## Version

main @ d55a3d3

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。