Skip to content

fix(appkit): exclude lakebase postgres.project from the bundle - #554

Merged
pkosiec merged 1 commit into
mainfrom
fix/generate-app-templates-lakebase-project
Aug 26, 2026
Merged

fix(appkit): exclude lakebase postgres.project from the bundle#554
pkosiec merged 1 commit into
mainfrom
fix/generate-app-templates-lakebase-project

Conversation

@pkosiec

@pkosiec pkosiec commented Aug 26, 2026

Copy link
Copy Markdown
Member

project on the lakebase postgres resource is a discovery-only field. AppKit's
discovery walks project → branch → database (listing branches needs a project),
but the branch/database values it picks are already fully-qualified names that
embed the project — so project never needs to go into the app bundle.

databricks apps init ignores the manifest's discovery blocks, so it treated
project as a normal bundle field: it declared an unused postgres_project
variable, and non-interactive generation (--set) failed with

incomplete resource "postgres": missing fields [postgres.project]

Marking project as bundleIgnore (like endpointPath) keeps it available for
discovery but drops it from the bundle. Regenerating the appkit-* app templates
now works with just branch/database and no stray variable.

This pull request and its description were written by Isaac.

@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

🤖 AppKit PR bot

🔬 Run evals

Start an eval for this PR from the evals-monitor app: Go to Evals Monitor →

📦 Try this PR's app template

Scaffolds a new app from this PR's SDK build. Run it in any folder (requires the GitHub CLI — gh auth login — and the Databricks CLI):

gh run download 32965605615 -R databricks/appkit -n appkit-template-0.65.0-pr.4e05986-fix-generate-app-templates-lakebase-project-554 -D appkit-pr-554 \
  && unzip -o "appkit-pr-554/appkit-template-0.65.0-pr.4e05986-fix-generate-app-templates-lakebase-project-554.zip" -d "appkit-pr-554" \
  && databricks apps init --template "appkit-pr-554"

The template pins @databricks/appkit and @databricks/appkit-ui to tarballs built from this branch, so the scaffolded app runs against this PR's code.

The lakebase `postgres` resource's `project` field is a discovery-only
navigation input: appkit's discovery walks project -> branch -> database
(`databricks postgres list-branches` requires a project), but the selected
`branch`/`database` are already fully-qualified names that embed the project.
So `project` never needs to be written to the app bundle.

`databricks apps init` ignores the manifest `discovery` blocks and treated
`project` as a plain bundle field, which (a) declared an unused
`postgres_project` bundle variable and (b) made non-interactive generation via
`--set` fail with "incomplete resource postgres: missing fields
[postgres.project]" (the CLI requires all non-ignored fields of a multi-field
resource to be set together).

Mark `project` as `bundleIgnore` (like `endpointPath`) so it stays available
for discovery but is excluded from the bundle. Regenerating the appkit-* app
templates now works with just `branch`/`database` and no stray variable.

Signed-off-by: Pawel Kosiec <pawel.kosiec@databricks.com>
@pkosiec
pkosiec force-pushed the fix/generate-app-templates-lakebase-project branch from 8cde689 to 806055a Compare August 26, 2026 11:52
@pkosiec pkosiec changed the title fix(appkit): set postgres.project when generating app templates fix(appkit): exclude lakebase postgres.project from the bundle Aug 26, 2026
@pkosiec
pkosiec marked this pull request as ready for review August 26, 2026 11:54
@pkosiec
pkosiec requested a review from a team as a code owner August 26, 2026 11:54
@pkosiec
pkosiec requested a review from atilafassina August 26, 2026 11:54
@github-actions

Copy link
Copy Markdown
Contributor

📦 Bundle size report

Compared against bundle-size-baseline.json (main).

@databricks/appkit

npm tarball (packed): 984 KB (-84 KB) — gzipped download (dist + bin; excludes release-only docs/NOTICE).

dist raw gzip
JS (runtime) 1011 KB (-86 KB) 351 KB (-30 KB)
Type declarations 379 KB (-24 KB) 133 KB (-11 KB)
Source maps 2.0 MB (-184 KB) 662 KB (-60 KB)
Other 11 KB 3.7 KB
Total 3.3 MB (-294 KB) 1.1 MB (-102 KB)
Per-entry composition (own code — deps external (as shipped))
Entry Initial (gz) Lazy (gz) Total (gz) node_modules (min) Own code (min)
. 95 KB (+11 B) 2.5 KB 97 KB (+11 B) external 311 KB (+16 B)
./beta 65 KB (+2 B) 457 B 65 KB (+2 B) external 196 KB
./testing 17 KB 0 B 17 KB external 50 KB
./tsdown 520 B 0 B 520 B external 813 B
./type-generator 22 KB 0 B 22 KB external 65 KB

Chunks:

Entry Chunk Load Size (gz)
. index.js initial 91 KB
. utils.js initial 4.0 KB
. remote-tunnel-manager.js lazy 2.5 KB
./beta beta.js initial 49 KB
./beta stream-manager.js initial 5.8 KB
./beta wide-event-emitter.js initial 3.2 KB
./beta databricks.js initial 3.0 KB
./beta configuration.js initial 2.1 KB
./beta service-context.js initial 1.3 KB
./beta client.js initial 434 B
./beta client-options.js initial 220 B
./beta supervisor-api.js lazy 192 B
./beta databricks.js lazy 142 B
./beta index.js lazy 123 B
./testing index.js initial 17 KB
./tsdown index.js initial 520 B
./type-generator index.js initial 22 KB

@databricks/appkit-ui

npm tarball (packed): 348 KB (-8.1 KB) — gzipped download (dist + bin; excludes release-only docs/NOTICE).

dist raw gzip
JS (runtime) 394 KB (-17 KB) 132 KB (-5.4 KB)
Type declarations 228 KB (-4.2 KB) 83 KB (-1.3 KB)
Source maps 764 KB (-16 KB) 252 KB (-5.0 KB)
CSS 16 KB 3.2 KB
Total 1.4 MB (-37 KB) 471 KB (-12 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 20 B 0 B 20 B 0 B 0 B
./react 432 KB 49 KB 481 KB 1.3 MB 177 KB
./react/beta 1.0 KB 0 B 1.0 KB 0 B 1.9 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 20 B
./react index.js initial 430 KB
./react tslib initial 2.1 KB
./react apache-arrow lazy 49 KB
./react/beta beta.js initial 1.0 KB

@pkosiec
pkosiec merged commit cc78e27 into main Aug 26, 2026
10 of 12 checks passed
@pkosiec
pkosiec deleted the fix/generate-app-templates-lakebase-project branch August 26, 2026 12:06
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.

2 participants