Skip to content

control-plane: add enabled flag to data planes#3175

Draft
GregorShear wants to merge 1 commit into
masterfrom
greg/data-plane-enabled
Draft

control-plane: add enabled flag to data planes#3175
GregorShear wants to merge 1 commit into
masterfrom
greg/data-plane-enabled

Conversation

@GregorShear

Copy link
Copy Markdown
Contributor

What

Adds an enabled boolean flag to data planes and lets the dataPlanes GraphQL query filter on it.

  • DB: new data_planes.enabled column, boolean NOT NULL DEFAULT true. Existing planes stay enabled. Includes a SELECT (enabled) grant to authenticated (matching the dekaf_address migration).
  • GraphQL: exposes enabled: Boolean! on the DataPlane type, and adds an optional enabled: Boolean argument to the dataPlanes query. Omitting the argument returns both enabled and disabled planes; passing true/false narrows to matching planes.

Why

Gives operators a way to retire a data plane from new selection without deleting its record — a disabled plane keeps serving existing tasks but can be filtered out of listings.

Notes

  • The enabled flag lives in the database, not the authorization snapshot, so the filter resolves the matching name set from the DB and is applied before pagination, keeping page sizes and cursors correct.
  • The unauthenticated publicDataPlanes query (pre-signup plane selection) is intentionally left unchanged; filtering disabled planes out of new-signup selection would be a natural follow-up if desired.

Test plan

  • New test_graphql_data_planes_enabled_filter covers all three cases (no argument → both planes; enabled: true → enabled only; enabled: false → disabled only).
  • cargo test -p control-plane-api data_planes → 15/15 pass.
  • Regenerated the sqlx offline cache and the flow-client SDL.

@GregorShear
GregorShear force-pushed the greg/data-plane-enabled branch from 2973822 to 7da68b3 Compare July 15, 2026 14:07
Adds an `enabled` boolean column to the `data_planes` table (default true) so operators can retire a data plane from new selection without deleting its record: a disabled plane keeps serving existing tasks but is filtered out of listings that opt in.

Exposes `enabled` on the GraphQL `DataPlane` type and adds an optional `filter` argument to the `dataPlanes` query, following the `inviteLinks`/`alertConfigs` filter pattern: a `DataPlanesFilter` input object whose `enabled` field reuses the shared `filters::BoolFilter`. Because the flag lives in the database rather than the authorization snapshot, the filter resolves the matching name set and is applied before pagination so page sizes and cursors remain correct.
@GregorShear
GregorShear force-pushed the greg/data-plane-enabled branch from 7da68b3 to 2fb5f6d Compare July 15, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant