Skip to content

localenv: add venv-folder and per-file pyproject seams to setup-local - #7017

Draft
rugpanov wants to merge 4 commits into
mainfrom
uv-workspace-setup-local
Draft

rugpanov wants to merge 4 commits into
mainfrom
uv-workspace-setup-local

Conversation

@rugpanov

@rugpanov rugpanov commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Stack (merge in this order):

  1. localenv: add venv-folder and per-file pyproject seams to setup-local #7017 localenv: add venv-folder and per-file pyproject seams to setup-local (see diff) <- this PR
  2. Support uv workspace members in environments setup-local #7018 Support uv workspace members in environments setup-local (see diff)
  3. Honor UV_PROJECT_ENVIRONMENT in environments setup-local #7026 Honor UV_PROJECT_ENVIRONMENT in environments setup-local (see diff)

Changes

This PR is a refactor in libs/localenv. It does not change behavior. It adds two seams that #7018 uses for uv workspace members:

  • PostProvision and Validate take the project folder and the venv folder. uv and the validate probe still run in the project folder. Preflight sets the venv folder; for every project it is still .venv.
  • The pyproject.toml backup, write, and dry-run diff are per-file helpers (writePyproject, pyprojectDiff, and backup helpers that take a folder). This lets Support uv workspace members in environments setup-local #7018 write a second file, the workspace root pyproject.toml.

Why

In a uv workspace member, uv sync puts the venv at the workspace root, and uv reads the constraint pins only from the root pyproject.toml (databricks/databricks-vscode#2157). The pipeline used one fixed venv path and one pyproject.toml. This PR makes both locations parameters, so #7018 can change them for a member without a mixed refactor-and-feature diff.

Tests

  • Unit tests: the helpers write the backup next to the file, a no-op merge writes nothing, and uv and the probe run in the project folder.
  • All existing unit and acceptance tests pass with no golden change. This shows that the output does not change.

This pull request and its description were written by Isaac.

rugpanov and others added 2 commits October 12, 2026 13:08
Co-authored-by: Isaac <no-reply@databricks.com>
…elpers

Co-authored-by: Isaac <no-reply@databricks.com>
…ath at preflight

Co-authored-by: Isaac <no-reply@databricks.com>
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 29539ed

Run: 38245862518

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 276 16 6:58
✅​ aws-windows-latest-4core-16gb 278 14 3:23
✅​ azure linux-2core-8gb 275 16 7:06
✅​ azure-windows-latest-4core-16gb 277 14 2:56
✅​ gcp linux-2core-8gb 276 16 6:56
✅​ gcp-windows-latest-4core-16gb 278 14 3:00
Top 3 slowest tests (at least 2 minutes):
duration env testname
3:57 aws linux-2core-8gb TestAccept
3:56 azure linux-2core-8gb TestAccept
3:45 gcp linux-2core-8gb TestAccept

Co-authored-by: Isaac <no-reply@databricks.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants