[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時間
- マージ済み PR(30日)
- 41
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 日以内に返信