feat(WIP): lakebase-apps-deploy lift (FEIP-7130)#49
Draft
kevin-hartman wants to merge 1 commit into
Draft
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First slice of the FEIP-7130 lift: move
DeployServicefromlakebase-scm-extensioninto the kit as thelakebase-apps-deploysubstrate domain. Slice 1 covers thedeploy-targets.yamlparser + types. Subsequent slices (build phase, per-branch endpoint provision/teardown, OBO propagation, rollback, extension migration) land on this same branch.Slice plan
deploy-targets.yamlparser + types (substrate-clean API)app.yamlgenerationcreatePairedBranch)deletePairedBranch)What's in slice 1
scripts/lakebase/deploy-targets.ts(new) —DeployTarget+DeployTargetsConfigtypes,parseTargetsYaml,readTargets,writeTargets,getTargetNames.workspaceRootis a required arg (nogetWorkspaceRootfallback). 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.yamlfile 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 typecheckcleannpx vitest run tests/bdd/deploy-targets.test.ts— 12/12npm test(full suite) — 359 passed, 44 pre-existing skipped, 0 failednpm run build— cleanComposition
APP_BASE_URLto.env.compareExperimentspayload references the same per-branch lifecycle this PR establishes.lakebase-feature-statussnapshot will surface endpoint status once slices 3–4 land.This pull request and its description were written by Isaac.