[Bug]: VersionedDatabaseTaskStore get() and delete() fail with "no such table" when initialize() was not called
Les mainteneurs répondent en général sous 3 jours
Évaluation
Cette issue n'a pas encore été évaluée.
Description
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
- Langage dominant
- Python
- Étoiles
- 2.2k
- Forks
- 518
- Merge moyen
- 3 j 23 h
- PR mergées (30 j)
- 41
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de a2aproject/a2a-python
-
[Bug]: `A2A-Version` validation ignores minor versions and the query parameterPeut-être pris @rohityan l’a pris il y a 56 jours. Ouvertecomponent: server status:awaiting response
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
a2aproject/a2a-python#1204 · 3 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 3 jours
-
[Bug]: REST task/request id sanitizationPeut-être pris @Linux2010 l’a pris il y a 115 jours. Ouvertemaintainers-only
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
a2aproject/a2a-python#805 · 1 commentaire ·
Les mainteneurs répondent en général sous 3 jours
-
Legacy handler ignores history_length on message/streamPeut-être pris @rohityan l’a pris aujourd’hui. Ouverte
a2aproject/a2a-python#1363 · 2 personnes assignées ·
Les mainteneurs répondent en général sous 3 jours
-
v0.3 client returns an empty status message and provider when they are unsetPeut-être pris @rohityan l’a pris aujourd’hui. Ouverte
a2aproject/a2a-python#1361 · 2 personnes assignées ·
Les mainteneurs répondent en général sous 3 jours
-
[Bug]: Executor failure right after its Task is enqueued leaves the task SUBMITTED on DatabaseTaskStorePeut-être pris @Iwaniukooo11 l’a pris il y a 2 jours. Ouvertecomponent: server
a2aproject/a2a-python#1351 · 2 personnes assignées ·
Les mainteneurs répondent en général sous 3 jours
Toutes les issues de a2aproject/a2a-python
Issues similaires
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 80/100
521xueweihan/HelloGitHub#4063 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
Vanilla-OS/apx-gui#112 ·
-
Devstral and Voxtral: section 5 fails in us-east-1 with 400 "Model does not support audio modality"Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
aws-samples/sample-per-model-bedrock#409 ·
Les mainteneurs répondent en général sous 1 jour
-
DuckDB 2.0 breaks to_pyarrow_batchesPeut-être pris @DG47 l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
ibis-project/ibis#12196 ·
Les mainteneurs répondent en général sous 1 jour