Skip to content

feat(WIP): lakebase-apps-deploy lift (FEIP-7130)#49

Draft
kevin-hartman wants to merge 1 commit into
mainfrom
kevin.hartman/feip-7130-apps-deploy
Draft

feat(WIP): lakebase-apps-deploy lift (FEIP-7130)#49
kevin-hartman wants to merge 1 commit into
mainfrom
kevin.hartman/feip-7130-apps-deploy

Conversation

@kevin-hartman
Copy link
Copy Markdown
Collaborator

Draft. Slice 1 of 6 landed; subsequent slices push onto this branch.

Summary

First slice of the FEIP-7130 lift: move DeployService from lakebase-scm-extension into the kit as the lakebase-apps-deploy substrate domain. Slice 1 covers the deploy-targets.yaml parser + types. Subsequent slices (build phase, per-branch endpoint provision/teardown, OBO propagation, rollback, extension migration) land on this same branch.

Slice plan

Slice Surface Status
1 deploy-targets.yaml parser + types (substrate-clean API) ✅ pushed (88faff9)
2 deploy entrypoint: build phase + app.yaml generation pending
3 per-branch app endpoint provision (paired with createPairedBranch) pending
4 per-branch app endpoint teardown (paired with deletePairedBranch) pending
5 OBO / credential propagation through single seam pending
6 rollback on failed deploy + extension migration PR pending

What's in slice 1

  • scripts/lakebase/deploy-targets.ts (new) — DeployTarget + DeployTargetsConfig types, parseTargetsYaml, readTargets, writeTargets, getTargetNames. workspaceRoot is a required arg (no getWorkspaceRoot fallback). The deploy-targets.yaml file format is unchanged.
  • tests/bdd/deploy-targets.test.ts (new) — 12 tests covering parse / read / write / round-trip / optional-field emission / file-missing / empty-targets / comments + quoted values.

Why a regex parser (not js-yaml)

The deploy-targets.yaml file has a fixed two-level structure (targets → name → key: value). A regex-based parser keeps the kit's dependency surface small. This is what the extension shipped with originally; this PR lifts the same parser behind a substrate-friendly API.

Test plan

  • npm run typecheck clean
  • npx vitest run tests/bdd/deploy-targets.test.ts — 12/12
  • npm test (full suite) — 359 passed, 44 pre-existing skipped, 0 failed
  • npm run build — clean
  • slice 2 (deploy entrypoint + app.yaml)
  • slice 3 (per-branch endpoint provision)
  • slice 4 (per-branch endpoint teardown)
  • slice 5 (OBO propagation)
  • slice 6 (rollback + extension migration)

Composition

This pull request and its description were written by Isaac.

First slice of the lakebase-apps-deploy lift. Moves DeployService.{parse,
read,write}TargetsYaml + getTargetNames + the DeployTarget /
DeployTargetsConfig type defs from the lakebase-scm-extension into the
kit at scripts/lakebase/deploy-targets.ts. The substrate version drops
VS Code dependencies (workspaceRoot becomes a required arg; no
getWorkspaceRoot fallback) so the same parser is callable from any
host (the extension, the kit's own CLIs, agent skills, CI scripts).

The deploy-targets.yaml format is unchanged. Layout: targets → target_name
→ key: value; two-level indent, regex-based parser (no full YAML
dependency — the file structure is fixed). Optional fields (uc_*,
lakebase_secret_*, ai_model) are only emitted on write when set.

Slice 2 (deploy entrypoint + app.yaml generation) consumes this. Slice
6 will flip the extension's local DeployService import to the substrate
package.

Tests
- tests/bdd/deploy-targets.test.ts: 12 tests covering minimal + full
  parsing, multiple targets, comments + blank lines, quoted values,
  empty-targets input, file-missing readTargets, write/read round-trip,
  optional-field emission, getTargetNames.

Co-authored-by: Isaac
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