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

未关闭 适合新手
#1,237 1 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@rohityan 已经在做这个了。

开始于 2026年9月15日。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
75/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
领域
backend, databases

调研方向

问题位于 default_request_handler.py 第 556 行和 default_request_handler_v2.py 第 394 行,其中 on_create_task_push_notification_config 返回的是 request 的 params,而不是已持久化的对象。对比 inmemory_push_notification_config_store.py:51database_push_notification_config_store.py:292,查看每个 store 如何处理 id。编写一个测试,使用 database store 创建 push notification config,并验证返回的 config 具有有效的 id。运行现有的 push notification 测试,确保修复不会破坏任何内容。

由索引模型根据 Issue 内容生成。

描述

component: server status:awaiting response

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

主要语言
Python
星标
2.2k
派生
496
平均合并
1 天 23 小时
30 天内合并 PR
16

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

a2aproject/a2a-python 的其他 Issue

查看 a2aproject/a2a-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。