Skip to content

feat(cli): drill-down workspace picker for parent-context resource types - #522

Draft
MarioCadenas wants to merge 1 commit into
feat/registry-picker-flatfrom
feat/registry-picker-parent
Draft

feat(cli): drill-down workspace picker for parent-context resource types#522
MarioCadenas wants to merge 1 commit into
feat/registry-picker-flatfrom
feat/registry-picker-parent

Conversation

@MarioCadenas

Copy link
Copy Markdown
Collaborator

Stack 7/7 — base: `feat/registry-picker-flat`

What

Chained picker for the 4 resource types that need parent context before instances can be listed:

  • volume, uc_function: catalog → schema → resource

  • secret: scope → key

  • vector_search_index: endpoint → index

  • `PARENT_CONTEXT_CHAINS` declares each type's drill-down as ordered steps; each step builds its list command from prior picks. Uses positional-arg CLI form (`databricks schemas list `, `volumes list `).

  • The env provider walks the chain via clack selects, falling back to free-text on cancel, empty level, or "Enter manually" at any step.

  • Extracted `runList` so flat and drill-down share JSON parsing + failure handling.

Tests

14 tests: depth, positional args, each chain.

Final PR of the resource-aware `appkit add` stack (7/7).

Adds the chained picker for the 4 resource types that need parent context
before their instances can be listed:
- volume, uc_function: catalog -> schema -> resource
- secret: scope -> key
- vector_search_index: endpoint -> index

- PARENT_CONTEXT_CHAINS declares each type's drill-down as ordered steps; each
  step builds its list command from prior picks. Positional-arg CLI form is
  used (databricks schemas list <CATALOG>, volumes list <CAT> <SCHEMA>, etc.).
- The env provider walks the chain interactively via clack selects, falling
  back to free-text on cancel, empty level, or 'Enter manually' at any step.
- Extracted runList so flat and drill-down share JSON parsing + failure
  handling. 14 new tests for depth, positional args, and each chain.

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