Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#1,356 0 bình luận 0 reaction 2 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

@rohityan đang làm issue này rồi.

Từ ngày 20/10/2026.

  • #1357 của @cchinchilla-dev — đang mở

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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
Ngôn ngữ chính
Python
Star
2.2k
Fork
518
Merge trung bình
3 ngày 23 giờ
Pull request đã merge (30 ngày)
41

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của a2aproject/a2a-python

Tất cả issue của a2aproject/a2a-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.