Skip to content

[VPEX][5a] Add local-env package-manager interface, detection, and preflight#5850

Open
rugpanov wants to merge 1 commit into
mainfrom
dbconnect/05a-pkgmanager
Open

[VPEX][5a] Add local-env package-manager interface, detection, and preflight#5850
rugpanov wants to merge 1 commit into
mainfrom
dbconnect/05a-pkgmanager

Conversation

@rugpanov

@rugpanov rugpanov commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Why

  • PR [VPEX][5/8] Add local-env pipeline, detection, and package-manager interface #5828 ([VPEX][5/8]) reads as +3,466 / 15 files on GitHub, but that is an artifact: PRs 1–4 were squash-merged into main while dbconnect/05-pipeline still sits on the pre-merge parent, so GitHub re-counts all of the already-merged code. The genuinely-new content in that layer is +1,165 / 5 files.
  • This splits that real delta at its one clean dependency seam. This PR is the leaf half: the PackageManager interface, manager detection, and the writability preflight — none of which reference the pipeline orchestrator.

What

  • pkgmanager.go — the PackageManager interface the pipeline provisions through (implemented by the uv backend in a later PR).
  • detect.go — uv-vs-not-uv detection (biased toward uv, whose native project file is the pyproject.toml this command drives), the non-blaming guidance message shown for an unsupported manager, and the ensureWritable preflight.
  • The pyprojectFile constant moves here from pipeline.go, since detection is its first consumer.

Testing strategy

  • detect_test.go covers the detection matrix (greenfield, uv lock, plain pyproject, conda/pip precedence), ensureWritable on a writable and a non-existent dir, and the unsupported-manager guidance message.
  • Gates: go build, go test, golangci-lint (0 issues), deadcode, gofmt — all green.

About this stack

This is one of a series of small, stacked PRs that together add the databricks local-env python sync command. It supersedes the pipeline half of #5828, split further at the interface/detection seam. Review bottom-up.

This PR and #5b (the six-phase pipeline orchestrator, stacked on this one) together replace #5828.

This pull request and its description were written by Isaac.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: f24c320

Run: 28951586571

Env 🟨​KNOWN 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 4 4 230 1069 4:03
💚​ aws windows 4 4 232 1067 4:13
💚​ aws-ucws linux 4 4 314 987 7:02
💚​ aws-ucws windows 4 4 316 985 4:46
💚​ azure linux 4 4 230 1068 4:05
💚​ azure windows 4 4 232 1066 3:58
💚​ azure-ucws linux 4 4 316 984 7:33
🟨​ azure-ucws windows 1 1 4 318 982 9:44
💚​ gcp linux 4 4 229 1070 3:52
💚​ gcp windows 4 4 231 1068 4:16
8 interesting tests: 4 SKIP, 3 RECOVERED, 1 KNOWN
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestFetchRepositoryInfoAPI_FromRepo 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 🟨​K 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/root 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/subdir 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 6 slowest tests (at least 2 minutes):
duration env testname
3:23 gcp windows TestAccept
3:20 aws windows TestAccept
3:09 aws-ucws windows TestAccept
3:02 azure windows TestAccept
3:00 azure-ucws windows TestAccept
2:01 azure-ucws windows TestAccept/bundle/deploy/mlops-stacks/DATABRICKS_BUNDLE_ENGINE=terraform

Split from the pipeline layer so the PackageManager seam (implemented by
the uv backend in a later PR), manager detection, and the writability
preflight land as a small, independently reviewable unit.

- pkgmanager.go: the PackageManager interface the pipeline provisions through.
- detect.go: uv-vs-not-uv detection (biased toward uv, whose native project
  file is the pyproject.toml this command drives), the non-blaming guidance
  message for unsupported managers, and the ensureWritable preflight.

Co-authored-by: Isaac
@rugpanov rugpanov force-pushed the dbconnect/05a-pkgmanager branch from cb166cb to f24c320 Compare July 8, 2026 14:44
@rugpanov rugpanov temporarily deployed to test-trigger-is July 8, 2026 14:44 — with GitHub Actions Inactive
@rugpanov rugpanov temporarily deployed to test-trigger-is July 8, 2026 14:44 — with GitHub Actions Inactive

@anton-107 anton-107 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. Clean leaf of the stack: detectManager is pure-fs with no telemetry (matches its doc), the uv-bias logic is well-reasoned and fully table-tested, and ensureWritable + managerGuidance are covered. PackageManager interface is small and well-documented (the PostProvision/pip-seeding comment captures a real VS Code quirk). No findings.

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.

3 participants