Lakebase DX: a native-search helper, grants bootstrap, and graduating proven cookbook patterns
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- fastapi, postgresql, python, typescript
Research direction
Start by confirming the Lakebase Search GA/interface internally, then compare the proposed shape with AppKit’s existing ai-search helper. Review the cookbook’s migrations_runner.py and apps/lakebase-fastapi pattern, along with the proposed lakebase({ branch }) entry point, before splitting the request into scoped contributions. Done should be a maintainer-approved scope for search, grants, migrations, reusable scaffolding, and branch selection.
Written by the indexing model from the issue text.
Description
Field feedback from building an app on @databricks/appkit 0.66.1 + Lakebase. First, credit where it's due — these saved real work: the Lakebase plugin's auto OAuth refresh, asUser(req) OBO per-user pools, and exposeAsAgentTool (read-only SQL classifier). And ai-search is great for Databricks Vector Search.
The gaps below are all Lakebase-specific. Each is verified against 0.66.1; happy to contribute PRs.
1. A lakebaseSearch() helper (Lakebase-native BM25 + vector ANN)
ai-search targets Vector Search (managed indexes), not Lakebase's native lakebase_bm25 + lakebase_ann (halfvec) indexes. There's no helper for those, so devs write raw SQL and hit avoidable traps:
- the bm25
regclassresolves againstsearch_path, so from an app you must schema-qualify it (to_bm25query(..., 'app.providers_bm25')) or getrelation "providers_bm25" does not exist; plainto_tsquery, notto_tsquery(the latter crashes on multi-word input);halfvec(1024)cosine +ai_query('databricks-gte-large-en', text)embeddings.
Proposed API, mirroring ai-search's shape but pointing at Lakebase indexes:
lakebaseSearch({
indexes: { providers: { table: "app.providers", bm25Index: "app.providers_bm25",
annIndex: "app.providers_ann", textColumn: "search_tsv",
embeddingColumn: "embedding", mode: "hybrid" } }
})
// appkit.lakebaseSearch.query("providers", { text: "home health", numResults: 5 })
(Worth confirming Lakebase Search GA/interface internally before building.)
2. Service-principal grants bootstrap + a clear grant error
The app SP needs databricks_create_role(...) + explicit GRANTs; today that's manual copy-paste, and a missing grant surfaces as a generic permission denied. Proposal: a ensureServicePrincipalGrants(spClientId, { schema, tables }) helper (+ an optional apps init grants.sql scaffold), and map Postgres permission denied → "the app SP lacks GRANT X on Y".
3. Graduate proven Lakebase patterns from the cookbook into AppKit
databricks-solutions/lakebase-cookbook already has battle-tested code for these — the ask is to bring them into the toolkit:
- Migrations: an
appkit migratewrapping the cookbook's checksum/driftmigrations_runner.py, made multi-SP-ownership aware (CREATE INDEX IF NOT EXISTSstill fails if another SP owns the table). - Synced-read + writable-ops scaffold: the
apps/lakebase-fastapipattern (read-only synced mirror + writable ops table + derive-state-by-join) as a reusable helper/template. - Dev-branch selection: a
lakebase({ branch })config so an app targets a dev branch vsproductionwithout hand-editing endpoint paths.
- Dominant language
- TypeScript
- Stars
- 119
- Forks
- 36
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 37
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from databricks/appkit
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
databricks/appkit#729 ·
Maintainers usually reply within 3 days
-
@databricks/lakebase: pool drops maxLifetimeSeconds and other pg options, so connections never recycle and Unity Catalog claims access fails after 4 hoursPossibly taken @billmcmillin claimed this 5 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 20/100
databricks/appkit#718 ·
Maintainers usually reply within 3 days
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
databricks/appkit#699 ·
Maintainers usually reply within 3 days
-
Difficulty 3/5 Half a day Newbie friendliness 42/100
databricks/appkit#656 · 1 comment ·
Maintainers usually reply within 3 days
-
Difficulty 4/5 3-5 days Newbie friendliness 28/100
databricks/appkit#648 · 2 comments ·
Maintainers usually reply within 3 days
All issues in databricks/appkit
Similar issues
-
Add "append" and "prepend" slots for vue-vuetify extended renderersPossibly taken @simeyc claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
eclipsesource/jsonforms#2668 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
README の通知条件を実際の判定処理に合わせるPossibly taken @unhappychoice claimed this today. Openfactory:in-progress priority:medium
Difficulty 1/5 Under an hour Newbie friendliness 90/100
unhappychoice/oss-issue-opener#395 · 1 comment ·
Maintainers usually reply within 1 day
-
bug Website
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
OWASP/OWASP-Hunting#88 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day