🧭 Epic - MariaDB Support (alongside PostgreSQL & SQLite)
| Field |
Value |
| Title |
Add full MariaDB 10.6+ compatibility (runtime, migrations, CI, docs) |
| Goal |
Run the Gateway with a MariaDB backend simply by changing the SQLAlchemy URL (e.g., mariadb+mariadbconnector://…). Provide a one-liner Docker Compose service, optional Helm values, green CI matrix, and updated docs. |
| Why now |
Several downstream teams operate on MariaDB-only clusters. Supporting it widens adoption and lets us validate SQL-dialect abstractions before 1.0 GA. |
| Depends on |
Alembic migration framework; Validation & Schema Enforcement epic (cross-dialect JSON handling). |
This feature validates that SQLAlchemy and Alembic migrations are implemented correctly, and provides an additional baseline to compare performance with.
🧭 Type of Feature
🙋♂️ User Stories
| # |
Persona |
Need |
Acceptance Criteria |
| 1 |
Platform engineer |
Spin up Gateway + MariaDB in Docker Compose |
docker compose -f docker-compose.mariadb.yml up starts Gateway, Alembic auto-migrates, health checks pass. |
| 2 |
SRE running Helm |
Deploy Gateway with cluster-managed MariaDB |
Setting db.type=mariadb in values.yaml generates a valid Secret & connection string; pods reach Ready. |
| 3 |
Developer |
CI asserts my PR works on all DBs |
GitHub Actions job shows ✨ green for sqlite / postgres / mariadb matrix. |
| 4 |
Doc reader |
Find config & caveats in docs |
README & “Databases” guide list supported engines, connection URLs, engine-specific notes. |
🔧 Task Breakdown
-
SQLAlchemy & Drivers
-
Alembic Dialect Support
-
Schema Fix-ups
-
Test Matrix
-
Docker Compose
-
Helm Chart
-
Documentation
-
Migration Guide
-
Observability
-
Release Notes & Changelog
📓 Implementation Notes / Caveats
- JSON – MariaDB ≥10.5 stores JSON as LONGTEXT with type validation; no JSONB indexing.
- UUIDs – stored as
CHAR(36); minor perf hit vs native uuid in Postgres.
- Transactions – default engine
InnoDB; tests enforce READ COMMITTED isolation.
- Max key length – 3072 bytes (utf8mb4) ⇒ watch composite indexes.
🔄 Alternatives Considered
| Approach |
Pros |
Cons |
Decision |
| Stick to Postgres only |
Less code, best features |
Blocks teams on MariaDB, reduces adoption |
❌ |
✅ Definition of Done
- All unit & integration tests pass on sqlite-latest, postgres-16, mariadb-10.6 in CI.
docker compose -f docker-compose.mariadb.yml up starts without manual tweaks.
- Helm chart with
db.type=mariadb deploys successfully on kind.
🧭 Epic - MariaDB Support (alongside PostgreSQL & SQLite)
mariadb+mariadbconnector://…). Provide a one-liner Docker Compose service, optional Helm values, green CI matrix, and updated docs.🧭 Type of Feature
🙋♂️ User Stories
docker compose -f docker-compose.mariadb.yml upstarts Gateway, Alembic auto-migrates, health checks pass.db.type=mariadbinvalues.yamlgenerates a valid Secret & connection string; pods reach Ready.🔧 Task Breakdown
SQLAlchemy & Drivers
mariadb>=1.1.4(connector) inrequirements.in.config.pyto acceptDB_DRIVERenv var default →mariadb+mariadbconnector.Alembic Dialect Support
alembic/env.py(engine.dialect.name == "mariadb").postgresql.UUID→String(36)if dialect is MariaDB.JSONtype; fallback toTEXTfor 10.3-.Schema Fix-ups
<= 64 chars) vianaming_conventionfor MariaDB.ARRAYcolumns with comma-separatedVARCHARor link-table.Test Matrix
{ DB: sqlite, postgres, mariadb }.mariadb:10.6, envMARIADB_ROOT_PASSWORD: test.pytestfixture to spin engine per DB.Docker Compose
docker-compose.mariadb.ymladds:Gateway service gets
DB_URL: mariadb+mariadbconnector://root:gateway@mariadb:3306/gateway.Helm Chart
values.yaml→Conditional template renders
driverClassName, liveness query.Documentation
JSONPathindex, FK length).Migration Guide
mysqldumpcaveats).Observability
engine="mariadb".Release Notes & Changelog
📓 Implementation Notes / Caveats
CHAR(36); minor perf hit vs nativeuuidin Postgres.InnoDB; tests enforceREAD COMMITTEDisolation.🔄 Alternatives Considered
✅ Definition of Done
docker compose -f docker-compose.mariadb.yml upstarts without manual tweaks.db.type=mariadbdeploys successfully on kind.