databricks-cli/internal
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
..
acc Upgraded Go version to 1.21 (#664) 2023-08-15 13:50:40 +00:00
build Rename bricks -> databricks (#389) 2023-05-16 18:35:39 +02:00
bundle Make a notebook wrapper for Python wheel tasks optional (#797) 2023-09-26 14:32:20 +00:00
testdata Error when unknown keys are encounters during template execution (#766) 2023-09-14 15:53:20 +00:00
testutil Run environment related tests in a pristine environment (#769) 2023-09-12 13:28:53 +00:00
alerts_test.go Update alerts command integration test (#512) 2023-06-22 10:30:52 +02:00
api_test.go Rename bricks -> databricks (#389) 2023-05-16 18:35:39 +02:00
clusters_test.go Do not generate prompts for certain commands (#438) 2023-06-05 19:38:45 +02:00
filer_test.go Add filer.Filer implementation backed by the Files API (#474) 2023-06-19 18:29:13 +00:00
fs_cat_test.go Add TestAcc prefix to filer test and fix any failing tests (#611) 2023-07-26 13:03:10 +00:00
fs_cp_test.go Make local files default for fs commands (#506) 2023-06-23 16:07:09 +02:00
fs_ls_test.go Add TestAcc prefix to filer test and fix any failing tests (#611) 2023-07-26 13:03:10 +00:00
fs_mkdir_test.go Fix regex error check in mkdir integration test (#735) 2023-09-05 14:25:26 +00:00
fs_rm_test.go Add TestAcc prefix to filer test and fix any failing tests (#611) 2023-07-26 13:03:10 +00:00
git_clone_test.go Fix git clone integration test for non-existing repo (#610) 2023-07-27 13:51:57 +00:00
helpers.go Consolidate environment variable interaction (#747) 2023-09-11 08:18:43 +00:00
init_test.go Error when unknown keys are encounters during template execution (#766) 2023-09-14 15:53:20 +00:00
locker_test.go Correct name for force acquire deploy flag (#656) 2023-08-15 19:03:43 +00:00
repos_test.go Add provider detection to the repos create command (#528) 2023-06-27 14:17:13 +02:00
secrets_test.go Remove dependency on global state for remaining commands (#613) 2023-07-27 10:03:08 +00:00
sync_test.go Update Go SDK to v0.19.0 (#729) 2023-09-05 09:43:57 +00:00
version_test.go Use cmdio in version command for `--output` flag (#419) 2023-06-01 12:03:22 +02:00
workspace_test.go Decode contents by default in workspace export command (#531) 2023-06-27 20:42:29 +02:00