Commit 6852bc9
committed
Add VPEX one-click Databricks Connect environment setup
*Why*
Setting up a Databricks Connect Python environment that matches the selected
compute target is a manual, error-prone flow. This adds a guided one-click
path (the "VPEX" demo) that provisions a matched .venv and adopts it
automatically, with real UI feedback.
*What*
- New `VpexEnvironmentSetup` flow: pre-flight confirmation, phase-aware
progress notification, dedicated "VPEX Demo" output channel, and
success/failure pop-ups. Runs the real CLI in the project folder:
`databricks dbconnect init` then `dbconnect sync` (--serverless v4
--profile <detected>), parsing the CLI's `=== Phase N: name ===` output to
narrate each step. Cancellable (SIGTERM/SIGKILL).
- On success, auto-adopts `.venv/bin/python` via the MS Python extension API
(refresh + updateActiveEnvironmentPath), degrading gracefully if absent.
- New commands `databricks.environment.setupVpex` /
`.showVpexVersions`, a `$(rocket)` status-bar button, and a node under the
"Python Environment" tree section — all triggering the same flow and
reflecting the matched state on success.
- MsPythonExtensionWrapper: resolve `uv` from ~/.local/bin / ~/.cargo/bin /
$XDG_BIN_HOME when it isn't on the extension-host PATH, so uv venvs no
longer fall back to the (absent) native pip.
Note: the `dbconnect` subcommand currently exists only in the dev CLI build,
so CLI_PATH is hardcoded to it pending a bundled CLI that ships `dbconnect`
(marked DEMO/POC in code). Not for merge.
*Verification*
- tsc --noEmit, eslint src, prettier: clean
- Unit suite (VS Code test host): 237 passing, 0 failing
- Ran the real `databricks dbconnect init` against the demo project: phases
preflight→resolve→fetch→parse-python-version→plan→apply→ensure-python all
ok; final `uv sync` (PyPI-dependent) blocked only by no network access in
this environment.
Co-authored-by: Isaac1 parent a27514c commit 6852bc9
8 files changed
Lines changed: 786 additions & 9 deletions
File tree
- packages/databricks-vscode
- src
- language
- ui/configuration-view
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
443 | 454 | | |
444 | 455 | | |
445 | 456 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| |||
646 | 648 | | |
647 | 649 | | |
648 | 650 | | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
649 | 676 | | |
650 | 677 | | |
651 | 678 | | |
| |||
728 | 755 | | |
729 | 756 | | |
730 | 757 | | |
731 | | - | |
| 758 | + | |
| 759 | + | |
732 | 760 | | |
733 | 761 | | |
734 | 762 | | |
| |||
Lines changed: 45 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
123 | 161 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
| 162 | + | |
| 163 | + | |
128 | 164 | | |
129 | 165 | | |
| 166 | + | |
130 | 167 | | |
131 | 168 | | |
132 | 169 | | |
| |||
136 | 173 | | |
137 | 174 | | |
138 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
139 | 179 | | |
140 | | - | |
| 180 | + | |
141 | 181 | | |
142 | 182 | | |
143 | 183 | | |
| |||
Lines changed: 122 additions & 0 deletions
| 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 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
0 commit comments