[Bug]: VersionedDatabaseTaskStore get() and delete() fail with "no such table" when initialize() was not called
维护者通常 3 天内回复
评估
这个 Issue 还没有评估数据。
描述
What happened?
VersionedDatabaseTaskStore (src/a2a/server/cluster/database_task_store.py, added in #1281) creates its tables lazily, like DatabaseTaskStore: save() calls self._db._ensure_initialized() and then self._ensure_cluster_tables() before touching the database. get() and delete() only initialize the underlying DatabaseTaskStore, so on that path the task_versions table is never created.
If the store is used without calling initialize() first and the first operation is a get() or a delete(), the query on task_versions fails instead of returning None for a missing task:
store = VersionedDatabaseTaskStore(engine=create_async_engine('sqlite+aiosqlite:///:memory:'))
await store.get('missing', ServerCallContext())
# sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: task_versions
await store.delete('missing', ServerCallContext())
# sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: task_versions
The cluster sample and the existing tests call initialize() explicitly, so this only shows up when relying on the lazy initialization that save() and DatabaseTaskStore already provide.
Suggested fix: call self._ensure_cluster_tables() in get() and delete() after initializing the underlying store, as save() does.
I have a fix ready and I'm opening a PR alongside this issue.
Code of Conduct
- I agree to follow this project's Code of Conduct
- 主要语言
- Python
- 星标
- 2.2k
- 派生
- 518
- 平均合并
- 3 天 23 小时
- 30 天内合并 PR
- 41
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
a2aproject/a2a-python 的其他 Issue
-
[Bug]: `A2A-Version` validation ignores minor versions and the query parameter可能已有人在做 @rohityan 于 57 天前认领。 未关闭component: server status:awaiting response
难度 2/5 1-3 小时 新手友好度 75/100
a2aproject/a2a-python#1204 · 3 条评论 · 已指派 1 人 ·
维护者通常 3 天内回复
-
[Bug]: REST task/request id sanitization可能已有人在做 @Linux2010 于 115 天前认领。 未关闭maintainers-only
难度 2/5 1-3 小时 新手友好度 65/100
a2aproject/a2a-python#805 · 1 条评论 ·
维护者通常 3 天内回复
-
Legacy handler ignores history_length on message/stream可能已有人在做 @rohityan 今天认领。 未关闭
a2aproject/a2a-python#1363 · 已指派 2 人 ·
维护者通常 3 天内回复
-
v0.3 client returns an empty status message and provider when they are unset可能已有人在做 @rohityan 于 1 天前认领。 未关闭
a2aproject/a2a-python#1361 · 已指派 2 人 ·
维护者通常 3 天内回复
-
[Bug]: Executor failure right after its Task is enqueued leaves the task SUBMITTED on DatabaseTaskStore可能已有人在做 @Iwaniukooo11 于 2 天前认领。 未关闭component: server
a2aproject/a2a-python#1351 · 已指派 2 人 ·
维护者通常 3 天内回复
查看 a2aproject/a2a-python 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
zach-blumenfeld/aip#13 ·
-
难度 2/5 1-3 小时 新手友好度 80/100
nathanmarlor/foxess_modbus#1287 ·
维护者通常 4 天内回复
-
bug good first issue help wanted
难度 2/5 1-3 小时 新手友好度 84/100
OpenLakeForge/openlakeforge#498 ·
维护者通常 1 天内回复
-
good first issue hacktoberfest help wanted python
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 69/100
pollen-robotics/reachy_mini#1493 ·
维护者通常 1 天内回复