[WIP] VPEX: one-click Databricks Connect environment setup#1924
Draft
rugpanov wants to merge 1 commit into
Draft
[WIP] VPEX: one-click Databricks Connect environment setup#1924rugpanov wants to merge 1 commit into
rugpanov wants to merge 1 commit into
Conversation
*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: Isaac
Contributor
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a guided one-click "VPEX" flow to set up a Databricks Connect Python environment matched to the selected compute target, with real UI feedback, and auto-adopt the resulting
.venv.It runs the real CLI in the open project folder:
parses the CLI's
=== Phase N: <name> ===output to narrate each step, then selects.venv/bin/pythonautomatically.What's included
VpexEnvironmentSetup— pre-flight confirmation, phase-aware progress notification, dedicated "VPEX Demo" output channel, and success/failure pop-ups. The run is cancellable (SIGTERM → SIGKILL).refreshEnvironments()+updateActiveEnvironmentPath(".venv/bin/python", <project>)via the MS Python extension API; degrades gracefully if the extension is absent.databricks.environment.setupVpex(+databricks.environment.showVpexVersions)$(rocket)status-bar buttonMsPythonExtensionWrapper— resolveuvfrom~/.local/bin/~/.cargo/bin/$XDG_BIN_HOMEwhen it isn't on the extension-host PATH, so uv venvs no longer fall back to the (absent) native pip.This is intentionally kept parallel to the existing
databricks.environment.setup(FeatureManager) flow rather than merged into it.Verification
tsc --noEmit,eslint src,prettier: cleandatabricks dbconnect initagainst a demo project: phasespreflight → resolve → fetch → parse-python-version → plan → apply → ensure-pythonallok; the finaluv sync(PyPI-dependent) was blocked only by no network access in the test environment.Backward compatibility
Additive: new commands, a new status-bar button, and a new tree node. The
ConfigurationDataProviderconstructor gains one parameter (internal). No changes to existing commands, settings, or persisted state/formats.dbconnectsubcommand currently exists only in the dev CLI build, soCLI_PATHis hardcoded to a local absolute path (markedDEMO/POCin code). This must switch toCliWrapper.cliPathonce the bundled CLI shipsdbconnect.serverless-v4/ Python3.12/databricks-connect 17.3and macOS-only.venv/bin/pythonare hardcoded for the demo.This pull request and its description were written by Isaac.