Commit 6805f23
acc: testserver: add support for executing wheel and notebook tasks (#4507)
## Changes
Update testserver to actually execute job tasks by creating a temp venv
with uv.
**Job Execution:**
- Implement notebook task execution with magic command preprocessing
(`%python`, `%pip`)
- Add job run output retrieval for both run IDs and task run IDs
- Support `python_params` override in RunNow API
- Cache cluster virtual environments for Python wheel tasks
- Add serverless compute support
**Notebook Execution:**
- Extract wheel paths from `%pip install` commands and install them
- Mock `dbutils` module (Widgets, Library, Notebook) for compatibility
- Normalize output to match cloud behavior
**Resources:**
- Add missing instance pool "some-test-instance-pool" for variable
lookups
- Match cloud behavior for SINGLE_USER cluster drift detection. This
enables reproducing #4418 on
testserver precisely like on cloud.
**Test Outputs:**
- Update to reflect realistic Databricks behavior:
- Modern run URLs: `/?o=[NUMID]#job/[NUMID]/run/[NUMID]`
- Actual job names instead of generic placeholders
- State transitions: `RUNNING` → `TERMINATED SUCCESS`
- Multi-task job output display
## Why
Converting cloud-only tests in cloud+local speeds up
- updating test results (we only update once in local mode for
cloud+local tests, since output must match);
- debugging test failures.
It also enables people who do not have access to integration test env to
author PRs.
The have been a couple cases where I had to debug failures in
integration_whl tests and since test takes 5-10mins, it takes a lot of
time.
## Tests
Previously cloud-only tests now work on testserver.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 7554bd6 commit 6805f23
File tree
31 files changed
+610
-40
lines changed- acceptance
- bundle
- integration_whl
- base
- custom_params
- interactive_cluster_dynamic_version
- interactive_cluster
- interactive_single_user
- serverless_custom_params
- serverless_dynamic_version
- serverless
- wrapper_custom_params
- wrapper
- resources/clusters/deploy
- data_security_mode
- simple
- update-after-create
- run
- basic
- jobs/partial_run
- state-wiped
- libs/testserver
31 files changed
+610
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
244 | 247 | | |
245 | 248 | | |
246 | 249 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments