Skip to content

feat(cli): live workspace picker for flat resource types on add - #521

Draft
MarioCadenas wants to merge 1 commit into
feat/registry-parity-wirefrom
feat/registry-picker-flat
Draft

feat(cli): live workspace picker for flat resource types on add#521
MarioCadenas wants to merge 1 commit into
feat/registry-parity-wirefrom
feat/registry-picker-flat

Conversation

@MarioCadenas

Copy link
Copy Markdown
Collaborator

Stack 6/7 — base: `feat/registry-parity-wire`

What

  • New `workspace-picker` module lists real workspace resources via `databricks list -o json` (spawn, no SDK) for the 8 flat-listable types (sql_warehouse, job, serving_endpoint, uc_connection, database, genie_space, experiment, app).
  • The `.env` value provider offers a clack select of real resources for these types, with an "Enter manually" escape. Degrades to free-text on any failure (no profile, offline, auth error, empty list) — never hard-fails.
  • Profile from `--profile`, else the CLI's active default. id/label fields mapped per type (job→job_id, genie→space_id, experiment→experiment_id, …).

Tests

15 tests with the CLI runner injected: choice parsing, wrapper unwrap, numeric-id coercion, profile passthrough, all failure paths.

Verify before merge

Picker paths are unit-tested with mocked spawn — worth one manual `appkit add analytics` on dogfood.

Part of the resource-aware `appkit add` stack (6/7).

- New workspace-picker module lists real workspace resources via
  'databricks <group> list -o json' (spawn, no SDK) for the 8 flat-listable
  types (sql_warehouse, job, serving_endpoint, uc_connection, database,
  genie_space, experiment, app).
- The .env value provider now offers a clack select of real resources for
  these types, with an 'Enter manually' escape. Degrades to free-text on any
  failure (no profile, offline, auth error, empty list) — never hard-fails.
- Profile resolved from --profile, else the CLI's active default. id/label
  fields mapped per type (job->job_id, genie->space_id, experiment->
  experiment_id, etc.).
- 15 tests with the CLI runner injected (choice parsing, wrapper unwrap,
  numeric-id coercion, profile passthrough, all failure paths).

Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
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