Skip to content

docs: DatabaseSessionService example is misleading for SQLite #1075

@AlejandroBlanco2001

Description

@AlejandroBlanco2001

Describe the bug

In the following documentation for the DatabaseSessionService, a synchronous implementation is shown for the SQLite example. However, the internal implementation of the service (built on top of SQLAlchemy) does not allow using SQLite in a synchronous approach, which causes the code to crash. This can be misleading for users.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://google.github.io/adk-docs/sessions/session/#sessionservice-implementations
  2. Navigate to the DatabaseSessionService section
  3. Copy and paste the example code into your IDE
  4. Run the code

Expected behavior

The code should run successfully without major issues and create the SQLite database.

Screenshots

Image extracted from the following issue: google/adk-python#3916

Image

Versions

  • OS: Arch Linux
  • ADK version: 1.21.0
  • Python version: CPython 3.11

Additional context

I tested the same scenario as the issue creator on my device and encountered the same problem. After switching to the async driver, it worked without major issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions