-
Notifications
You must be signed in to change notification settings - Fork 439
Description
π Prerequisites
- I have searched the existing issues to avoid creating a duplicate
- By submitting this issue, you agree to follow our Code of Conduct
π Feature Summary
Drop SQLite as a supported database backend and make PostgreSQL the only supported option, with a bundled PostgreSQL instance in the Helm chart for zero-config installs.
β Problem Statement / Motivation
- SQLite has no pgvector support, requiring a separate code path for memory/vector search
- Single-writer constraint prevents horizontal scaling of the controller
- Divergent SQL dialects require maintaining two code paths (
JSON_EXTRACTvs JSONB operators,F32_BLOBvsvector(N), SQLite-specific delete workarounds) - In-memory SQLite unit tests mask Postgres bugs (a pre-existing
SearchCrewAIMemoryByTaskbug using MySQL-syntaxJSON_EXTRACTis hidden behind SQLite tests) - PostgreSQL is already the recommended production backend β SQLite is only used as a convenience default that causes more problems than it solves
π‘ Proposed Solution
- Remove all SQLite code paths from
manager.goandclient.go - Fix the pre-existing
SearchCrewAIMemoryByTaskbug exposed by the removal (replaceJSON_EXTRACTwith Postgres JSONB operators) - Remove
--database-typeand--sqlite-database-pathflags; retain--database-vector-enabled(defaulttrue) so external PostgreSQL users without pgvector can opt out without a hard crash at startup - Replace in-memory SQLite unit tests with testcontainers-go (
pgvector/pgvector:pg18-trixie) - Remove
glebarez/sqliteandturso.tech/tursogofromgo.mod - Bundle PostgreSQL in the Helm chart (
helm/kagent/templates/postgresql.yaml) β deployed automatically whendatabase.postgres.urlis empty (the default); seturlto use an external PostgreSQL instead - Simplify CI E2E β remove the
database: [sqlite, postgres]matrix and separate Postgres service container; postgres is deployed inside the Kind cluster bymake helm-install
π Alternatives Considered
- Keep SQLite as default, promote Postgres β rejected; maintaining two backends indefinitely has an ongoing cost and the divergent test coverage creates a false sense of correctness
- Bitnami postgresql subchart β considered for bundling postgres; rejected as too heavy for a dev dependency and ties the chart to an external release cycle
- Separate kagent-postgres chart β considered; rejected as it adds install complexity without meaningful benefit
π― Affected Service(s)
Multiple services / System-wide
π Additional Context
No response
π Are you willing to contribute?
- I am willing to submit a PR for this feature
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Backlog