Skip to content

feat(cli): add appkit doctor command#489

Draft
IamGalymzhan wants to merge 1 commit into
mainfrom
feat/doctor-command
Draft

feat(cli): add appkit doctor command#489
IamGalymzhan wants to merge 1 commit into
mainfrom
feat/doctor-command

Conversation

@IamGalymzhan

Copy link
Copy Markdown
Collaborator

No description provided.

Diagnose whether an AppKit app's declared Databricks resources are actually
usable, beyond the startup env-var check. Registered as `appkit doctor`.

Three layers per resource:
- auth: validate DATABRICKS_HOST, then currentUser.me() (once, app-wide)
- config: offline env-var presence check
- existence: live per-type probe — control-plane .get() for warehouse,
  serving, genie, job, volume, vector index, uc_function; a real SELECT 1
  connection for Lakebase/postgres. Errors are classified (NOT_FOUND,
  INVALID_VALUE, ACCESS_DENIED) with clean one-line messages, and the
  Lakebase auth-failure carries an OAuth/PGUSER hint.

Reaches the Databricks SDK / @databricks/appkit only through a runtime
import in databricks-client.ts, keeping the SDK-free shared package free of
the dependency and degrading gracefully when it is absent.

Output is a friendly list (errors first; plugin/type + reason shown only on
rows needing attention) or --json; exit code is non-zero on any error so it
can gate CI.

Signed-off-by: Galymzhan <zhangazy2004@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

🔬  Run evals on this PR  ·  Go to Evals Monitor →

@github-actions

Copy link
Copy Markdown
Contributor

📦 Bundle size report

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

✅ No size changes vs the baseline.

@databricks/appkit

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

dist raw gzip
JS (runtime) 783 KB 273 KB
Type declarations 284 KB 97 KB
Source maps 1.5 MB 510 KB
Other 11 KB 3.7 KB
Total 2.6 MB 883 KB
Per-entry composition (own code — deps external (as shipped))
Entry Initial (gz) Lazy (gz) Total (gz) node_modules (min) Own code (min)
. 85 KB 2.5 KB 88 KB external 279 KB
./beta 40 KB 231 B 40 KB external 119 KB
./type-generator 19 KB 0 B 19 KB external 54 KB

Chunks:

Entry Chunk Load Size (gz)
. index.js initial 81 KB
. utils.js initial 4.0 KB
. remote-tunnel-manager.js lazy 2.5 KB
./beta beta.js initial 30 KB
./beta databricks.js initial 5.8 KB
./beta service-context.js initial 3.2 KB
./beta client-options.js initial 220 B
./beta databricks.js lazy 128 B
./beta index.js lazy 103 B
./type-generator index.js initial 19 KB

@databricks/appkit-ui

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

dist raw gzip
JS (runtime) 350 KB 116 KB
Type declarations 201 KB 72 KB
Source maps 669 KB 218 KB
CSS 16 KB 3.3 KB
Total 1.2 MB 410 KB
Per-entry composition (consumer bundle — deps bundled, peerDeps external)
Entry Initial (gz) Lazy (gz) Total (gz) node_modules (min) Own code (min)
./js 4.3 KB 49 KB 54 KB 208 KB 12 KB
./js/beta 20 B 0 B 20 B 0 B 0 B
./react 428 KB 49 KB 476 KB 1.3 MB 163 KB
./react/beta 20 B 0 B 20 B 0 B 0 B

Chunks:

Entry Chunk Load Size (gz)
./js index.js initial 4.2 KB
./js chunk initial 120 B
./js apache-arrow lazy 49 KB
./js/beta beta.js initial 20 B
./react index.js initial 426 KB
./react tslib initial 2.1 KB
./react apache-arrow lazy 49 KB
./react/beta beta.js initial 20 B

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.

1 participant