Skip to content

Commit 1384def

Browse files
committed
docs(data-modeling): name drivers as a reserved datasource name; comment on its own line
Review fixes: the drivers page now says the datasource admin API refuses a runtime datasource named `drivers` (the driver-catalog route), and the route-shadowed-names comment in assertValidName moves off the closing-brace line. No behaviour change. Claude-Session: https://claude.ai/code/session_01ADHkmPjMhxWBYAk48z4Mam Co-authored-by: Claude <noreply@anthropic.com>
1 parent a5f6f0c commit 1384def

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎content/docs/data-modeling/drivers.mdx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,9 @@ through the same datasource connection path — one failure verdict, one escape
278278
hatch, and a real `status` for the primary DB in **Setup → Datasources**. The
279279
name `default` is host-reserved: an app bundle declaring a datasource with that
280280
name is rejected at load.
281+
The name `drivers` is reserved at the datasource admin API: creating a runtime
282+
datasource under it is refused, because `GET /api/v1/datasources/drivers` is the
283+
driver catalog, so a datasource of that name could never be opened by name.
281284

282285
<Callout type="warn">
283286
`OS_ALLOW_DRIVER_CONNECT_FAILURE=1` boots anyway, in an explicitly degraded

‎packages/services/service-datasource/src/datasource-admin-service.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1401,7 +1401,8 @@ export class DatasourceAdminService implements IDatasourceAdminService {
14011401
throw new Error(
14021402
`Datasource name 'default' is reserved for the host's primary datasource. Pick another name.`,
14031403
);
1404-
} // Route-shadowed names (#29164): a literal the admin registrar mounts beside
1404+
}
1405+
// Route-shadowed names (#29164): a literal the admin registrar mounts beside
14051406
// a same-method `/datasources/:name` route captures that path first, so a
14061407
// datasource of that name could never be read through its by-name door
14071408
// (`GET /datasources/drivers` is the driver catalog, not the edit form's

0 commit comments

Comments
 (0)