Skip to content

feat(cli): add deploy-config generator for plugin resources (no callers yet) - #519

Draft
MarioCadenas wants to merge 1 commit into
feat/registry-env-reconcilefrom
feat/registry-config-gen
Draft

feat(cli): add deploy-config generator for plugin resources (no callers yet)#519
MarioCadenas wants to merge 1 commit into
feat/registry-env-reconcilefrom
feat/registry-config-gen

Conversation

@MarioCadenas

Copy link
Copy Markdown
Collaborator

Stack 4/7 — base: `feat/registry-env-reconcile`

What

Standalone module reproducing what `databricks apps init` renders for resource bindings, verified byte-for-byte against golden fixtures captured from a real scaffold on dogfood.

  • `config-plan`: manifest resources → `app.yaml` env (`valueFrom`=resourceKey) + `databricks.yml` bundle variables & resource bindings. Per-type binding specs for verified types (`sql_warehouse`, `postgres`).
  • `config-writer`: comment-preserving additive YAML patch via the `yaml` package (never clobbers; idempotent) + `databricks bundle validate` post-write gate.
  • Unverified resource types emit env entries but skip the databricks.yml binding with a warning rather than guess an unverified shape.
  • `fixtures/`: analytics + lakebase configs captured from `databricks apps init`.
  • Adds `yaml` dep to `packages/shared`.

Note for isolated review

`validateBundle`/`reportConfigWrite` are first used in stack 5/7 — no callers yet here (intentional stack seam).

Tests

11 tests incl. byte-exact fixture comparison and idempotency.

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

…rs yet)

Standalone module reproducing what 'databricks apps init' renders, verified
byte-for-byte against golden fixtures captured from a real scaffold:

- config-plan: manifest resources -> app.yaml env (valueFrom=resourceKey),
  databricks.yml bundle variables + resource bindings. Per-type binding specs
  for the verified types (sql_warehouse, postgres). Platform-origin fields are
  excluded from app.yaml env (platform-injected at deploy).
- config-writer: comment-preserving additive YAML patch via the 'yaml' package
  (never clobbers existing entries; idempotent), plus a 'databricks bundle
  validate' post-write gate.
- Unverified resource types emit env entries but skip the databricks.yml
  binding with a warning rather than guessing.
- __fixtures__/: analytics + lakebase configs captured from 'databricks apps
  init' as golden ground truth.
- Adds 'yaml' dependency to packages/shared. 11 tests incl. byte-exact
  fixture comparison and idempotency.

Wired into 'appkit add' in the follow-up commit.

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