feat(python-setup): route the setup command to the uv flow when active - #2118
Merged
Conversation
rugpanov
had a problem deploying
to
test-trigger-is
August 14, 2026 12:07 — with
GitHub Actions
Error
Contributor
Author
|
🤖 Integration tests triggered for |
rugpanov
force-pushed
the
feat/route-setup-to-uv-flow
branch
from
August 14, 2026 12:19
02532f2 to
9d331a2
Compare
Contributor
Author
|
🤖 Integration tests triggered for |
rugpanov
had a problem deploying
to
test-trigger-is
August 14, 2026 12:20 — with
GitHub Actions
Error
*Why*
When the uv-native Python setup is the active surface for a project (the
`environment.pythonSetup` opt-in plus a uv-suitable project — the same gate the
configuration view already dispatches on), the `databricks.environment.setup`
command still ran the legacy checklist. Every "set up my Python env" trigger —
the status bar, the config-view legacy rows, the command palette, and the
run/debug gate's own `executeCommand("databricks.environment.setup")` — funnels
through that command, so all of them drove the wrong flow. Separately, the legacy
interpreter-change listener would pop a second install prompt on top of the uv
flow.
*What*
- Add `pythonSetupRouting.ts`: a narrow `UvPythonSetup` seam and
`routeEnvironmentSetup`, which sends `databricks.environment.setup` to the uv
flow when it is visible, else the legacy checklist. One change reroutes every
trigger surface; the palette command is not hidden — it routes.
- Suppress the legacy interpreter-change auto-install prompt when uv is active,
so the two flows don't both prompt.
- Force the run/debug gate's post-setup readiness re-check: routing to the uv
flow adopts the interpreter and refreshes legacy state only on the async
interpreter-change event, so reading the cache could abort the first launch.
- Wire everything in extension.ts.
Readiness (the run/debug gate and the status bar) intentionally stays on the
legacy `environment.dependencies` check: it reads real installed state, so it is
reload-safe and interpreter-safe — unlike the uv flow's session-only `ready`
flag. Routing only the setup trigger avoids a reload/interpreter-staleness
regression while still driving the uv setup from every surface. No cross-fallback:
when uv is active it is the only setup path.
All new dependencies are optional and default to legacy behavior, so nothing
changes for users who haven't opted in (the uv gate returns false → every surface
behaves exactly as before).
*Verification*
- Unit tests for the command routing, the interpreter-change guard, and the
forced post-setup re-check.
- `yarn test:unit`: 790 passing, 0 failing (10 pre-existing pending).
- `eslint` + `prettier -c` clean on all touched files.
Co-authored-by: Isaac
rugpanov
force-pushed
the
feat/route-setup-to-uv-flow
branch
from
August 14, 2026 12:24
9d331a2 to
3fc9637
Compare
rugpanov
had a problem deploying
to
test-trigger-is
August 14, 2026 12:25 — with
GitHub Actions
Error
Contributor
Author
|
🤖 Integration tests ❌ 1 of 35 test jobs failed for |
misha-db
approved these changes
Aug 14, 2026
rugpanov
enabled auto-merge (squash)
August 14, 2026 14:03
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. |
rugpanov
had a problem deploying
to
test-trigger-is
August 14, 2026 14:04 — with
GitHub Actions
Error
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.
Why
When the uv-native Python setup is the active surface for a project — the
environment.pythonSetupopt-in plus a uv-suitable project, the same gate the configuration view already dispatches on — thedatabricks.environment.setupcommand still ran the legacy checklist. Every "set up my Python env" trigger funnels through that command:executeCommand("databricks.environment.setup").So all of them drove the wrong flow for uv projects. Separately, the legacy interpreter-change listener would pop a second install prompt on top of the uv flow.
What
pythonSetupRouting.ts— a narrowUvPythonSetupseam plusrouteEnvironmentSetup, which sendsdatabricks.environment.setupto the uv flow when it is visible, else the legacy checklist. One change reroutes every trigger surface (the palette command is not hidden — it routes).EnvironmentDependenciesVerifier) — suppress the legacy auto-install prompt when uv is active, so the two flows don't both prompt.extension.ts— wire both.On readiness (deliberate design choice)
The run/debug gate and the status bar keep reading the legacy
environment.dependenciescheck for readiness. That check reads real installed state (interpreter version +databricks-connectpresence/version), so it is reload-safe and interpreter-safe — unlike the uv flow's session-onlyreadyflag, which is empty after a window reload and is never invalidated when the user switches interpreters. Routing only the setup trigger (not the readiness signal) drives the uv setup from every surface while avoiding a reload / interpreter-staleness regression. No cross-fallback: when uv is active it is the only setup path.All new dependencies are optional and default to legacy behavior, so nothing changes for users who have not opted in (the uv gate returns
false→ every surface behaves exactly as before). No new settings, persisted state, telemetry events, or when-clause flags.Verification
yarn test:unit: 790 passing, 0 failing (10 pre-existing pending).eslint+prettier -cclean on all touched files.This pull request and its description were written by Isaac.