databricks-cli/bundle/config/mutator
Andrew Nester 0daa0022af
Make a notebook wrapper for Python wheel tasks optional (#797)
## Changes
Instead of always using notebook wrapper for Python wheel tasks, let's
make this an opt-in option.

Now by default Python wheel tasks will be deployed as is to Databricks
platform.
If notebook wrapper required (DBR < 13.1 or other configuration
differences), users can provide a following experimental setting

```
experimental:
  python_wheel_wrapper: true
```

Fixes #783,
https://github.com/databricks/databricks-asset-bundles-dais2023/issues/8

## Tests
Added unit tests.

Integration tests passed for both cases

```
    helpers.go:163: [databricks stdout]: Hello from my func
    helpers.go:163: [databricks stdout]: Got arguments:
    helpers.go:163: [databricks stdout]: ['my_test_code', 'one', 'two']
    ...
Bundle remote directory is ***/.bundle/ac05d5e8-ed4b-4e34-b3f2-afa73f62b021
Deleted snapshot file at /var/folders/nt/xjv68qzs45319w4k36dhpylc0000gp/T/TestAccPythonWheelTaskDeployAndRunWithWrapper3733431114/001/.databricks/bundle/default/sync-snapshots/cac1e02f3941a97b.json
Successfully deleted files!
--- PASS: TestAccPythonWheelTaskDeployAndRunWithWrapper (214.18s)
PASS
coverage: 93.5% of statements in ./...
ok      github.com/databricks/cli/internal/bundle       214.495s        coverage: 93.5% of statements in ./...

```

```
    helpers.go:163: [databricks stdout]: Hello from my func
    helpers.go:163: [databricks stdout]: Got arguments:
    helpers.go:163: [databricks stdout]: ['my_test_code', 'one', 'two']
    ...
Bundle remote directory is ***/.bundle/0ef67aaf-5960-4049-bf1d-dc9e29157421
Deleted snapshot file at /var/folders/nt/xjv68qzs45319w4k36dhpylc0000gp/T/TestAccPythonWheelTaskDeployAndRunWithoutWrapper2340216760/001/.databricks/bundle/default/sync-snapshots/edf0b322cee93b13.json
Successfully deleted files!
--- PASS: TestAccPythonWheelTaskDeployAndRunWithoutWrapper (192.36s)
PASS
coverage: 93.5% of statements in ./...
ok      github.com/databricks/cli/internal/bundle       195.130s        coverage: 93.5% of statements in ./...

```
2023-09-26 14:32:20 +00:00
..
default_target.go Renamed `environments` to `targets` in bundle configuration (#670) 2023-08-17 15:22:32 +00:00
default_target_test.go Renamed `environments` to `targets` in bundle configuration (#670) 2023-08-17 15:22:32 +00:00
default_workspace_paths.go Added support for bundle.Seq, simplified Mutator.Apply interface (#403) 2023-05-24 14:45:19 +02:00
default_workspace_paths_test.go Added support for bundle.Seq, simplified Mutator.Apply interface (#403) 2023-05-24 14:45:19 +02:00
default_workspace_root.go Renamed `environments` to `targets` in bundle configuration (#670) 2023-08-17 15:22:32 +00:00
default_workspace_root_test.go Renamed `environments` to `targets` in bundle configuration (#670) 2023-08-17 15:22:32 +00:00
expand_workspace_root.go Added support for bundle.Seq, simplified Mutator.Apply interface (#403) 2023-05-24 14:45:19 +02:00
expand_workspace_root_test.go Extend deployment mode support (#577) 2023-07-30 07:19:49 +00:00
if.go Make a notebook wrapper for Python wheel tasks optional (#797) 2023-09-26 14:32:20 +00:00
load_git_details.go Fix bundle git branch validation (#645) 2023-08-07 17:29:02 +00:00
mutator.go Added support for experimental scripts section (#632) 2023-09-14 10:14:13 +00:00
noop.go Make a notebook wrapper for Python wheel tasks optional (#797) 2023-09-26 14:32:20 +00:00
override_compute.go Consolidate environment variable interaction (#747) 2023-09-11 08:18:43 +00:00
override_compute_test.go Cleanup after previous PR comments (#724) 2023-09-04 07:07:17 +00:00
populate_current_user.go databricks bundle init template v2: optional stubs, DLT support (#700) 2023-09-06 09:52:31 +00:00
populate_current_user_test.go Extend deployment mode support (#577) 2023-07-30 07:19:49 +00:00
process_include.go Added support for bundle.Seq, simplified Mutator.Apply interface (#403) 2023-05-24 14:45:19 +02:00
process_include_test.go Added support for bundle.Seq, simplified Mutator.Apply interface (#403) 2023-05-24 14:45:19 +02:00
process_root_includes.go Consolidate environment variable interaction (#747) 2023-09-11 08:18:43 +00:00
process_root_includes_test.go Consolidate environment variable interaction (#747) 2023-09-11 08:18:43 +00:00
process_target_mode.go Support Model Serving Endpoints in bundles (#682) 2023-09-07 21:54:31 +00:00
process_target_mode_test.go Support Model Serving Endpoints in bundles (#682) 2023-09-07 21:54:31 +00:00
run_as.go Added run_as section for bundle configuration (#692) 2023-08-23 16:47:07 +00:00
select_default_target.go Renamed `environments` to `targets` in bundle configuration (#670) 2023-08-17 15:22:32 +00:00
select_default_target_test.go Renamed `environments` to `targets` in bundle configuration (#670) 2023-08-17 15:22:32 +00:00
select_target.go List available targets when incorrect target passed (#756) 2023-09-08 15:37:55 +00:00
select_target_test.go Renamed `environments` to `targets` in bundle configuration (#670) 2023-08-17 15:22:32 +00:00
set_variables.go Consolidate environment variable interaction (#747) 2023-09-11 08:18:43 +00:00
set_variables_test.go Consolidate environment variable interaction (#747) 2023-09-11 08:18:43 +00:00
trampoline.go Consolidate environment variable interaction (#747) 2023-09-11 08:18:43 +00:00
trampoline_test.go Consolidate environment variable interaction (#747) 2023-09-11 08:18:43 +00:00
translate_paths.go Make resource and artifact paths in bundle config relative to config folder (#708) 2023-09-04 09:55:01 +00:00
translate_paths_artifacts.go Make resource and artifact paths in bundle config relative to config folder (#708) 2023-09-04 09:55:01 +00:00
translate_paths_jobs.go Make resource and artifact paths in bundle config relative to config folder (#708) 2023-09-04 09:55:01 +00:00
translate_paths_pipelines.go Make resource and artifact paths in bundle config relative to config folder (#708) 2023-09-04 09:55:01 +00:00
translate_paths_test.go Fixed marking libraries from DBFS as remote (#750) 2023-09-08 09:53:57 +00:00
validate_git_details.go Add validation for Git settings in bundles (#578) 2023-07-30 12:44:33 +00:00
validate_git_details_test.go Add validation for Git settings in bundles (#578) 2023-07-30 12:44:33 +00:00