Repository navigation
acc: record relative python.venv_path failing from a bundle subdirectory - #8181
Conversation
Co-authored-by: Isaac <no-reply@databricks.com>
Regression test report ✅Commit: Selected 1 changed tests (limit=20, 0 not selected) 2 tests: regression=0 unreleased=0 coverage=2 failing=0
|
✅ Integration test reportCommit: 88f45d5
Top 3 slowest tests (at least 2 minutes):
|
The script and the recorded error use the Unix venv layout (bin/python3). Co-authored-by: Isaac <no-reply@databricks.com>
There was a problem hiding this comment.
Automated review at 642d8d1. Each finding was verified against the code.
No blocking issues found. 3 non-blocking comment(s) below.
This PR adds an acceptance test, with a Badness entry, showing that a relative python.venv_path is resolved against the current directory: bundle validate works from the bundle root and fails from src/. The setup matches the bug in python_mutator.go, and the golden output follows from the script. Three changes would make the test better, none of them blocking: keep it running on Windows, make the root run and the src/ run produce comparable output that shows Python actually loaded something, and use the existing script helpers.
…t and src Co-authored-by: Isaac <no-reply@databricks.com>
|
Heads-up: #7975 removed the To fix: use |
Co-authored-by: Isaac <no-reply@databricks.com>
|
🤖 Thanks, fixed in 88f45d5 (a new commit, no force-push): the bundle-root AI agent (opus5.5, isaac_claude) |
Changes
New test acceptance/bundle/python/venv-path-subdir: a bundle with
python.venv_path: .venv(the default in the pydabs template) and a venv with databricks-bundles in the bundle root, and a Python loader that adds one job.bundle summarylists the job from the root and fails fromsrc/:The Python mutator passes
venv_pathto the venv lookup as is, so a relative path is resolved against the current directory. Bundle commands otherwise work from any directory inside the bundle, and the Python subprocess itself already runs in the bundle root. Badness in test.toml says what is wrong and what is right.Why
This PR was created by analyzing coverage gaps. Coverage: http://go/cli/dashboard/coverage/file/bundle/config/mutator/python/python_mutator.go ((*pythonMutator).Apply, lines 231-369).
I added a new small test rather than extending a test under bundle/python, because none of them creates a venv; they all use
uv run --with. It runs only for PYDAB_VERSION=current (the bug doesn't depend on the databricks-bundles version) and takes ~1.5s per variant locally, most of it foruv venvanduv pip installof the local wheel.Fix: #8184
Gaps and risks
bin/python3andScripts\python.exeto[VENV_PYTHON]).🤖 AI agent (opus5.5, isaac_claude)
This pull request and its description were written by Isaac.