Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Bug]: VersionedDatabaseTaskStore get() and delete() fail with "no such table" when initialize() was not called

オープン
#1,356 コメント 0 件 リアクション 0 件 担当者 2 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

@rohityan がすでに取り組んでいます。

2026年10月20日 から。

  • #1357 @cchinchilla-dev による — オープン

評価

この 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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

a2aproject/a2a-python のほかの issue

a2aproject/a2a-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。