Skip to content

finding: the datasource-admin lifecycle family has no SDK expression — decide server-only vs gap #7954

Description

@hotlong

Symptom

Surfaced while ledgering the datasource-admin route family for #7744.

ObjectStackClient reaches none of the ten routes registerDatasourceAdminRoutes mounts under /api/v1/datasources. Its datasources namespace contains exactly one sub-namespace, external, whose five methods all target the federation family in @objectstack/rest (/:name/external/…, ledgered in packages/rest/src/rest-route-ledger.ts). The CLI is the same story: its three datasource commands (introspect, list-tables, validate) all call /external/*.

So the whole runtime datasource lifecycle — list, read, create, patch, remove, connection probe, driver catalog — is reachable only by the Setup/Studio console and by one declared metadata-type action (test_connection).

The decision this needs

The new packages/services/service-datasource/src/datasource-route-ledger.ts records all ten rows as server-only, on the grounds that:

  • the family is mounted by objectstack serve (a CLI-composed plugin registering on http.server), not by @objectstack/rest, so it is not part of the platform's advertised SDK composition; and
  • its actual consumers are the console and a metadata-type action.

That classification is defensible but it is the conservative reading, chosen deliberately: writing ten gap rows instead would have been a product decision — "the SDK should be able to manage datasources" — made inside a bookkeeping fix. The ledger vocabulary forces one of the two, and this issue is where the choice should actually be reviewed.

If the answer is "yes, the SDK should express datasource lifecycle", the rows become gap (and the ledger's gap ratchet, currently pinned at 0, moves with them) until the client methods land. If the answer is "no", the current server-only rows are already correct and this can close as documented-by-the-ledger.

Source

Extracted from #7744 (route-ledger parity for the datasource-admin family).

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions