a2aproject / a2aproject/a2a-python

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

Đang mở
#1,237 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
2.1k
Fork
496
Merge trung bình
4 ngày 17 giờ
Pull request đã merge (30 ngày)
12

Mô tả

## 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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.