Commit 8d184bf
committed
Reconcile dbconnect with the VPEX CLI spec: single sync command, E_* taxonomy, camelCase JSON
Aligns `databricks dbconnect` with the reconciled cli-spec:
- Collapse `init`+`sync` into a single `dbconnect sync` that auto-detects
greenfield (no pyproject.toml) vs. merge; command path lives in one constant.
- Add `--constraints-only` (Python + constraints, no databricks-connect pin;
still builds .venv, omits dbconnectVersion, skips the DB Connect assertion).
- Rewrite the `--output json` contract to the camelCase schema: schemaVersion,
command, ok, mode, dryRun, target, resolved, greenfield, plan, phases[] (all
six phases with pending), warnings[], error{code,failurePhase,diskMutated}.
- Rename error codes to the E_* set; report failurePhase at the phase that
detects the failure so it always matches the errored phase in phases[].
- Detect non-uv managers (conda/pip) in preflight and exit cleanly with
E_MANAGER_UNSUPPORTED; a plain PEP 621 pyproject.toml resolves to uv.
- Classify a 404 for a resolved env key as E_ENV_UNSUPPORTED (latest-LTS hint,
no cache fallback) vs. transport failure as E_FETCH; add a writable preflight.
- Default the constraint repo to rugpanov/databricks-environments.
Fixes two bugs the real `uv sync`/validate path exposed (both masked by the
fake package manager and --check in tests):
- uvManager.Validate no longer requires databricks-connect to be importable
(constraints-only left it uninstalled), so validate stops failing after it
has already provisioned the venv.
- Greenfield render now emits project.version, which uv requires for a
[project] table; without it every real greenfield `uv sync` failed.
Co-authored-by: Isaac1 parent 8f656d9 commit 8d184bf
46 files changed
Lines changed: 1145 additions & 691 deletions
File tree
- acceptance
- dbconnect
- cluster-unsupported
- constraints-only
- env-unsupported
- flag-conflict
- help
- json-error
- manager-unsupported
- no-target
- serverless-check
- serverless-json
- help
- cmd/dbconnect
- libs/dbconnect
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 | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
This file was deleted.
This file was deleted.
File renamed without changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
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 | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments