[Bug]: VersionedDatabaseTaskStore get() and delete() fail with "no such table" when initialize() was not called
Maintainer antworten meist innerhalb von 3 Tagen
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
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
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus a2aproject/a2a-python
-
[Bug]: `A2A-Version` validation ignores minor versions and the query parameterEvtl. vergeben @rohityan hat das vor 58 Tagen übernommen. Offencomponent: server status:awaiting response
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
a2aproject/a2a-python#1204 · 3 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 3 Tagen
-
[Bug]: REST task/request id sanitizationEvtl. vergeben @Linux2010 hat das vor 117 Tagen übernommen. Offenmaintainers-only
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
a2aproject/a2a-python#805 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 3 Tagen
-
Zero-downtime migration mode stores tasks without last_updatedEvtl. vergeben @ConnorMoss02 hat das heute übernommen. Offencomponent: server status:awaiting response
a2aproject/a2a-python#1371 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 3 Tagen
-
[Bug]: v0.3 JSON-RPC compat adapter returns -32603 for all A2A errors (e.g. TaskNotFound should be -32001)Evtl. vergeben @shwetangsinha0509 hat das heute übernommen. Offencomponent: server status:awaiting response
a2aproject/a2a-python#1368 · 2 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 3 Tagen
-
[Bug]: Executor failure right after its Task is enqueued leaves the task SUBMITTED on DatabaseTaskStoreEvtl. vergeben @Yatsuiii hat das vor 1 Tag übernommen. Offencomponent: server
a2aproject/a2a-python#1351 · 2 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 3 Tagen
Alle Issues in a2aproject/a2a-python
Ähnliche Issues
-
[oblt-aw][autodoc] Update workflow docs for gh-aw v0.92.5 and detector permission scopeEvtl. vergeben @github-actions hat das heute übernommen. Offen
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
feat(ide): VS Code access through the shipped MCP server (config doc and tool-list smoke test)Offenroadmap-100
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
comp/tools P2 tool/browser tool/file type/bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
NousResearch/hermes-agent#143418 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
python-hyper/uritemplate#164 ·