Add support for the embedding database
What does this MR do and why?
Adds support for a new embeddings database with a separate schema and migrations.
Relates to #404396 (closed)
This is part of a series of MRs and should be reviewed and merged in this order
MR | status |
---|---|
Add support for the embedding database (!118156 - merged) (db setup) | in review |
Add the tanuki_bot model (!118195 - merged) (migration) | in review |
Create initial Tanuki bot api endpoint (!117695 - merged) (api) | in dev |
Context
We need the pgvector
extension installed and enabled for this new database. It is needed for AI experimentation features that require storing and searching embeddings. We don't want to make it a dependency for the main DB on GitLab.com and for self-managed customers.
How to set up and validate locally
- Check out the
mattkasa-add-pgvector
branch in your GDK root. - Run
gdk config set pgvector.enabled true
. - Run
gdk reconfigure
. - Check out the
mattkasa-add-embedding-db
branch in your GDK root. - Check out the
mattkasa-add-embedding-db
branch in gitlab. (Note: this is in the gitlab directory) - Run
gdk config set gitlab.rails.databases.embedding.enabled true
. - Run
gdk reconfigure
. - Run
bin/rails db:migrate
.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Dmitry Gruzd