Commit 395c4a2
committed
feat(appkit): introduce workspace-client wrapper over the Databricks SDK
Add packages/appkit/src/workspace-client/ — a facade over the legacy
@databricks/sdk-experimental client that mirrors the modular Databricks
SDK's multi-client shape. This prepares the library for an incremental,
per-service migration to the modular SDK without migrating anything yet.
- legacy.ts is the ONLY module importing @databricks/sdk-experimental;
it constructs the client and re-exports the SDK symbols AppKit uses.
- The WorkspaceClient facade exposes per-service accessors (files,
warehouses, genie, jobs, statementExecution, servingEndpoints,
currentUser, config, apiClient), each legacy-typed and delegating to
the underlying client. Migrating a service later is a localized swap:
one getter + its accessor type + one connector.
- createWorkspaceClient() replaces every `new WorkspaceClient(...)` site
(runtime + build-time type-generator); toLegacyWorkspaceClient() is the
escape hatch for @databricks/lakebase.
- createApp({ client }) and the public index now expose the wrapper type
instead of the raw SDK client.
- A Biome noRestrictedImports boundary rule forbids importing
@databricks/sdk-experimental outside workspace-client/, keeping the seam
enforceable. Tests mock the wrapper rather than the SDK.
Time is sourced off the SDK namespace (SDK.Time ?? SDK.default.Time)
because the SDK's CommonJS `Time` export is a getter that defeats Node's
static ESM named-export detection — a direct `export { Time }` throws at
link time.
Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>1 parent affe5d2 commit 395c4a2
77 files changed
Lines changed: 877 additions & 206 deletions
File tree
- docs/docs/api/appkit
- packages/appkit/src
- agents
- tests
- cache
- tests
- connectors
- files
- tests
- genie
- tests
- jobs
- serving
- tests
- sql-warehouse
- vector-search
- context
- tests
- core
- tests
- internal-telemetry
- tests
- plugins
- analytics
- files
- tests
- jobs
- tests
- lakebase
- tests
- plugin/tests
- stream
- tests
- type-generator
- mv-registry
- serving
- tests
- tests
- workspace-client
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
44 | 60 | | |
45 | 61 | | |
46 | 62 | | |
| |||
56 | 72 | | |
57 | 73 | | |
58 | 74 | | |
59 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
60 | 88 | | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
246 | 247 | | |
247 | 248 | | |
248 | 249 | | |
249 | | - | |
| 250 | + | |
250 | 251 | | |
251 | | - | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
| 254 | + | |
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
413 | 411 | | |
414 | 412 | | |
415 | 413 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
999 | 999 | | |
1000 | 1000 | | |
1001 | 1001 | | |
1002 | | - | |
1003 | | - | |
1004 | | - | |
1005 | | - | |
1006 | | - | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
1007 | 1012 | | |
1008 | 1013 | | |
1009 | 1014 | | |
| |||
0 commit comments