Repository navigation
Conversation
ditadi
force-pushed
the
stack/database-dev-flow/07-apps-init
branch
from
October 20, 2026 09:20
07b1748 to
7db9fa1
Compare
ditadi
force-pushed
the
stack/database-dev-flow/07-apps-init
branch
from
October 20, 2026 12:22
7db9fa1 to
81e2e8f
Compare
Contributor
🤖 AppKit PR bot🔬 Run evalsStart an eval for this PR from the evals-monitor app: Go to Evals Monitor → 📦 Try this PR's app templateScaffolds a new app from this PR's SDK build. Run it in any folder (requires the GitHub CLI — gh run download 45843180927 -R databricks/appkit -n appkit-template-0.105.0-pr.734b8dd-stack-database-dev-flow-07-apps-init-675 -D appkit-pr-675 \
&& unzip -o "appkit-pr-675/appkit-template-0.105.0-pr.734b8dd-stack-database-dev-flow-07-apps-init-675.zip" -d "appkit-pr-675" \
&& databricks apps init --template "appkit-pr-675"The template pins |
This was referenced Oct 20, 2026
Draft
Contributor
📦 Bundle size reportCompared against
|
| dist | raw | gzip |
|---|---|---|
| JS (runtime) | 1.6 MB (-30 KB) | 575 KB (-12 KB) |
| Type declarations | 495 KB (-8.6 KB) | 179 KB (-3.8 KB) |
| Source maps | 3.1 MB (-56 KB) | 1.0 MB (-21 KB) |
| Other | 11 KB | 3.7 KB |
| Total | 5.2 MB (-95 KB) | 1.8 MB (-37 KB) |
Per-entry composition (own code — deps external (as shipped))
| Entry | Initial (gz) | Lazy (gz) | Total (gz) | node_modules (min) | Own code (min) |
|---|---|---|---|---|---|
. |
118 KB (+5 B) | 2.4 KB | 121 KB (+5 B) | external | 378 KB (+7 B) |
./beta |
127 KB (+252 B) | 4.6 KB (+5 B) | 132 KB (+257 B) | external | 383 KB (+821 B) |
./beta/database-tooling |
62 KB (+243 B) | 0 B | 62 KB (+243 B) | external | 187 KB (+1.0 KB) |
./testing |
47 KB (+3 B) | 38 KB (+4 B) | 85 KB (+7 B) | external | 246 KB (+7 B) |
./tsdown |
630 B | 0 B | 630 B | external | 1.0 KB |
./type-generator |
31 KB (+5 B) | 0 B | 31 KB (+5 B) | external | 89 KB (+7 B) |
Chunks:
| Entry | Chunk | Load | Size (gz) |
|---|---|---|---|
. |
index.js |
initial | 114 KB |
. |
utils.js |
initial | 4.6 KB |
. |
remote-tunnel-manager.js |
lazy | 2.4 KB |
./beta |
beta.js |
initial | 101 KB |
./beta |
stream-manager.js |
initial | 5.9 KB |
./beta |
define-schema.js |
initial | 5.9 KB |
./beta |
service-context.js |
initial | 4.3 KB |
./beta |
modular.js |
initial | 3.6 KB |
./beta |
databricks.js |
initial | 3.3 KB |
./beta |
wide-event-emitter.js |
initial | 2.8 KB |
./beta |
client.js |
initial | 645 B |
./beta |
index.js |
initial | 20 B |
./beta |
index.js |
lazy | 4.1 KB |
./beta |
supervisor-api.js |
lazy | 201 B |
./beta |
databricks.js |
lazy | 188 B |
./beta |
index.js |
lazy | 124 B |
./beta/database-tooling |
index.js |
initial | 62 KB |
./testing |
manifest.js |
initial | 33 KB |
./testing |
index.js |
initial | 10 KB |
./testing |
wide-event-emitter.js |
initial | 2.9 KB |
./testing |
index.js |
lazy | 34 KB |
./testing |
remote-tunnel-manager.js |
lazy | 2.4 KB |
./testing |
utils.js |
lazy | 1.8 KB |
./tsdown |
index.js |
initial | 630 B |
./type-generator |
index.js |
initial | 31 KB |
@databricks/appkit-ui
npm tarball (packed): 393 KB — gzipped download (dist + bin; excludes release-only docs/NOTICE).
| dist | raw | gzip |
|---|---|---|
| JS (runtime) | 430 KB | 146 KB |
| Type declarations | 250 KB | 93 KB |
| Source maps | 837 KB | 281 KB |
| CSS | 16 KB | 3.2 KB |
| Total | 1.5 MB | 522 KB |
Per-entry composition (consumer bundle — deps bundled, peerDeps external)
| Entry | Initial (gz) | Lazy (gz) | Total (gz) | node_modules (min) | Own code (min) |
|---|---|---|---|---|---|
./js |
5.3 KB | 49 KB | 55 KB | 208 KB | 14 KB |
./js/beta |
2.4 KB | 0 B | 2.4 KB | 0 B | 5.3 KB |
./react |
441 KB | 49 KB | 489 KB | 1.4 MB | 180 KB |
./react/beta |
13 KB | 0 B | 13 KB | 25 KB | 13 KB |
Chunks:
| Entry | Chunk | Load | Size (gz) |
|---|---|---|---|
./js |
index.js |
initial | 5.2 KB |
./js |
chunk |
initial | 120 B |
./js |
apache-arrow |
lazy | 49 KB |
./js/beta |
beta.js |
initial | 2.4 KB |
./react |
index.js |
initial | 439 KB |
./react |
tslib |
initial | 2.1 KB |
./react |
apache-arrow |
lazy | 49 KB |
./react/beta |
beta.js |
initial | 13 KB |
ditadi
added a commit
that referenced
this pull request
Oct 30, 2026
The design doc promised behavior the corrected stack does not ship. It now describes what the code does: - The tooling export is @databricks/appkit/beta/database-tooling, beta and internal to the AppKit CLI. - migrate, introspect, clean and init hold config/database/.appkit-db.lock. init holds one lock for its whole run, and init --schema none, seed, verify and clean --delete-branch take none. The doc says how to recover a stale lock file. - init --schema none hands off nothing, and schema public is never handed off. - Values in variable-overrides.json count for the deploy boundary, and an unresolved branch or database reference refuses every write. - Introspect keeps .private() on declared columns, writes new columns private, and refuses a schema.ts that does not load or a foreign key it does not declare. - verify --deployed compares the committed migrations with the source snapshot of the active deployment, and fails when it cannot read it. - Migrations log one line per run. There is no span and no metric. - #675 keeps the plugin and appkit db hidden. A reveal is a later, separate change. The appkit db check section stays as it is until #678 settles. Signed-off-by: ditadi <victordperd@gmail.com>
Apps scaffolded with the database plugin get what the flow needs to deploy
their migrations. The plugin stays hidden: the manifest keeps hidden: true,
template/appkit.plugins.json does not list it, and `appkit db` stays hidden
from `appkit --help`.
What ships:
- APPKIT_DB_MIGRATE_ON_START=true in app.yaml for apps that select the
plugin, and a comment that keeps the /health check.
- process.exit(1) when createApp fails, for every app the template renders,
so a failed start stops the app instead of serving without its routes.
- A schema.ts comment that points at `appkit db migrate`, and a README that
walks through `appkit db init`, `migrate`, `verify`, deploy and the
`appkit db check` CI step, and works before the CLI release.
- bundleIgnore on the plugin's Lakebase project field, and the smoke test's
handling of `{{- if or ...}}` blocks.
- The plugin docs' note on what a scaffolded app includes.
- The design doc's Rollout Plan and PR Stack for the three PRs that ship
the flow.
Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: ditadi <victordperd@gmail.com>
…ery plugin
tools/smoke-test-template.ts stripped every `{{- if or .appEnv .plugins.*}}`
block before its `.plugins.*` pass, even under --all-plugins. The rendered
app.yaml then put `- name: APPKIT_DB_MIGRATE_ON_START` under health_check
with no env key, which is not valid YAML.
Under --all-plugins, an `if or` that names a plugin now keeps its content.
A tools test scaffolds the template both ways and parses app.yaml: with
--all-plugins it has env with APPKIT_DB_MIGRATE_ON_START, without it has
no env.
Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: ditadi <victordperd@gmail.com>
…ionals from one table The health-check note in app.yaml.tmpl and the usage note in the scaffolded schema.ts are gone. README.md.tmpl and the plugin doc carry the same content, and the app.yaml note rendered into every app, with or without the plugin. The smoke test's three copies of the strip-a-conditional block are one table of named patterns run by one loop. It scaffolds byte-identical output with and without --all-plugins. The design doc's Background and Flag Strategy name the three PRs, #654, #666 and #675, instead of the closed ones. Migrations on deploy says again that scaffolded apps set APPKIT_DB_MIGRATE_ON_START, which holds once this PR ships the template. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: ditadi <victordperd@gmail.com>
ditadi
changed the base branch from
stack/database-dev-flow/06-db-verify
to
stack/database-dev-flow/03-db-migrate
November 26, 2026 14:51
ditadi
force-pushed
the
stack/database-dev-flow/07-apps-init
branch
from
November 26, 2026 14:51
7aa8416 to
2032d58
Compare
This branch has not been deployed
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.
Stacked on #666. The design is #677.
This PR absorbs no other PR. It is the template half of the old #675. The rest of #675 moved to #654 (the ownership recovery hint) and #666 (the
verifywarning and the development-flow docs).What did you change, and why?
Before
databricks apps initcan offer the database plugin, a scaffolded app has to come with what the flow needs, so a developer can follow its README fromappkit db initto a deploy that applies the migrations. This PR adds that to the template, still behind the hidden plugin.For an app that selects the plugin, the template now renders:
app.yamlwithAPPKIT_DB_MIGRATE_ON_START=trueinenv, so the deployed app applies its committed migrations on start (feat(appkit): apply committed database migrations on deploy start, in schema app by default #654).appkit db init,migrateandverify, committing the migrations, what the deploy waits for, adopting existing tables withinit --schema introspect,cleanandseed, and theappkit db checkstep in CI. After the production deploy it addsnpx appkit db verify --deployed -t prod.config/database/schema.tswithout main's comment that says to create the tables before you declare them. The README and the plugin docs now cover the file.For every app,
server/server.tscallsprocess.exit(1)whencreateAppfails, so a failed migration stops the app instead of leaving it up without routes.This PR also changes these files:
projectfield setsbundleIgnore, so the project goes to.envand gets nodatabricks.ymlvariable.bundle-size-baseline.jsonrecords the 27 bytes it adds.tools/smoke-test-template.tskeeps the content of an{{- if or ...}}block that names a plugin under--all-plugins. Before, it dropped theenv:key and left the flag underhealth_check, which is not valid YAML. Its three copies of the conditional-stripping code are now one table run by one loop.What this PR does not do:
hidden: true,template/appkit.plugins.jsondoes not list it, andbeta.tsstill exportsdatabaseby hand. Soapps initscaffolds no app with the database blocks yet, and only theprocess.exit(1)change reaches new apps. Offering the plugin is a later, separate change.appkit dbstays hidden fromappkit --help.appkit db initinstalls it.How do you know it works?
tools/smoke-test-template.test.tsscaffolds the real template and parsesapp.yaml. With--all-plugins,envhasAPPKIT_DB_MIGRATE_ON_START, and without plugins there is noenv. Before the fix, the--all-pluginscase failed withYAMLParseError: A block sequence may not be used as an implicit map key at line 8.--all-plugins.pnpm build,pnpm -r typecheck,pnpm check,pnpm test(386 files and 7219 tests passed, 1 skipped, the 2 new tests included),CI=1 pnpm exec vitest run packages/shared/src/cli/commands/db(5 files, 66 tests) andpnpm docs:buildpassed. The template smoke scaffolded with and without--all-plugins. They ran one commit before a two-line fix to the design doc's Flag Strategy table and PR Stack, and the head differs from that commit only in those lines.--run, which installs the published appkit and so would not test this tree. CI runs the smoke with--run, with and without--all-plugins.throw,warn,info,okorfailcall changed.appkit dbchanges, and those lines are fixed. The cleanup reviewer found nothing.This revision was not run against a real Lakebase workspace, and
app.yaml.tmplwas not rendered with Gotext/template. The smoke script renders the conditionals with regular expressions. The design's done criterion for this PR, a throwaway app that follows only its README fromappkit db initto a deploy that applies the migration, is still open.This pull request and its description were written by Isaac.