Skip to content

[BUG]: scripts/setup-lakebase.sh fails silently with current Databricks CLI #117

Description

@bevdam

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Running scripts/setup-lakebase.sh with a current Databricks CLI (v0.250+) exits 1 with no output at all. With bash -x you can see HOST= resolves empty and the script dies inside the _cfg helper before its own error guard can print.

Even if host/token resolution is patched locally, two further steps are broken against the current CLI/API:

  1. Existing databases are never detected (postgres list-databases now prints a bare JSON array, the parser expects {"databases": […]}), so re-runs attempt duplicate creation — the script is no longer idempotent.
  2. The database-creation fallback posts {"name": …}, but the databases API now requires {"spec": {"postgres_database": …, "role": "projects/…/branches/…/roles/…"}} and rejects the request.

Expected Behavior

The script provisions the Lakebase instance + branch + database as documented in its header, is idempotent on re-run, and fails loudly with a diagnostic when auth cannot be resolved.

Steps To Reproduce

  1. Install a current Databricks CLI (>= 0.250) and log in with OAuth: databricks auth login --profile DEFAULT
  2. Run ./scripts/setup-lakebase.sh --name my-instance --database my_db --profile DEFAULT
  3. Observe exit code 1 with no output

Root causes:

  • databricks auth env now prints JSON ({"env": {…}}), not export KEY="…" lines, so _cfg's grep matches nothing; with set -o pipefail the failed grep aborts the script before the empty-value guard runs.
  • OAuth profiles (auth_type=databricks-cli) expose no DATABRICKS_TOKEN in auth env at all — a token must be minted via databricks auth token.

Cloud

AWS

Browser

Other

OntoBricks Version

0.6.1

Relevant log output

$ ./scripts/setup-lakebase.sh --name my-instance --database my_db --profile DEFAULT
$ echo $?
1
# (no output; bash -x shows HOST= resolving empty inside _cfg)

Additional Context

CLI-independent verification: the same provisioning steps executed directly against the REST API succeed, confirming the API contract moved rather than the workspace being misconfigured. A fix is prepared.

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions