-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Issue 1: apps init — Go template markers not rendered in scaffolded files
Title: apps init: Go template markers not rendered in scaffolded files
Description
When running databricks apps init --features analytics --warehouse-id <ID> --name <NAME> --run none, the scaffolded project contains raw Go template markers instead of rendered values in multiple files.
Affected Files
package.json— contains{{.projectName}}and{{.appDescription}}instead of actual valuesclient/src/App.tsx— contains{{if .plugins.analytics}},{{if .plugins.genie}}, etc.client/src/pages/analytics/AnalyticsPage.tsx— wrapped in{{if .plugins.analytics}}...{{end}}client/src/pages/genie/GeniePage.tsx— wrapped in{{if .plugins.genie}}...{{end}}client/src/pages/lakebase/LakebasePage.tsx— wrapped in{{if .plugins.lakebase}}...{{end}}server/server.ts— contains{{range}}loops instead of rendered plugin imports
Steps to Reproduce
databricks apps init \
--description "Test app" \
--features analytics \
--warehouse-id <any-valid-id> \
--name test-app \
--run none \
--profile DEFAULTThen inspect any of the files listed above — they contain Go template syntax instead of rendered TypeScript/JSON.
Expected Behavior
All Go template markers should be processed during apps init. The resulting files should be valid TypeScript/JSON with:
{{.projectName}}replaced with the app name{{.appDescription}}replaced with the description- Conditional blocks resolved based on
--featuresselection - Only relevant plugin pages/imports included
Environment
@databricks/appkit: 0.15.0- Databricks CLI: latest
- Platform: macOS (Apple Silicon)
Issue 2: apps init — config/queries/ directory not created with --features analytics
Title: apps init: config/queries directory not created with --features analytics
Description
When scaffolding a project with --features analytics, the config/queries/ directory is not created, and the sample SQL query files (hello_world.sql, mocked_sales.sql) referenced by the template AnalyticsPage.tsx are missing.
This causes:
npm run typegenwarns "No queries found" and skips type generationappKitTypes.d.tsis not generated- Build fails with TypeScript errors in
AnalyticsPage.tsxbecause query result types default to{}
Steps to Reproduce
databricks apps init \
--description "Test app" \
--features analytics \
--warehouse-id <any-valid-id> \
--name test-app \
--run none \
--profile DEFAULT
cd test-app
npm run typegen # warns: No queries found
npm run build # fails: Type 'unknown' is not assignable to type 'ReactNode'Expected Behavior
apps init should create config/queries/ with the SQL files that AnalyticsPage.tsx references:
config/queries/hello_world.sql—SELECT :message AS valueconfig/queries/mocked_sales.sql— sample sales data query
Environment
@databricks/appkit: 0.15.0- Databricks CLI: latest
- Platform: macOS (Apple Silicon)