feat: ship DocumentsDB and VectorsDB off by default - #13411
Conversation
DocumentsDB runs only on MongoDB and VectorsDB only on PostgreSQL, but an installation deploys just the engine backing the platform. A default install therefore had neither engine behind them: creating a database returned 201 and the first write failed with a bare server error, the cause only in the logs. Both are now off unless _APP_DOCUMENTSDB or _APP_VECTORSDB says otherwise, and their routes answer with a service disabled error until then -- to keys and privileged roles too, since there is no engine to reach either way. Enabling one means provisioning its engine and pointing the matching _APP_DB_* variables at it; the installer does not ask, and does not deploy an engine for a product.
Greptile SummaryThe PR makes DocumentsDB and VectorsDB opt-in deployment features, returning a controlled service-disabled response until operators explicitly enable them. Major changes:
Confidence Score: 5/5The PR appears safe to merge, with no concrete changed-code failure established. The new checks default both product namespaces to a controlled disabled response, preserve explicit operator enablement through Compose, and keep CI environments opted in; the reviewed changes produced no actionable correctness or security finding. Important Files Changed
Reviews (1): Last reviewed commit: "feat: ship DocumentsDB and VectorsDB off..." | Re-trigger Greptile |
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
Reverts e92e56d, de7f258, 87c3467 and 90b4058, which asked in both installers which of DocumentsDB and VectorsDB to deploy and had the compose generator add an engine per enabled product. Neither product is ready to be turned on from a stock installation, so the choice is not worth its surface: two installer prompts, a web installer step, and per-product engine selection. This leaves 2.0.x matching main again for these files; the replacement, both products off behind an environment variable, lands on main in #13411 and reaches this branch through the usual sync.
DocumentsDB and VectorsDB are unusable on a stock installation, so they now ship off and say so, instead of accepting a request and failing on the first write.
What happens today
DocumentsDB runs only on MongoDB and VectorsDB only on PostgreSQL, but an installation deploys a single engine — the one chosen for the platform. A default install has neither engine behind those products:
Nothing in the response says MongoDB is absent; the cause is only in the container logs. A MariaDB platform loses both products the same way.
The change
Both products are off unless
_APP_DOCUMENTSDBor_APP_VECTORSDBis set toenabled, and until then their routes returngeneral_service_disabled— to API keys and privileged roles too, since there is no engine to reach either way. The check sits with the existing per-project service gate inapp/controllers/shared/api.php, before scope validation, so a disabled product reads the same as one a project has turned off.Enabling one is an operator decision that comes with provisioning work: deploy the engine and point the matching
_APP_DB_*_DOCUMENTSDB/_APP_DB_*_VECTORSDBvariables at it. The installer neither asks nor deploys an engine for a product — the variables are documented inapp/config/variables.phpand that is the whole surface.CI sets both to
enabled, so the existing DocumentsDB and VectorsDB e2e suites keep running against the MongoDB the matrix already provisions.This supersedes #13382, which offered the choice through the CLI and web installers and had the compose generator deploy an engine per enabled product. That is a lot of surface for products that are not ready to be turned on, so it is closed in favour of this.
Verification
Against a running stack with the change mounted, using a project API key holding every database scope:
_APP_DOCUMENTSDB=enabled_APP_VECTORSDB=enabledGET /v1/documentsdbgeneral_service_disabledPOST /v1/documentsdbgeneral_service_disabledGET /v1/vectorsdbgeneral_service_disabledPOST /v1/vectorsdbgeneral_service_disabledPOST /v1/tablesdb(control)GET /v1/databases(control)Also confirmed the gate fires ahead of scope validation: an unauthenticated call gets
general_service_disabledrather thangeneral_unauthorized_scope.Test plan
docker compose configvalidatesNote
/v1/embeddings/textis a separate service (embeddings) backed by the embedding container rather than a database engine, so it is left alone.2.0.x carries a partial version of #13382 already (
e92e56d274, the CLI installer half). A follow-up strips the prompts and the compose generator's per-product engine selection there and brings it in line with this.