Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

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

Offen
#1,356 1 Kommentar 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 3 Tagen

@cchinchilla-dev arbeitet bereits daran.

Seit 21.10.2026.

  • #1357 von @cchinchilla-dev — offen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

component: server status:awaiting response
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
Vorherrschende Sprache
Python
Sterne
2.2k
Forks
518
Ø Merge
3 T. 19 Std.
Gemergte PRs (30 T.)
43

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus a2aproject/a2a-python

Alle Issues in a2aproject/a2a-python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.