diff --git a/acceptance/acceptance_test.go b/acceptance/acceptance_test.go index a05dc1b3f0..de02e455b8 100644 --- a/acceptance/acceptance_test.go +++ b/acceptance/acceptance_test.go @@ -14,7 +14,6 @@ import ( "os" "os/exec" "path/filepath" - "reflect" "regexp" "runtime" "slices" @@ -26,7 +25,6 @@ import ( "unicode/utf8" "github.com/google/uuid" - "gopkg.in/yaml.v3" "github.com/databricks/cli/acceptance/internal" "github.com/databricks/cli/internal/testutil" @@ -548,18 +546,6 @@ func runTest(t *testing.T, // Add materialized config to outputs for comparison outputs[internal.MaterializedConfigFile] = true - bundleConfigTarget := "databricks.yml" - if config.BundleConfigTarget != nil { - bundleConfigTarget = *config.BundleConfigTarget - } - - if bundleConfigTarget != "" { - configCreated := applyBundleConfig(t, tmpDir, config.BundleConfig, bundleConfigTarget) - if configCreated { - inputs[bundleConfigTarget] = true - } - } - timeout := config.Timeout if runtime.GOOS == "windows" { @@ -1378,77 +1364,6 @@ func prepareWheelBuildDirectory(t *testing.T, dir string) string { return latestWheel } -// Applies BundleConfig setting to file named bundleConfigTarget and updates it in place if there were any changes. -// Returns true if new file was created. -func applyBundleConfig(t *testing.T, tmpDir string, bundleConfig map[string]any, bundleConfigTarget string) bool { - validConfig := make(map[string]map[string]any, len(bundleConfig)) - - for _, configName := range utils.SortedKeys(bundleConfig) { - configValue := bundleConfig[configName] - // Setting BundleConfig. to empty string disables it. - // This is useful when parent directory defines some config that child test wants to cancel. - if configValue == "" { - continue - } - cfg, ok := configValue.(map[string]any) - if !ok { - t.Fatalf("Unexpected type for BundleConfig.%s: %#v", configName, configValue) - } - validConfig[configName] = cfg - } - - if len(validConfig) == 0 { - return false - } - - configPath := filepath.Join(tmpDir, bundleConfigTarget) - configData, configExists := tryReading(t, configPath) - - newConfigData := configData - var applied []string - - for _, configName := range utils.SortedKeys(validConfig) { - configValue := validConfig[configName] - updated, err := internal.MergeBundleConfig(newConfigData, configValue) - if err != nil { - t.Fatalf("Failed to merge BundleConfig.%s: %s\nvvalue: %#v\ntext:\n%s", configName, err, configValue, newConfigData) - } - if isSameYAMLContent(newConfigData, updated) { - t.Logf("No effective updates from BundleConfig.%s", configName) - } else { - newConfigData = updated - applied = append(applied, configName) - } - } - - if newConfigData != configData { - t.Logf("Writing updated bundle config to %s. BundleConfig sections: %s", bundleConfigTarget, strings.Join(applied, ", ")) - testutil.WriteFile(t, configPath, newConfigData) - return !configExists - } - - return false -} - -// Returns true if both strings are deep-equal after unmarshalling -func isSameYAMLContent(str1, str2 string) bool { - var obj1, obj2 any - - if str1 == str2 { - return true - } - - if err := yaml.Unmarshal([]byte(str1), &obj1); err != nil { - return false - } - - if err := yaml.Unmarshal([]byte(str2), &obj2); err != nil { - return false - } - - return reflect.DeepEqual(obj1, obj2) -} - func BuildYamlfmt(t *testing.T) { // Using make here instead of "go build" directly cause it's faster when it's already built args := []string{ diff --git a/acceptance/bundle/apps/app_yaml/databricks.yml b/acceptance/bundle/apps/app_yaml/databricks.yml index 5e46233cea..a50c8d54aa 100644 --- a/acceptance/bundle/apps/app_yaml/databricks.yml +++ b/acceptance/bundle/apps/app_yaml/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: apps: myapp: diff --git a/acceptance/bundle/artifacts/artifact_upload_for_volumes/databricks.yml b/acceptance/bundle/artifacts/artifact_upload_for_volumes/databricks.yml index d121f56da4..58a47fb607 100644 --- a/acceptance/bundle/artifacts/artifact_upload_for_volumes/databricks.yml +++ b/acceptance/bundle/artifacts/artifact_upload_for_volumes/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + workspace: artifact_path: /Volumes/foo/bar/artifacts diff --git a/acceptance/bundle/artifacts/artifact_upload_for_workspace/databricks.yml b/acceptance/bundle/artifacts/artifact_upload_for_workspace/databricks.yml index 51892d8925..261b90ed90 100644 --- a/acceptance/bundle/artifacts/artifact_upload_for_workspace/databricks.yml +++ b/acceptance/bundle/artifacts/artifact_upload_for_workspace/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + workspace: artifact_path: /foo/bar/artifacts diff --git a/acceptance/bundle/artifacts/artifact_upload_with_no_library_reference/databricks.yml b/acceptance/bundle/artifacts/artifact_upload_with_no_library_reference/databricks.yml index d9a5a8bb72..9404d6fbe2 100644 --- a/acceptance/bundle/artifacts/artifact_upload_with_no_library_reference/databricks.yml +++ b/acceptance/bundle/artifacts/artifact_upload_with_no_library_reference/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + workspace: artifact_path: /Workspace/foo/bar/artifacts diff --git a/acceptance/bundle/artifacts/artifacts_dynamic_version/databricks.yml b/acceptance/bundle/artifacts/artifacts_dynamic_version/databricks.yml index c2134924c2..47a1c7e263 100644 --- a/acceptance/bundle/artifacts/artifacts_dynamic_version/databricks.yml +++ b/acceptance/bundle/artifacts/artifacts_dynamic_version/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + presets: artifacts_dynamic_version: true diff --git a/acceptance/bundle/artifacts/build_and_files/databricks.yml b/acceptance/bundle/artifacts/build_and_files/databricks.yml index 70d6152b6d..cd1a767b47 100644 --- a/acceptance/bundle/artifacts/build_and_files/databricks.yml +++ b/acceptance/bundle/artifacts/build_and_files/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + artifacts: custom: build: touch built.txt diff --git a/acceptance/bundle/artifacts/build_and_files_whl/databricks.yml b/acceptance/bundle/artifacts/build_and_files_whl/databricks.yml index 529ca26bcf..27ff46366c 100644 --- a/acceptance/bundle/artifacts/build_and_files_whl/databricks.yml +++ b/acceptance/bundle/artifacts/build_and_files_whl/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + artifacts: artifact_with_custom_dist: type: whl diff --git a/acceptance/bundle/artifacts/glob_exact_whl/databricks.yml b/acceptance/bundle/artifacts/glob_exact_whl/databricks.yml index 9f737e9558..7908d35669 100644 --- a/acceptance/bundle/artifacts/glob_exact_whl/databricks.yml +++ b/acceptance/bundle/artifacts/glob_exact_whl/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + artifacts: my_prebuilt_whl: type: whl diff --git a/acceptance/bundle/artifacts/globs_in_files_in_include/databricks.yml b/acceptance/bundle/artifacts/globs_in_files_in_include/databricks.yml index 65664a48f4..dcb8723050 100644 --- a/acceptance/bundle/artifacts/globs_in_files_in_include/databricks.yml +++ b/acceptance/bundle/artifacts/globs_in_files_in_include/databricks.yml @@ -1,2 +1,5 @@ +bundle: + name: test-bundle + include: - resources/artifacts.yml diff --git a/acceptance/bundle/artifacts/issue_3109/databricks.yml b/acceptance/bundle/artifacts/issue_3109/databricks.yml index 7de3da62d9..1217ababd3 100644 --- a/acceptance/bundle/artifacts/issue_3109/databricks.yml +++ b/acceptance/bundle/artifacts/issue_3109/databricks.yml @@ -1,2 +1,5 @@ +bundle: + name: test-bundle + include: - src/job1/databricks_job/resources/*.yaml diff --git a/acceptance/bundle/artifacts/shell/err-bash/databricks.yml b/acceptance/bundle/artifacts/shell/err-bash/databricks.yml index ca41c42530..d683d0ed47 100644 --- a/acceptance/bundle/artifacts/shell/err-bash/databricks.yml +++ b/acceptance/bundle/artifacts/shell/err-bash/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + artifacts: my_artifact: executable: bash diff --git a/acceptance/bundle/artifacts/shell/err-sh/databricks.yml b/acceptance/bundle/artifacts/shell/err-sh/databricks.yml index bd5993cc70..22225a8ce1 100644 --- a/acceptance/bundle/artifacts/shell/err-sh/databricks.yml +++ b/acceptance/bundle/artifacts/shell/err-sh/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + artifacts: my_artifact: executable: sh diff --git a/acceptance/bundle/artifacts/unique_name_libraries/databricks.yml b/acceptance/bundle/artifacts/unique_name_libraries/databricks.yml index 0e22718f1b..a0cbd79d46 100644 --- a/acceptance/bundle/artifacts/unique_name_libraries/databricks.yml +++ b/acceptance/bundle/artifacts/unique_name_libraries/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + variables: cluster: default: diff --git a/acceptance/bundle/artifacts/upload_multiple_libraries/databricks.yml b/acceptance/bundle/artifacts/upload_multiple_libraries/databricks.yml index e7dc86b0c3..08c336a6f1 100644 --- a/acceptance/bundle/artifacts/upload_multiple_libraries/databricks.yml +++ b/acceptance/bundle/artifacts/upload_multiple_libraries/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + workspace: artifact_path: /foo/bar/artifacts diff --git a/acceptance/bundle/artifacts/whl_change_version/databricks.yml b/acceptance/bundle/artifacts/whl_change_version/databricks.yml index 5a8d55ded0..ac56a61c01 100644 --- a/acceptance/bundle/artifacts/whl_change_version/databricks.yml +++ b/acceptance/bundle/artifacts/whl_change_version/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: test_job: diff --git a/acceptance/bundle/artifacts/whl_dbfs/databricks.yml b/acceptance/bundle/artifacts/whl_dbfs/databricks.yml index 8b5ca158cf..3472f6b2b9 100644 --- a/acceptance/bundle/artifacts/whl_dbfs/databricks.yml +++ b/acceptance/bundle/artifacts/whl_dbfs/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: test_job: diff --git a/acceptance/bundle/artifacts/whl_dynamic/databricks.yml b/acceptance/bundle/artifacts/whl_dynamic/databricks.yml index 2888bd3ce7..c407804bf4 100644 --- a/acceptance/bundle/artifacts/whl_dynamic/databricks.yml +++ b/acceptance/bundle/artifacts/whl_dynamic/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + artifacts: my_test_code: type: whl diff --git a/acceptance/bundle/artifacts/whl_explicit/databricks.yml b/acceptance/bundle/artifacts/whl_explicit/databricks.yml index d268b5ab7a..49f43d90ee 100644 --- a/acceptance/bundle/artifacts/whl_explicit/databricks.yml +++ b/acceptance/bundle/artifacts/whl_explicit/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + artifacts: my_test_code: type: whl diff --git a/acceptance/bundle/artifacts/whl_implicit/databricks.yml b/acceptance/bundle/artifacts/whl_implicit/databricks.yml index 5a8d55ded0..ac56a61c01 100644 --- a/acceptance/bundle/artifacts/whl_implicit/databricks.yml +++ b/acceptance/bundle/artifacts/whl_implicit/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: test_job: diff --git a/acceptance/bundle/artifacts/whl_implicit_custom_path/databricks.yml b/acceptance/bundle/artifacts/whl_implicit_custom_path/databricks.yml index 37a0be7824..381c596f39 100644 --- a/acceptance/bundle/artifacts/whl_implicit_custom_path/databricks.yml +++ b/acceptance/bundle/artifacts/whl_implicit_custom_path/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + workspace: artifact_path: /foo/bar diff --git a/acceptance/bundle/artifacts/whl_implicit_notebook/databricks.yml b/acceptance/bundle/artifacts/whl_implicit_notebook/databricks.yml index ef7b0d4ad1..783e6cf1f0 100644 --- a/acceptance/bundle/artifacts/whl_implicit_notebook/databricks.yml +++ b/acceptance/bundle/artifacts/whl_implicit_notebook/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: test_job: diff --git a/acceptance/bundle/artifacts/whl_multiple/databricks.yml b/acceptance/bundle/artifacts/whl_multiple/databricks.yml index 072786d9ae..3de3b201d0 100644 --- a/acceptance/bundle/artifacts/whl_multiple/databricks.yml +++ b/acceptance/bundle/artifacts/whl_multiple/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + artifacts: my_test_code: type: whl diff --git a/acceptance/bundle/artifacts/whl_no_cleanup/databricks.yml b/acceptance/bundle/artifacts/whl_no_cleanup/databricks.yml index a1540d407d..0c53ae14fc 100644 --- a/acceptance/bundle/artifacts/whl_no_cleanup/databricks.yml +++ b/acceptance/bundle/artifacts/whl_no_cleanup/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + experimental: skip_artifact_cleanup: true diff --git a/acceptance/bundle/artifacts/whl_prebuilt_multiple/databricks.yml b/acceptance/bundle/artifacts/whl_prebuilt_multiple/databricks.yml index d5499c7c4f..ca98d5f3b7 100644 --- a/acceptance/bundle/artifacts/whl_prebuilt_multiple/databricks.yml +++ b/acceptance/bundle/artifacts/whl_prebuilt_multiple/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: test_job: diff --git a/acceptance/bundle/artifacts/whl_prebuilt_outside/test.toml b/acceptance/bundle/artifacts/whl_prebuilt_outside/test.toml index 0724077f7e..e69de29bb2 100644 --- a/acceptance/bundle/artifacts/whl_prebuilt_outside/test.toml +++ b/acceptance/bundle/artifacts/whl_prebuilt_outside/test.toml @@ -1 +0,0 @@ -BundleConfig.default_name = "" diff --git a/acceptance/bundle/artifacts/whl_prebuilt_outside_dynamic/test.toml b/acceptance/bundle/artifacts/whl_prebuilt_outside_dynamic/test.toml deleted file mode 100644 index 0724077f7e..0000000000 --- a/acceptance/bundle/artifacts/whl_prebuilt_outside_dynamic/test.toml +++ /dev/null @@ -1 +0,0 @@ -BundleConfig.default_name = "" diff --git a/acceptance/bundle/artifacts/whl_via_environment_key/databricks.yml b/acceptance/bundle/artifacts/whl_via_environment_key/databricks.yml index a7e54391f7..aad8498ad9 100644 --- a/acceptance/bundle/artifacts/whl_via_environment_key/databricks.yml +++ b/acceptance/bundle/artifacts/whl_via_environment_key/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + artifacts: my_test_code: type: whl diff --git a/acceptance/bundle/bundle_tag/id/databricks.yml b/acceptance/bundle/bundle_tag/id/databricks.yml index 93131f8f0d..22d25916f7 100644 --- a/acceptance/bundle/bundle_tag/id/databricks.yml +++ b/acceptance/bundle/bundle_tag/id/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: foo: diff --git a/acceptance/bundle/bundle_tag/url/databricks.yml b/acceptance/bundle/bundle_tag/url/databricks.yml index 9187c5606c..3fbb47e435 100644 --- a/acceptance/bundle/bundle_tag/url/databricks.yml +++ b/acceptance/bundle/bundle_tag/url/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: foo: diff --git a/acceptance/bundle/bundle_tag/url_ref/databricks.yml b/acceptance/bundle/bundle_tag/url_ref/databricks.yml index d5490f02cd..9f843af240 100644 --- a/acceptance/bundle/bundle_tag/url_ref/databricks.yml +++ b/acceptance/bundle/bundle_tag/url_ref/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: foo: diff --git a/acceptance/bundle/deploy/experimental-python/databricks.yml b/acceptance/bundle/deploy/experimental-python/databricks.yml index d2999290b1..d4d474ef84 100644 --- a/acceptance/bundle/deploy/experimental-python/databricks.yml +++ b/acceptance/bundle/deploy/experimental-python/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + sync: {paths: []} # dont need to copy files experimental: diff --git a/acceptance/bundle/deploy/fail-on-active-runs/databricks.yml b/acceptance/bundle/deploy/fail-on-active-runs/databricks.yml index ee4bd07d53..f3aa466b24 100644 --- a/acceptance/bundle/deploy/fail-on-active-runs/databricks.yml +++ b/acceptance/bundle/deploy/fail-on-active-runs/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: my_job: diff --git a/acceptance/bundle/deploy/python-notebook/databricks.yml b/acceptance/bundle/deploy/python-notebook/databricks.yml index eeccdd16c8..3750073596 100644 --- a/acceptance/bundle/deploy/python-notebook/databricks.yml +++ b/acceptance/bundle/deploy/python-notebook/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + sync: {paths: []} # dont need to copy files resources: diff --git a/acceptance/bundle/deployment/bind/alert/test.toml b/acceptance/bundle/deployment/bind/alert/test.toml index f1ac73233a..b3f771403c 100644 --- a/acceptance/bundle/deployment/bind/alert/test.toml +++ b/acceptance/bundle/deployment/bind/alert/test.toml @@ -1,8 +1,6 @@ Cloud = true Local = false -BundleConfigTarget = "databricks.yml" - # On aws the host URL includes the workspace ID as well. Thus skipping it to keep the test simple. CloudEnvs.aws = false diff --git a/acceptance/bundle/deployment/bind/cluster/databricks.yml.tmpl b/acceptance/bundle/deployment/bind/cluster/databricks.yml.tmpl index b485983cbf..4870eaed40 100644 --- a/acceptance/bundle/deployment/bind/cluster/databricks.yml.tmpl +++ b/acceptance/bundle/deployment/bind/cluster/databricks.yml.tmpl @@ -1,3 +1,6 @@ +bundle: + name: test-bundle-$UNIQUE_NAME + resources: clusters: cluster1: diff --git a/acceptance/bundle/deployment/bind/dashboard/databricks.yml.tmpl b/acceptance/bundle/deployment/bind/dashboard/databricks.yml.tmpl index eb9508817d..bb8cfeed03 100644 --- a/acceptance/bundle/deployment/bind/dashboard/databricks.yml.tmpl +++ b/acceptance/bundle/deployment/bind/dashboard/databricks.yml.tmpl @@ -1,3 +1,6 @@ +bundle: + name: test-bundle-$UNIQUE_NAME + resources: dashboards: dashboard1: diff --git a/acceptance/bundle/deployment/bind/dashboard/recreation/databricks.yml.tmpl b/acceptance/bundle/deployment/bind/dashboard/recreation/databricks.yml.tmpl index 849e7a8d30..1afea5ee50 100644 --- a/acceptance/bundle/deployment/bind/dashboard/recreation/databricks.yml.tmpl +++ b/acceptance/bundle/deployment/bind/dashboard/recreation/databricks.yml.tmpl @@ -1,3 +1,6 @@ +bundle: + name: test-bundle-$UNIQUE_NAME + resources: dashboards: dashboard1: diff --git a/acceptance/bundle/deployment/bind/database_instance/databricks.yml b/acceptance/bundle/deployment/bind/database_instance/databricks.yml index 647362fb27..a2a37baebf 100644 --- a/acceptance/bundle/deployment/bind/database_instance/databricks.yml +++ b/acceptance/bundle/deployment/bind/database_instance/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: database_instances: database_instance1: diff --git a/acceptance/bundle/deployment/bind/database_instance/output.txt b/acceptance/bundle/deployment/bind/database_instance/output.txt index 71309cdc88..b9da270a12 100644 --- a/acceptance/bundle/deployment/bind/database_instance/output.txt +++ b/acceptance/bundle/deployment/bind/database_instance/output.txt @@ -5,11 +5,11 @@ Successfully bound database_instance with an id '[UUID]' Run 'bundle deploy' to deploy changes to your workspace >>> [CLI] bundle summary -Name: test-bundle-$UNIQUE_NAME +Name: test-bundle Target: default Workspace: User: [USERNAME] - Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle-$UNIQUE_NAME/default + Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default Resources: Database instances: database_instance1: @@ -20,11 +20,11 @@ Resources: Updating deployment state... >>> [CLI] bundle summary -Name: test-bundle-$UNIQUE_NAME +Name: test-bundle Target: default Workspace: User: [USERNAME] - Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle-$UNIQUE_NAME/default + Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default Resources: Database instances: database_instance1: diff --git a/acceptance/bundle/deployment/bind/database_instance/test.toml b/acceptance/bundle/deployment/bind/database_instance/test.toml index 7f6d17514c..6b1bcafac7 100644 --- a/acceptance/bundle/deployment/bind/database_instance/test.toml +++ b/acceptance/bundle/deployment/bind/database_instance/test.toml @@ -1,6 +1,5 @@ Local = true Cloud = false -BundleConfigTarget = "databricks.yml" Ignore = [ ".databricks" diff --git a/acceptance/bundle/deployment/bind/experiment/databricks.yml b/acceptance/bundle/deployment/bind/experiment/databricks.yml.tmpl similarity index 63% rename from acceptance/bundle/deployment/bind/experiment/databricks.yml rename to acceptance/bundle/deployment/bind/experiment/databricks.yml.tmpl index 45e32e45df..84cfdda91f 100644 --- a/acceptance/bundle/deployment/bind/experiment/databricks.yml +++ b/acceptance/bundle/deployment/bind/experiment/databricks.yml.tmpl @@ -1,3 +1,6 @@ +bundle: + name: test-bundle-$UNIQUE_NAME + resources: experiments: experiment1: diff --git a/acceptance/bundle/deployment/bind/experiment/script b/acceptance/bundle/deployment/bind/experiment/script index b4e0b21692..2b5c0b4b16 100644 --- a/acceptance/bundle/deployment/bind/experiment/script +++ b/acceptance/bundle/deployment/bind/experiment/script @@ -8,7 +8,7 @@ if [ -z "$CLOUD_ENV" ]; then EXPERIMENT_NAME="//Workspace/Users/${CURRENT_USER_NAME}/test-experiment6260d50f-e8ff-4905-8f28-812345678903" # use hard-coded uuid when running locally fi export EXPERIMENT_NAME -envsubst < databricks.yml > out.yml && mv out.yml databricks.yml +envsubst < databricks.yml.tmpl > databricks.yml title "Create a pre-defined experiment" EXPERIMENT_ID=$($CLI experiments create-experiment "${EXPERIMENT_NAME}" | jq -r '.experiment_id') diff --git a/acceptance/bundle/deployment/bind/experiment/test.toml b/acceptance/bundle/deployment/bind/experiment/test.toml index 3b8c14b4b8..dc3409fb35 100644 --- a/acceptance/bundle/deployment/bind/experiment/test.toml +++ b/acceptance/bundle/deployment/bind/experiment/test.toml @@ -1,6 +1,5 @@ Local = true Cloud = true -BundleConfigTarget = "databricks.yml" [[Server]] Pattern = "POST /api/2.0/mlflow/experiments/create" diff --git a/acceptance/bundle/deployment/bind/job/job-abort-bind/script b/acceptance/bundle/deployment/bind/job/job-abort-bind/script index 6cc97b6533..5ddb88e556 100644 --- a/acceptance/bundle/deployment/bind/job/job-abort-bind/script +++ b/acceptance/bundle/deployment/bind/job/job-abort-bind/script @@ -1,4 +1,4 @@ -cp -r $TESTDIR/../job-spark-python-task/{databricks.yml.tmpl,hello_world.py} . +cp -r $TESTDIR/../job-spark-python-task/hello_world.py . title "Create a pre-defined job:\n" @@ -24,7 +24,7 @@ JOB_ID=$($CLI jobs create --json ' echo "Created job with ID: $JOB_ID" -envsubst < databricks.yml.tmpl > databricks.yml +envsubst < $TESTDIR/../job-spark-python-task/databricks.yml.tmpl > databricks.yml cleanup() { title "Delete the pre-defined job $JOB_ID:" diff --git a/acceptance/bundle/deployment/bind/model-serving-endpoint/databricks.yml.tmpl b/acceptance/bundle/deployment/bind/model-serving-endpoint/databricks.yml.tmpl index 0fa173a02f..78013000a1 100644 --- a/acceptance/bundle/deployment/bind/model-serving-endpoint/databricks.yml.tmpl +++ b/acceptance/bundle/deployment/bind/model-serving-endpoint/databricks.yml.tmpl @@ -1,3 +1,6 @@ +bundle: + name: test-bundle-$UNIQUE_NAME + resources: model_serving_endpoints: endpoint1: diff --git a/acceptance/bundle/deployment/bind/model-serving-endpoint/output.txt b/acceptance/bundle/deployment/bind/model-serving-endpoint/output.txt index 2516ab002f..885d7cac7f 100644 --- a/acceptance/bundle/deployment/bind/model-serving-endpoint/output.txt +++ b/acceptance/bundle/deployment/bind/model-serving-endpoint/output.txt @@ -1,5 +1,6 @@ bundle: name: test-bundle-[UNIQUE_NAME] + resources: model_serving_endpoints: endpoint1: diff --git a/acceptance/bundle/deployment/bind/registered-model/databricks.yml.tmpl b/acceptance/bundle/deployment/bind/registered-model/databricks.yml.tmpl index b40c5fc230..59d2fea58f 100644 --- a/acceptance/bundle/deployment/bind/registered-model/databricks.yml.tmpl +++ b/acceptance/bundle/deployment/bind/registered-model/databricks.yml.tmpl @@ -1,3 +1,6 @@ +bundle: + name: test-bundle-$UNIQUE_NAME + resources: registered_models: model1: diff --git a/acceptance/bundle/deployment/bind/registered-model/output.txt b/acceptance/bundle/deployment/bind/registered-model/output.txt index fb9dd1c56d..0c8b8cb86a 100644 --- a/acceptance/bundle/deployment/bind/registered-model/output.txt +++ b/acceptance/bundle/deployment/bind/registered-model/output.txt @@ -1,10 +1,11 @@ bundle: name: test-bundle-[UNIQUE_NAME] + resources: registered_models: model1: - catalog_name: main name: test-registered-model-[UUID] + catalog_name: main schema_name: test-schema-rmodel-[UUID] >>> [CLI] schemas create test-schema-rmodel-[UUID] main diff --git a/acceptance/bundle/deployment/bind/schema/databricks.yml b/acceptance/bundle/deployment/bind/schema/databricks.yml.tmpl similarity index 76% rename from acceptance/bundle/deployment/bind/schema/databricks.yml rename to acceptance/bundle/deployment/bind/schema/databricks.yml.tmpl index 47bd0239bb..d7fb4f371b 100644 --- a/acceptance/bundle/deployment/bind/schema/databricks.yml +++ b/acceptance/bundle/deployment/bind/schema/databricks.yml.tmpl @@ -1,3 +1,6 @@ +bundle: + name: test-bundle-$UNIQUE_NAME + resources: schemas: schema1: diff --git a/acceptance/bundle/deployment/bind/schema/script b/acceptance/bundle/deployment/bind/schema/script index 489ee8a778..87373740f9 100644 --- a/acceptance/bundle/deployment/bind/schema/script +++ b/acceptance/bundle/deployment/bind/schema/script @@ -5,7 +5,7 @@ export SCHEMA_NAME="test-schema-$(uuid)" if [ -z "$CLOUD_ENV" ]; then export SCHEMA_NAME="test-schema-6260d50f-e8ff-4905-8f28-812345678903" # use hard-coded uuid when running locally fi -envsubst < databricks.yml > out.yml && mv out.yml databricks.yml +envsubst < databricks.yml.tmpl > databricks.yml title "Create a pre-defined schema: " CATALOG_NAME=main diff --git a/acceptance/bundle/deployment/bind/schema/test.toml b/acceptance/bundle/deployment/bind/schema/test.toml index 71c7cb0370..f5706bb0af 100644 --- a/acceptance/bundle/deployment/bind/schema/test.toml +++ b/acceptance/bundle/deployment/bind/schema/test.toml @@ -1,4 +1,3 @@ Local = true Cloud = true RequiresUnityCatalog = true -BundleConfigTarget = "databricks.yml" diff --git a/acceptance/bundle/deployment/bind/sql_warehouse/databricks.yml b/acceptance/bundle/deployment/bind/sql_warehouse/databricks.yml index 14b1f060f1..30f88c4f99 100644 --- a/acceptance/bundle/deployment/bind/sql_warehouse/databricks.yml +++ b/acceptance/bundle/deployment/bind/sql_warehouse/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: sql_warehouses: sql_warehouse1: diff --git a/acceptance/bundle/deployment/bind/sql_warehouse/output.txt b/acceptance/bundle/deployment/bind/sql_warehouse/output.txt index 67a882e2c1..8ec970d6c1 100644 --- a/acceptance/bundle/deployment/bind/sql_warehouse/output.txt +++ b/acceptance/bundle/deployment/bind/sql_warehouse/output.txt @@ -5,11 +5,11 @@ Successfully bound sql_warehouse with an id '[SQL-WAREHOUSE-ID]' Run 'bundle deploy' to deploy changes to your workspace >>> [CLI] bundle summary -Name: test-bundle-$UNIQUE_NAME +Name: test-bundle Target: default Workspace: User: [USERNAME] - Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle-$UNIQUE_NAME/default + Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default Resources: SQL Warehouses: sql_warehouse1: @@ -20,11 +20,11 @@ Resources: Updating deployment state... >>> [CLI] bundle summary -Name: test-bundle-$UNIQUE_NAME +Name: test-bundle Target: default Workspace: User: [USERNAME] - Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle-$UNIQUE_NAME/default + Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default Resources: SQL Warehouses: sql_warehouse1: diff --git a/acceptance/bundle/deployment/bind/sql_warehouse/test.toml b/acceptance/bundle/deployment/bind/sql_warehouse/test.toml index 5ddbbb496e..d61830b1fb 100644 --- a/acceptance/bundle/deployment/bind/sql_warehouse/test.toml +++ b/acceptance/bundle/deployment/bind/sql_warehouse/test.toml @@ -1,6 +1,5 @@ Local = true Cloud = false -BundleConfigTarget = "databricks.yml" Ignore = [ ".databricks" diff --git a/acceptance/bundle/deployment/bind/test.toml b/acceptance/bundle/deployment/bind/test.toml deleted file mode 100644 index 5f99440260..0000000000 --- a/acceptance/bundle/deployment/bind/test.toml +++ /dev/null @@ -1,2 +0,0 @@ -BundleConfig.default_name.bundle.name = "test-bundle-$UNIQUE_NAME" -BundleConfigTarget = "databricks.yml.tmpl" diff --git a/acceptance/bundle/deployment/bind/volume/databricks.yml.tmpl b/acceptance/bundle/deployment/bind/volume/databricks.yml.tmpl index b38db9e97d..0fe75e0055 100644 --- a/acceptance/bundle/deployment/bind/volume/databricks.yml.tmpl +++ b/acceptance/bundle/deployment/bind/volume/databricks.yml.tmpl @@ -1,3 +1,6 @@ +bundle: + name: test-bundle-$UNIQUE_NAME + resources: volumes: volume1: diff --git a/acceptance/bundle/destroy/all-resources/databricks.yml b/acceptance/bundle/destroy/all-resources/databricks.yml index 8020b7ec5a..bfca5ee1be 100644 --- a/acceptance/bundle/destroy/all-resources/databricks.yml +++ b/acceptance/bundle/destroy/all-resources/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: pipelines: my_pipeline: diff --git a/acceptance/bundle/experimental/skip_name_prefix_for_schema/databricks.yml b/acceptance/bundle/experimental/skip_name_prefix_for_schema/databricks.yml index b0c39687cc..2e71e0fbec 100644 --- a/acceptance/bundle/experimental/skip_name_prefix_for_schema/databricks.yml +++ b/acceptance/bundle/experimental/skip_name_prefix_for_schema/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + variables: skip: default: false diff --git a/acceptance/bundle/generate/dashboard_existing_id_not_found/databricks.yml b/acceptance/bundle/generate/dashboard_existing_id_not_found/databricks.yml new file mode 100644 index 0000000000..576d7a9ef2 --- /dev/null +++ b/acceptance/bundle/generate/dashboard_existing_id_not_found/databricks.yml @@ -0,0 +1,2 @@ +bundle: + name: test-bundle diff --git a/acceptance/bundle/generate/dashboard_existing_path_not_found/databricks.yml b/acceptance/bundle/generate/dashboard_existing_path_not_found/databricks.yml new file mode 100644 index 0000000000..576d7a9ef2 --- /dev/null +++ b/acceptance/bundle/generate/dashboard_existing_path_not_found/databricks.yml @@ -0,0 +1,2 @@ +bundle: + name: test-bundle diff --git a/acceptance/bundle/generate/lakeflow_pipelines/databricks.yml b/acceptance/bundle/generate/lakeflow_pipelines/databricks.yml new file mode 100644 index 0000000000..576d7a9ef2 --- /dev/null +++ b/acceptance/bundle/generate/lakeflow_pipelines/databricks.yml @@ -0,0 +1,2 @@ +bundle: + name: test-bundle diff --git a/acceptance/bundle/includes/glob_in_root_path/[abc]/databricks.yml b/acceptance/bundle/includes/glob_in_root_path/[abc]/databricks.yml index e69de29bb2..576d7a9ef2 100644 --- a/acceptance/bundle/includes/glob_in_root_path/[abc]/databricks.yml +++ b/acceptance/bundle/includes/glob_in_root_path/[abc]/databricks.yml @@ -0,0 +1,2 @@ +bundle: + name: test-bundle diff --git a/acceptance/bundle/includes/glob_in_root_path/output.txt b/acceptance/bundle/includes/glob_in_root_path/output.txt index 5012e71f2e..7dee5d8dc7 100644 --- a/acceptance/bundle/includes/glob_in_root_path/output.txt +++ b/acceptance/bundle/includes/glob_in_root_path/output.txt @@ -4,6 +4,7 @@ Error: Bundle root path contains glob pattern characters The path to the bundle root [TEST_TMP_DIR]/[abc] contains glob pattern character "[". Please remove the character from this path to use bundle commands. +Name: test-bundle Found 1 error diff --git a/acceptance/bundle/override/clusters/databricks.yml b/acceptance/bundle/override/clusters/databricks.yml index ead509b509..65afcca00c 100644 --- a/acceptance/bundle/override/clusters/databricks.yml +++ b/acceptance/bundle/override/clusters/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: clusters: foo: diff --git a/acceptance/bundle/override/job_cluster/databricks.yml b/acceptance/bundle/override/job_cluster/databricks.yml index ba7bd8cceb..b0abc95da9 100644 --- a/acceptance/bundle/override/job_cluster/databricks.yml +++ b/acceptance/bundle/override/job_cluster/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: foo: diff --git a/acceptance/bundle/override/job_cluster_var/databricks.yml b/acceptance/bundle/override/job_cluster_var/databricks.yml index 35fdb34f08..4f7003a073 100644 --- a/acceptance/bundle/override/job_cluster_var/databricks.yml +++ b/acceptance/bundle/override/job_cluster_var/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + variables: mykey: default: key diff --git a/acceptance/bundle/override/job_tasks/databricks.yml b/acceptance/bundle/override/job_tasks/databricks.yml index 1799538957..2dee318f1c 100644 --- a/acceptance/bundle/override/job_tasks/databricks.yml +++ b/acceptance/bundle/override/job_tasks/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: foo: diff --git a/acceptance/bundle/override/pipeline_cluster/databricks.yml b/acceptance/bundle/override/pipeline_cluster/databricks.yml index 8f448ab361..66c23088e0 100644 --- a/acceptance/bundle/override/pipeline_cluster/databricks.yml +++ b/acceptance/bundle/override/pipeline_cluster/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: pipelines: foo: diff --git a/acceptance/bundle/paths/pipeline_root_path_doesnotexist/databricks.yml b/acceptance/bundle/paths/pipeline_root_path_doesnotexist/databricks.yml index 66622ab0bc..66aae91b34 100644 --- a/acceptance/bundle/paths/pipeline_root_path_doesnotexist/databricks.yml +++ b/acceptance/bundle/paths/pipeline_root_path_doesnotexist/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: pipelines: abc: diff --git a/acceptance/bundle/resource_deps/bad_ref_string_to_int/databricks.yml b/acceptance/bundle/resource_deps/bad_ref_string_to_int/databricks.yml index 775466236a..848d2792dc 100644 --- a/acceptance/bundle/resource_deps/bad_ref_string_to_int/databricks.yml +++ b/acceptance/bundle/resource_deps/bad_ref_string_to_int/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: bar: diff --git a/acceptance/bundle/resource_deps/bad_syntax/databricks.yml b/acceptance/bundle/resource_deps/bad_syntax/databricks.yml index 93258014c1..40df9075b6 100644 --- a/acceptance/bundle/resource_deps/bad_syntax/databricks.yml +++ b/acceptance/bundle/resource_deps/bad_syntax/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: volumes: bar: diff --git a/acceptance/bundle/resource_deps/create_error/databricks.yml b/acceptance/bundle/resource_deps/create_error/databricks.yml index 09a918df4c..74cf7530e9 100644 --- a/acceptance/bundle/resource_deps/create_error/databricks.yml +++ b/acceptance/bundle/resource_deps/create_error/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: foo: diff --git a/acceptance/bundle/resource_deps/id_chain/databricks.yml b/acceptance/bundle/resource_deps/id_chain/databricks.yml index ea07b19c01..b44f436a4e 100644 --- a/acceptance/bundle/resource_deps/id_chain/databricks.yml +++ b/acceptance/bundle/resource_deps/id_chain/databricks.yml @@ -1,3 +1,5 @@ +bundle: + name: test-bundle resources: jobs: diff --git a/acceptance/bundle/resource_deps/id_star/databricks.yml b/acceptance/bundle/resource_deps/id_star/databricks.yml index 0bbb6bca43..dd30ff5722 100644 --- a/acceptance/bundle/resource_deps/id_star/databricks.yml +++ b/acceptance/bundle/resource_deps/id_star/databricks.yml @@ -1,3 +1,5 @@ +bundle: + name: test-bundle resources: jobs: diff --git a/acceptance/bundle/resource_deps/job_tasks/databricks.yml b/acceptance/bundle/resource_deps/job_tasks/databricks.yml index 236e58c215..11dd530947 100644 --- a/acceptance/bundle/resource_deps/job_tasks/databricks.yml +++ b/acceptance/bundle/resource_deps/job_tasks/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: test_job: diff --git a/acceptance/bundle/resource_deps/jobs_update/databricks.yml b/acceptance/bundle/resource_deps/jobs_update/databricks.yml index 29506d0268..f86097687f 100644 --- a/acceptance/bundle/resource_deps/jobs_update/databricks.yml +++ b/acceptance/bundle/resource_deps/jobs_update/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: foo: diff --git a/acceptance/bundle/resource_deps/jobs_update_remote/databricks.yml b/acceptance/bundle/resource_deps/jobs_update_remote/databricks.yml index 29506d0268..f86097687f 100644 --- a/acceptance/bundle/resource_deps/jobs_update_remote/databricks.yml +++ b/acceptance/bundle/resource_deps/jobs_update_remote/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: foo: diff --git a/acceptance/bundle/resource_deps/missing_ingestion_definition/databricks.yml b/acceptance/bundle/resource_deps/missing_ingestion_definition/databricks.yml index cff7c8546a..1b4f442e46 100644 --- a/acceptance/bundle/resource_deps/missing_ingestion_definition/databricks.yml +++ b/acceptance/bundle/resource_deps/missing_ingestion_definition/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: pipelines: foo: diff --git a/acceptance/bundle/resource_deps/missing_string_field/databricks.yml b/acceptance/bundle/resource_deps/missing_string_field/databricks.yml index ab254d3798..a1f5ca4bbe 100644 --- a/acceptance/bundle/resource_deps/missing_string_field/databricks.yml +++ b/acceptance/bundle/resource_deps/missing_string_field/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: pipelines: foo: diff --git a/acceptance/bundle/resource_deps/non_existent_field/databricks.yml b/acceptance/bundle/resource_deps/non_existent_field/databricks.yml index 54cf1f8b9b..8ac3510f64 100644 --- a/acceptance/bundle/resource_deps/non_existent_field/databricks.yml +++ b/acceptance/bundle/resource_deps/non_existent_field/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: volumes: bar: diff --git a/acceptance/bundle/resource_deps/pipelines_recreate/databricks.yml b/acceptance/bundle/resource_deps/pipelines_recreate/databricks.yml index 273d60fbf3..50791666f7 100644 --- a/acceptance/bundle/resource_deps/pipelines_recreate/databricks.yml +++ b/acceptance/bundle/resource_deps/pipelines_recreate/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: pipelines: foo: diff --git a/acceptance/bundle/resource_deps/present_ingestion_definition/databricks.yml b/acceptance/bundle/resource_deps/present_ingestion_definition/databricks.yml index a195ab5e37..96c0ea1d32 100644 --- a/acceptance/bundle/resource_deps/present_ingestion_definition/databricks.yml +++ b/acceptance/bundle/resource_deps/present_ingestion_definition/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: pipelines: foo: diff --git a/acceptance/bundle/resource_deps/remote_app_url/databricks.yml b/acceptance/bundle/resource_deps/remote_app_url/databricks.yml index 19113ec6f1..2441e8c620 100644 --- a/acceptance/bundle/resource_deps/remote_app_url/databricks.yml +++ b/acceptance/bundle/resource_deps/remote_app_url/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + sync: exclude: - "*.*" diff --git a/acceptance/bundle/resource_deps/remote_pipeline/databricks.yml b/acceptance/bundle/resource_deps/remote_pipeline/databricks.yml index 96b46e2ce6..dcf084e618 100644 --- a/acceptance/bundle/resource_deps/remote_pipeline/databricks.yml +++ b/acceptance/bundle/resource_deps/remote_pipeline/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: pipelines: foo1: diff --git a/acceptance/bundle/resource_deps/resources_var/databricks.yml b/acceptance/bundle/resource_deps/resources_var/databricks.yml index 574ef535ac..130300150c 100644 --- a/acceptance/bundle/resource_deps/resources_var/databricks.yml +++ b/acceptance/bundle/resource_deps/resources_var/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: volumes: bar: diff --git a/acceptance/bundle/resource_deps/resources_var_presets/databricks.yml b/acceptance/bundle/resource_deps/resources_var_presets/databricks.yml index b6d0a48353..b9486a2a7c 100644 --- a/acceptance/bundle/resource_deps/resources_var_presets/databricks.yml +++ b/acceptance/bundle/resource_deps/resources_var_presets/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + # this tests presets that modify schema are visible in $resources references resources: schemas: diff --git a/acceptance/bundle/resource_deps/resources_var_presets_implicit_deps/databricks.yml b/acceptance/bundle/resource_deps/resources_var_presets_implicit_deps/databricks.yml index 235029aa29..62adf01bd5 100644 --- a/acceptance/bundle/resource_deps/resources_var_presets_implicit_deps/databricks.yml +++ b/acceptance/bundle/resource_deps/resources_var_presets_implicit_deps/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + # this tests resolution of $resources in presence of complicating factors: # - presets that modify schema name # - implicit dependencies between schema and volume which inject $resource references diff --git a/acceptance/bundle/resources/apps/default_description/databricks.yml b/acceptance/bundle/resources/apps/default_description/databricks.yml index ddc76d955a..b6fd5f2db5 100644 --- a/acceptance/bundle/resources/apps/default_description/databricks.yml +++ b/acceptance/bundle/resources/apps/default_description/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: apps: mykey: diff --git a/acceptance/bundle/resources/apps/update/databricks.yml b/acceptance/bundle/resources/apps/update/databricks.yml index 75f131a0ef..6a74ae8e35 100644 --- a/acceptance/bundle/resources/apps/update/databricks.yml +++ b/acceptance/bundle/resources/apps/update/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: apps: mykey: diff --git a/acceptance/bundle/resources/independent/databricks.yml b/acceptance/bundle/resources/independent/databricks.yml index 4b21e81cae..60f257f5d5 100644 --- a/acceptance/bundle/resources/independent/databricks.yml +++ b/acceptance/bundle/resources/independent/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + # independent resources resources: diff --git a/acceptance/bundle/resources/jobs/big_id/databricks.yml b/acceptance/bundle/resources/jobs/big_id/databricks.yml index 69ce43f0d3..6a6f1db464 100644 --- a/acceptance/bundle/resources/jobs/big_id/databricks.yml +++ b/acceptance/bundle/resources/jobs/big_id/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + # Note, I'm not testing jobs here. I'm testing how encoder/decoders work with int64, job_id is just a field that came up. resources: jobs: diff --git a/acceptance/bundle/resources/jobs/create-error/databricks.yml b/acceptance/bundle/resources/jobs/create-error/databricks.yml index 31e5473d1f..f3a320b487 100644 --- a/acceptance/bundle/resources/jobs/create-error/databricks.yml +++ b/acceptance/bundle/resources/jobs/create-error/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: foo: diff --git a/acceptance/bundle/resources/jobs/instance_pool_and_node_type/databricks.yml b/acceptance/bundle/resources/jobs/instance_pool_and_node_type/databricks.yml index d4912e2751..dfae4d46ba 100644 --- a/acceptance/bundle/resources/jobs/instance_pool_and_node_type/databricks.yml +++ b/acceptance/bundle/resources/jobs/instance_pool_and_node_type/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: some_other_job: diff --git a/acceptance/bundle/resources/jobs/remote_add_tag/databricks.yml b/acceptance/bundle/resources/jobs/remote_add_tag/databricks.yml index 878160bf4b..3403d07bae 100644 --- a/acceptance/bundle/resources/jobs/remote_add_tag/databricks.yml +++ b/acceptance/bundle/resources/jobs/remote_add_tag/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: foo: diff --git a/acceptance/bundle/resources/jobs/remote_delete/deploy/databricks.yml b/acceptance/bundle/resources/jobs/remote_delete/deploy/databricks.yml index 2706690424..e6d4ec58bc 100644 --- a/acceptance/bundle/resources/jobs/remote_delete/deploy/databricks.yml +++ b/acceptance/bundle/resources/jobs/remote_delete/deploy/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: foo: diff --git a/acceptance/bundle/resources/jobs/remote_delete/destroy/databricks.yml b/acceptance/bundle/resources/jobs/remote_delete/destroy/databricks.yml index 2706690424..e6d4ec58bc 100644 --- a/acceptance/bundle/resources/jobs/remote_delete/destroy/databricks.yml +++ b/acceptance/bundle/resources/jobs/remote_delete/destroy/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: foo: diff --git a/acceptance/bundle/resources/jobs/update/databricks.yml b/acceptance/bundle/resources/jobs/update/databricks.yml index 2706690424..e6d4ec58bc 100644 --- a/acceptance/bundle/resources/jobs/update/databricks.yml +++ b/acceptance/bundle/resources/jobs/update/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: foo: diff --git a/acceptance/bundle/resources/jobs/update_single_node/databricks.yml b/acceptance/bundle/resources/jobs/update_single_node/databricks.yml index 3bf106fd8e..646b206376 100644 --- a/acceptance/bundle/resources/jobs/update_single_node/databricks.yml +++ b/acceptance/bundle/resources/jobs/update_single_node/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: foo: diff --git a/acceptance/bundle/resources/permissions/apps/current_can_manage/databricks.yml b/acceptance/bundle/resources/permissions/apps/current_can_manage/databricks.yml index 31165f7560..fbd462715a 100644 --- a/acceptance/bundle/resources/permissions/apps/current_can_manage/databricks.yml +++ b/acceptance/bundle/resources/permissions/apps/current_can_manage/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: apps: foo: diff --git a/acceptance/bundle/resources/permissions/apps/other_can_manage/databricks.yml b/acceptance/bundle/resources/permissions/apps/other_can_manage/databricks.yml index dcfce07de9..f7f2532318 100644 --- a/acceptance/bundle/resources/permissions/apps/other_can_manage/databricks.yml +++ b/acceptance/bundle/resources/permissions/apps/other_can_manage/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: apps: foo: diff --git a/acceptance/bundle/resources/permissions/clusters/current_can_manage/databricks.yml b/acceptance/bundle/resources/permissions/clusters/current_can_manage/databricks.yml index df0416db34..9dcea5b7dc 100644 --- a/acceptance/bundle/resources/permissions/clusters/current_can_manage/databricks.yml +++ b/acceptance/bundle/resources/permissions/clusters/current_can_manage/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: clusters: foo: diff --git a/acceptance/bundle/resources/permissions/clusters/target/databricks.yml b/acceptance/bundle/resources/permissions/clusters/target/databricks.yml index 6190b33989..9b6803d5df 100644 --- a/acceptance/bundle/resources/permissions/clusters/target/databricks.yml +++ b/acceptance/bundle/resources/permissions/clusters/target/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + targets: dev: mode: development diff --git a/acceptance/bundle/resources/permissions/clusters/target/output.txt b/acceptance/bundle/resources/permissions/clusters/target/output.txt index b96db96867..66a79a8d83 100644 --- a/acceptance/bundle/resources/permissions/clusters/target/output.txt +++ b/acceptance/bundle/resources/permissions/clusters/target/output.txt @@ -10,7 +10,7 @@ Consider using a adding a top-level permissions section such as the following: level: CAN_MANAGE See https://docs.databricks.com/dev-tools/bundles/permissions.html to learn more about permission configuration. - in databricks.yml:15:7 + in databricks.yml:9:7 { "clusters": { @@ -56,7 +56,7 @@ Consider using a adding a top-level permissions section such as the following: level: CAN_MANAGE See https://docs.databricks.com/dev-tools/bundles/permissions.html to learn more about permission configuration. - in databricks.yml:15:7 + in databricks.yml:9:7 Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/dev/files... Deploying resources... diff --git a/acceptance/bundle/resources/permissions/database_instances/current_can_manage/databricks.yml b/acceptance/bundle/resources/permissions/database_instances/current_can_manage/databricks.yml index ce72f414f7..288e44646c 100644 --- a/acceptance/bundle/resources/permissions/database_instances/current_can_manage/databricks.yml +++ b/acceptance/bundle/resources/permissions/database_instances/current_can_manage/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: database_instances: foo: diff --git a/acceptance/bundle/resources/permissions/database_instances/current_can_manage/output.txt b/acceptance/bundle/resources/permissions/database_instances/current_can_manage/output.txt index ccaea6ee49..092bc944ed 100644 --- a/acceptance/bundle/resources/permissions/database_instances/current_can_manage/output.txt +++ b/acceptance/bundle/resources/permissions/database_instances/current_can_manage/output.txt @@ -2,11 +2,11 @@ >>> [CLI] bundle validate -o json Warning: unknown field: catalog_name at resources.database_instances.foo - in databricks.yml:6:7 + in databricks.yml:8:7 Warning: unknown field: instance_profile_arn at resources.database_instances.foo - in databricks.yml:7:7 + in databricks.yml:9:7 [ { @@ -28,21 +28,21 @@ Warning: unknown field: instance_profile_arn ] Warning: unknown field: catalog_name at resources.database_instances.foo - in databricks.yml:6:7 + in databricks.yml:8:7 Warning: unknown field: instance_profile_arn at resources.database_instances.foo - in databricks.yml:7:7 + in databricks.yml:9:7 >>> [CLI] bundle deploy Warning: unknown field: catalog_name at resources.database_instances.foo - in databricks.yml:6:7 + in databricks.yml:8:7 Warning: unknown field: instance_profile_arn at resources.database_instances.foo - in databricks.yml:7:7 + in databricks.yml:9:7 Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... Deploying resources... @@ -52,11 +52,11 @@ Deployment complete! >>> [CLI] bundle destroy --auto-approve Warning: unknown field: catalog_name at resources.database_instances.foo - in databricks.yml:6:7 + in databricks.yml:8:7 Warning: unknown field: instance_profile_arn at resources.database_instances.foo - in databricks.yml:7:7 + in databricks.yml:9:7 The following resources will be deleted: delete resources.database_instances.foo diff --git a/acceptance/bundle/resources/permissions/experiments/current_can_manage/databricks.yml b/acceptance/bundle/resources/permissions/experiments/current_can_manage/databricks.yml index 855dad445c..6ab1d34fcc 100644 --- a/acceptance/bundle/resources/permissions/experiments/current_can_manage/databricks.yml +++ b/acceptance/bundle/resources/permissions/experiments/current_can_manage/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: experiments: foo: diff --git a/acceptance/bundle/resources/permissions/jobs/current_can_manage/databricks.yml b/acceptance/bundle/resources/permissions/jobs/current_can_manage/databricks.yml index b61ff2dc40..e7110d0d6c 100644 --- a/acceptance/bundle/resources/permissions/jobs/current_can_manage/databricks.yml +++ b/acceptance/bundle/resources/permissions/jobs/current_can_manage/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: foo: diff --git a/acceptance/bundle/resources/permissions/jobs/current_is_owner/databricks.yml b/acceptance/bundle/resources/permissions/jobs/current_is_owner/databricks.yml index 95a0605db6..ba82602d31 100644 --- a/acceptance/bundle/resources/permissions/jobs/current_is_owner/databricks.yml +++ b/acceptance/bundle/resources/permissions/jobs/current_is_owner/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: foo: diff --git a/acceptance/bundle/resources/permissions/jobs/empty_list/databricks.yml b/acceptance/bundle/resources/permissions/jobs/empty_list/databricks.yml index 2c17176359..79f03b68bd 100644 --- a/acceptance/bundle/resources/permissions/jobs/empty_list/databricks.yml +++ b/acceptance/bundle/resources/permissions/jobs/empty_list/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: foo: diff --git a/acceptance/bundle/resources/permissions/jobs/other_can_manage/databricks.yml b/acceptance/bundle/resources/permissions/jobs/other_can_manage/databricks.yml index bfea36830c..5972145e97 100644 --- a/acceptance/bundle/resources/permissions/jobs/other_can_manage/databricks.yml +++ b/acceptance/bundle/resources/permissions/jobs/other_can_manage/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: foo: diff --git a/acceptance/bundle/resources/permissions/jobs/other_is_owner/databricks.yml b/acceptance/bundle/resources/permissions/jobs/other_is_owner/databricks.yml index 15a7847e55..2eaf94ba9d 100644 --- a/acceptance/bundle/resources/permissions/jobs/other_is_owner/databricks.yml +++ b/acceptance/bundle/resources/permissions/jobs/other_is_owner/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: foo: diff --git a/acceptance/bundle/resources/permissions/jobs/viewers/databricks.yml b/acceptance/bundle/resources/permissions/jobs/viewers/databricks.yml index d71552c0fa..0191ec26fe 100644 --- a/acceptance/bundle/resources/permissions/jobs/viewers/databricks.yml +++ b/acceptance/bundle/resources/permissions/jobs/viewers/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: foo: diff --git a/acceptance/bundle/resources/permissions/models/current_can_manage/databricks.yml b/acceptance/bundle/resources/permissions/models/current_can_manage/databricks.yml index 311dd52ba2..7916c18d33 100644 --- a/acceptance/bundle/resources/permissions/models/current_can_manage/databricks.yml +++ b/acceptance/bundle/resources/permissions/models/current_can_manage/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: models: foo: diff --git a/acceptance/bundle/resources/permissions/pipelines/current_can_manage/databricks.yml b/acceptance/bundle/resources/permissions/pipelines/current_can_manage/databricks.yml index 81c7cf54fc..170c5006ab 100644 --- a/acceptance/bundle/resources/permissions/pipelines/current_can_manage/databricks.yml +++ b/acceptance/bundle/resources/permissions/pipelines/current_can_manage/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: pipelines: foo: diff --git a/acceptance/bundle/resources/permissions/pipelines/current_is_owner/databricks.yml b/acceptance/bundle/resources/permissions/pipelines/current_is_owner/databricks.yml index e2b71df99a..e9f9069718 100644 --- a/acceptance/bundle/resources/permissions/pipelines/current_is_owner/databricks.yml +++ b/acceptance/bundle/resources/permissions/pipelines/current_is_owner/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: pipelines: foo: diff --git a/acceptance/bundle/resources/permissions/pipelines/empty_list/databricks.yml b/acceptance/bundle/resources/permissions/pipelines/empty_list/databricks.yml index 72ec35bce7..6089d045ff 100644 --- a/acceptance/bundle/resources/permissions/pipelines/empty_list/databricks.yml +++ b/acceptance/bundle/resources/permissions/pipelines/empty_list/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: pipelines: foo: diff --git a/acceptance/bundle/resources/permissions/pipelines/other_can_manage/databricks.yml b/acceptance/bundle/resources/permissions/pipelines/other_can_manage/databricks.yml index 44f004e5fd..65c37b4fde 100644 --- a/acceptance/bundle/resources/permissions/pipelines/other_can_manage/databricks.yml +++ b/acceptance/bundle/resources/permissions/pipelines/other_can_manage/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: pipelines: foo: diff --git a/acceptance/bundle/resources/permissions/pipelines/other_is_owner/databricks.yml b/acceptance/bundle/resources/permissions/pipelines/other_is_owner/databricks.yml index eae383a878..f190f1f85b 100644 --- a/acceptance/bundle/resources/permissions/pipelines/other_is_owner/databricks.yml +++ b/acceptance/bundle/resources/permissions/pipelines/other_is_owner/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: pipelines: foo: diff --git a/acceptance/bundle/resources/permissions/sql_warehouses/current_can_manage/databricks.yml b/acceptance/bundle/resources/permissions/sql_warehouses/current_can_manage/databricks.yml index 72a1c7ae2e..d6c50cea8b 100644 --- a/acceptance/bundle/resources/permissions/sql_warehouses/current_can_manage/databricks.yml +++ b/acceptance/bundle/resources/permissions/sql_warehouses/current_can_manage/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: sql_warehouses: foo: diff --git a/acceptance/bundle/resources/schemas/recreate/databricks.yml b/acceptance/bundle/resources/schemas/recreate/databricks.yml index 5fe5ef38f7..97a6a3cfe2 100644 --- a/acceptance/bundle/resources/schemas/recreate/databricks.yml +++ b/acceptance/bundle/resources/schemas/recreate/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: schemas: schema1: diff --git a/acceptance/bundle/resources/schemas/update/databricks.yml b/acceptance/bundle/resources/schemas/update/databricks.yml index aa70973fb3..adb255dd2d 100644 --- a/acceptance/bundle/resources/schemas/update/databricks.yml +++ b/acceptance/bundle/resources/schemas/update/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: schemas: schema1: diff --git a/acceptance/bundle/resources/volumes/change-comment/databricks.yml b/acceptance/bundle/resources/volumes/change-comment/databricks.yml index ebb807e634..524ac87134 100644 --- a/acceptance/bundle/resources/volumes/change-comment/databricks.yml +++ b/acceptance/bundle/resources/volumes/change-comment/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: volumes: volume1: diff --git a/acceptance/bundle/resources/volumes/change-name/databricks.yml b/acceptance/bundle/resources/volumes/change-name/databricks.yml index ebb807e634..524ac87134 100644 --- a/acceptance/bundle/resources/volumes/change-name/databricks.yml +++ b/acceptance/bundle/resources/volumes/change-name/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: volumes: volume1: diff --git a/acceptance/bundle/resources/volumes/change-schema-name/databricks.yml b/acceptance/bundle/resources/volumes/change-schema-name/databricks.yml index ebb807e634..524ac87134 100644 --- a/acceptance/bundle/resources/volumes/change-schema-name/databricks.yml +++ b/acceptance/bundle/resources/volumes/change-schema-name/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: volumes: volume1: diff --git a/acceptance/bundle/resources/volumes/remote-change-name/databricks.yml b/acceptance/bundle/resources/volumes/remote-change-name/databricks.yml index 1a6383035b..8bd9ae8554 100644 --- a/acceptance/bundle/resources/volumes/remote-change-name/databricks.yml +++ b/acceptance/bundle/resources/volumes/remote-change-name/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: volumes: foo: diff --git a/acceptance/bundle/resources/volumes/remote-delete/databricks.yml b/acceptance/bundle/resources/volumes/remote-delete/databricks.yml index 1a6383035b..8bd9ae8554 100644 --- a/acceptance/bundle/resources/volumes/remote-delete/databricks.yml +++ b/acceptance/bundle/resources/volumes/remote-delete/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: volumes: foo: diff --git a/acceptance/bundle/run/inline-script/basic/databricks.yml b/acceptance/bundle/run/inline-script/basic/databricks.yml index e69de29bb2..576d7a9ef2 100644 --- a/acceptance/bundle/run/inline-script/basic/databricks.yml +++ b/acceptance/bundle/run/inline-script/basic/databricks.yml @@ -0,0 +1,2 @@ +bundle: + name: test-bundle diff --git a/acceptance/bundle/run/inline-script/cwd/databricks.yml b/acceptance/bundle/run/inline-script/cwd/databricks.yml index e69de29bb2..576d7a9ef2 100644 --- a/acceptance/bundle/run/inline-script/cwd/databricks.yml +++ b/acceptance/bundle/run/inline-script/cwd/databricks.yml @@ -0,0 +1,2 @@ +bundle: + name: test-bundle diff --git a/acceptance/bundle/run/inline-script/databricks-cli/profile-is-passed/from_flag/databricks.yml b/acceptance/bundle/run/inline-script/databricks-cli/profile-is-passed/from_flag/databricks.yml index e65571b90c..9845f9e0ab 100644 --- a/acceptance/bundle/run/inline-script/databricks-cli/profile-is-passed/from_flag/databricks.yml +++ b/acceptance/bundle/run/inline-script/databricks-cli/profile-is-passed/from_flag/databricks.yml @@ -1,2 +1,5 @@ +bundle: + name: test-bundle + workspace: profile: someprofile diff --git a/acceptance/bundle/run/inline-script/databricks-cli/target-is-passed/default/databricks.yml b/acceptance/bundle/run/inline-script/databricks-cli/target-is-passed/default/databricks.yml index 277f2d8c64..5bb3ef1807 100644 --- a/acceptance/bundle/run/inline-script/databricks-cli/target-is-passed/default/databricks.yml +++ b/acceptance/bundle/run/inline-script/databricks-cli/target-is-passed/default/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + targets: pat: default: true diff --git a/acceptance/bundle/run/inline-script/databricks-cli/target-is-passed/from_flag/databricks.yml b/acceptance/bundle/run/inline-script/databricks-cli/target-is-passed/from_flag/databricks.yml index 277f2d8c64..5bb3ef1807 100644 --- a/acceptance/bundle/run/inline-script/databricks-cli/target-is-passed/from_flag/databricks.yml +++ b/acceptance/bundle/run/inline-script/databricks-cli/target-is-passed/from_flag/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + targets: pat: default: true diff --git a/acceptance/bundle/run/inline-script/no-auth/databricks.yml b/acceptance/bundle/run/inline-script/no-auth/databricks.yml index e69de29bb2..576d7a9ef2 100644 --- a/acceptance/bundle/run/inline-script/no-auth/databricks.yml +++ b/acceptance/bundle/run/inline-script/no-auth/databricks.yml @@ -0,0 +1,2 @@ +bundle: + name: test-bundle diff --git a/acceptance/bundle/run/inline-script/no-bundle/test.toml b/acceptance/bundle/run/inline-script/no-bundle/test.toml deleted file mode 100644 index 0724077f7e..0000000000 --- a/acceptance/bundle/run/inline-script/no-bundle/test.toml +++ /dev/null @@ -1 +0,0 @@ -BundleConfig.default_name = "" diff --git a/acceptance/bundle/run/inline-script/no-separator/test.toml b/acceptance/bundle/run/inline-script/no-separator/test.toml deleted file mode 100644 index 0724077f7e..0000000000 --- a/acceptance/bundle/run/inline-script/no-separator/test.toml +++ /dev/null @@ -1 +0,0 @@ -BundleConfig.default_name = "" diff --git a/acceptance/bundle/run/no-state/databricks.yml b/acceptance/bundle/run/no-state/databricks.yml new file mode 100644 index 0000000000..576d7a9ef2 --- /dev/null +++ b/acceptance/bundle/run/no-state/databricks.yml @@ -0,0 +1,2 @@ +bundle: + name: test-bundle diff --git a/acceptance/bundle/run/scripts/basic/databricks.yml b/acceptance/bundle/run/scripts/basic/databricks.yml index ba77cd7b04..21c1e425f0 100644 --- a/acceptance/bundle/run/scripts/basic/databricks.yml +++ b/acceptance/bundle/run/scripts/basic/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + scripts: foo: content: | diff --git a/acceptance/bundle/run/scripts/no_content/databricks.yml b/acceptance/bundle/run/scripts/no_content/databricks.yml index 676ef5d780..416ce23fb6 100644 --- a/acceptance/bundle/run/scripts/no_content/databricks.yml +++ b/acceptance/bundle/run/scripts/no_content/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + scripts: foo: bar: diff --git a/acceptance/bundle/run_as/databricks.yml b/acceptance/bundle/run_as/databricks.yml index 88f96155af..f067cd3080 100644 --- a/acceptance/bundle/run_as/databricks.yml +++ b/acceptance/bundle/run_as/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: job_one: diff --git a/acceptance/bundle/summary/missing-libraries-file-path/databricks.yml b/acceptance/bundle/summary/missing-libraries-file-path/databricks.yml index 2b9ded495b..9b0f58ac5a 100644 --- a/acceptance/bundle/summary/missing-libraries-file-path/databricks.yml +++ b/acceptance/bundle/summary/missing-libraries-file-path/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: pipelines: my_pipeline: diff --git a/acceptance/bundle/summary/modified_status/databricks.yml b/acceptance/bundle/summary/modified_status/databricks.yml index 7e940c721a..7e34743b72 100644 --- a/acceptance/bundle/summary/modified_status/databricks.yml +++ b/acceptance/bundle/summary/modified_status/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: pipelines: my_pipeline: diff --git a/acceptance/bundle/summary/show-full-config/databricks.yml b/acceptance/bundle/summary/show-full-config/databricks.yml index db7844a189..2158f90476 100644 --- a/acceptance/bundle/summary/show-full-config/databricks.yml +++ b/acceptance/bundle/summary/show-full-config/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + include: - targets/*.yml diff --git a/acceptance/bundle/sync/databricks.yml b/acceptance/bundle/sync/databricks.yml index 646b780b91..2c24ccb0dc 100644 --- a/acceptance/bundle/sync/databricks.yml +++ b/acceptance/bundle/sync/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: dashboards: dashboard1: diff --git a/acceptance/bundle/sync/dryrun/databricks.yml b/acceptance/bundle/sync/dryrun/databricks.yml index 2f06e98eff..8720726744 100644 --- a/acceptance/bundle/sync/dryrun/databricks.yml +++ b/acceptance/bundle/sync/dryrun/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: dashboards: dashboard1: diff --git a/acceptance/bundle/telemetry/deploy-artifact-path-type/databricks.yml b/acceptance/bundle/telemetry/deploy-artifact-path-type/databricks.yml index 921788e65e..0cdfa200b6 100644 --- a/acceptance/bundle/telemetry/deploy-artifact-path-type/databricks.yml +++ b/acceptance/bundle/telemetry/deploy-artifact-path-type/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + workspace: artifact_path: /Workspace/abc diff --git a/acceptance/bundle/telemetry/deploy-config-file-count/databricks.yml b/acceptance/bundle/telemetry/deploy-config-file-count/databricks.yml index 0d091ea58d..5e2ae50683 100644 --- a/acceptance/bundle/telemetry/deploy-config-file-count/databricks.yml +++ b/acceptance/bundle/telemetry/deploy-config-file-count/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + include: - a.yml - dir/* diff --git a/acceptance/bundle/telemetry/deploy-error/test.toml b/acceptance/bundle/telemetry/deploy-error/test.toml deleted file mode 100644 index 0724077f7e..0000000000 --- a/acceptance/bundle/telemetry/deploy-error/test.toml +++ /dev/null @@ -1 +0,0 @@ -BundleConfig.default_name = "" diff --git a/acceptance/bundle/telemetry/deploy-experimental/databricks.yml b/acceptance/bundle/telemetry/deploy-experimental/databricks.yml index 80ed7a55db..8bc4b98060 100644 --- a/acceptance/bundle/telemetry/deploy-experimental/databricks.yml +++ b/acceptance/bundle/telemetry/deploy-experimental/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + experimental: use_legacy_run_as: true diff --git a/acceptance/bundle/telemetry/deploy-experimental/output.txt b/acceptance/bundle/telemetry/deploy-experimental/output.txt index 05bc64e441..d96e688b0a 100644 --- a/acceptance/bundle/telemetry/deploy-experimental/output.txt +++ b/acceptance/bundle/telemetry/deploy-experimental/output.txt @@ -2,7 +2,7 @@ >>> [CLI] bundle deploy Warning: You are using the legacy mode of run_as. The support for this mode is experimental and might be removed in a future release of the CLI. In order to run the DLT pipelines in your DAB as the run_as user this mode changes the owners of the pipelines to the run_as identity, which requires the user deploying the bundle to be a workspace admin, and also a Metastore admin if the pipeline target is in UC. at experimental.use_legacy_run_as - in databricks.yml:4:22 + in databricks.yml:5:22 Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... Deploying resources... diff --git a/acceptance/bundle/telemetry/deploy-mode/databricks.yml b/acceptance/bundle/telemetry/deploy-mode/databricks.yml index f68e5ad4e6..ec8d8cd9ce 100644 --- a/acceptance/bundle/telemetry/deploy-mode/databricks.yml +++ b/acceptance/bundle/telemetry/deploy-mode/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + targets: dev: mode: development diff --git a/acceptance/bundle/telemetry/deploy-no-uuid/databricks.yml b/acceptance/bundle/telemetry/deploy-no-uuid/databricks.yml index d5e7bc0260..62acc19335 100644 --- a/acceptance/bundle/telemetry/deploy-no-uuid/databricks.yml +++ b/acceptance/bundle/telemetry/deploy-no-uuid/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: job_one: diff --git a/acceptance/bundle/telemetry/deploy-run-as/databricks.yml b/acceptance/bundle/telemetry/deploy-run-as/databricks.yml index 6d1222d93f..b96867fb44 100644 --- a/acceptance/bundle/telemetry/deploy-run-as/databricks.yml +++ b/acceptance/bundle/telemetry/deploy-run-as/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + run_as: service_principal_name: "sp_test" diff --git a/acceptance/bundle/telemetry/deploy-target-count/databricks.yml b/acceptance/bundle/telemetry/deploy-target-count/databricks.yml index 95f8e9e61f..bab8533d25 100644 --- a/acceptance/bundle/telemetry/deploy-target-count/databricks.yml +++ b/acceptance/bundle/telemetry/deploy-target-count/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + targets: one: presets: diff --git a/acceptance/bundle/telemetry/deploy-variable-count/databricks.yml b/acceptance/bundle/telemetry/deploy-variable-count/databricks.yml index ba0b7d92bd..e3acefb877 100644 --- a/acceptance/bundle/telemetry/deploy-variable-count/databricks.yml +++ b/acceptance/bundle/telemetry/deploy-variable-count/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + variables: v1: description: var 1 diff --git a/acceptance/bundle/telemetry/deploy-whl-artifacts/databricks.yml b/acceptance/bundle/telemetry/deploy-whl-artifacts/databricks.yml index 1d5aefd029..1eb2ad2259 100644 --- a/acceptance/bundle/telemetry/deploy-whl-artifacts/databricks.yml +++ b/acceptance/bundle/telemetry/deploy-whl-artifacts/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + variables: wrapper: default: false diff --git a/acceptance/bundle/telemetry/deploy/databricks.yml b/acceptance/bundle/telemetry/deploy/databricks.yml index 8d6bed320b..3a20a11c29 100644 --- a/acceptance/bundle/telemetry/deploy/databricks.yml +++ b/acceptance/bundle/telemetry/deploy/databricks.yml @@ -1,4 +1,5 @@ bundle: + name: test-bundle uuid: 11111111-2222-3333-4444-555555555555 resources: diff --git a/acceptance/bundle/test.toml b/acceptance/bundle/test.toml index c7772f16e4..fca8259a3b 100644 --- a/acceptance/bundle/test.toml +++ b/acceptance/bundle/test.toml @@ -4,8 +4,7 @@ EnvVaryOutput = "DATABRICKS_BUNDLE_ENGINE" # The lowest Python version we support. Alternative to "uv run --python 3.10" Env.UV_PYTHON = "3.10" -[BundleConfig.default_name] -bundle.name = "test-bundle" +Ignore = ["databricks.yml"] # User-agent: [[Repls]] diff --git a/acceptance/bundle/trampoline/warning_message_with_new_spark/databricks.yml b/acceptance/bundle/trampoline/warning_message_with_new_spark/databricks.yml index 4ba0dd8952..f58a4ec756 100644 --- a/acceptance/bundle/trampoline/warning_message_with_new_spark/databricks.yml +++ b/acceptance/bundle/trampoline/warning_message_with_new_spark/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + targets: dev: mode: development diff --git a/acceptance/bundle/validate/dashboard_defaults/databricks.yml b/acceptance/bundle/validate/dashboard_defaults/databricks.yml index ed00e9405e..96fca6b730 100644 --- a/acceptance/bundle/validate/dashboard_defaults/databricks.yml +++ b/acceptance/bundle/validate/dashboard_defaults/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + workspace: resource_path: /foo/bar diff --git a/acceptance/bundle/validate/dashboard_required_name/databricks.yml b/acceptance/bundle/validate/dashboard_required_name/databricks.yml index 29a2bf6787..85026e4f30 100644 --- a/acceptance/bundle/validate/dashboard_required_name/databricks.yml +++ b/acceptance/bundle/validate/dashboard_required_name/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: dashboards: # Missing display_name (name) diff --git a/acceptance/bundle/validate/dashboard_required_name/output.txt b/acceptance/bundle/validate/dashboard_required_name/output.txt index 60d7d1b433..3c185500b6 100644 --- a/acceptance/bundle/validate/dashboard_required_name/output.txt +++ b/acceptance/bundle/validate/dashboard_required_name/output.txt @@ -2,7 +2,7 @@ >>> [CLI] bundle validate Error: dashboard display_name is required at resources.dashboards.my_dashboard - in databricks.yml:6:7 + in databricks.yml:8:7 Name: test-bundle Target: default diff --git a/acceptance/bundle/validate/dashboard_required_warehouse_id/databricks.yml b/acceptance/bundle/validate/dashboard_required_warehouse_id/databricks.yml index c0da1d0ac5..d4eb72d44a 100644 --- a/acceptance/bundle/validate/dashboard_required_warehouse_id/databricks.yml +++ b/acceptance/bundle/validate/dashboard_required_warehouse_id/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: dashboards: # Missing warehouse_id diff --git a/acceptance/bundle/validate/dashboard_required_warehouse_id/output.txt b/acceptance/bundle/validate/dashboard_required_warehouse_id/output.txt index 17bc272838..9e0b38d927 100644 --- a/acceptance/bundle/validate/dashboard_required_warehouse_id/output.txt +++ b/acceptance/bundle/validate/dashboard_required_warehouse_id/output.txt @@ -2,7 +2,7 @@ >>> [CLI] bundle validate Error: dashboard warehouse_id is required at resources.dashboards.my_dashboard - in databricks.yml:6:7 + in databricks.yml:8:7 Name: test-bundle Target: default diff --git a/acceptance/bundle/validate/definitions_yaml_anchors/databricks.yml b/acceptance/bundle/validate/definitions_yaml_anchors/databricks.yml index e4be10198b..ff49741a8b 100644 --- a/acceptance/bundle/validate/definitions_yaml_anchors/databricks.yml +++ b/acceptance/bundle/validate/definitions_yaml_anchors/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + # This test verifies that bundles can use the 'definitions' field for YAML anchors # without triggering the OSS Spark Pipelines validation error. This was a regression # patched in https://github.com/databricks/cli/pull/3889 diff --git a/acceptance/bundle/validate/enum/databricks.yml b/acceptance/bundle/validate/enum/databricks.yml index 19a8df8b34..8bff766951 100644 --- a/acceptance/bundle/validate/enum/databricks.yml +++ b/acceptance/bundle/validate/enum/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + variables: my_variable: type: "complex" diff --git a/acceptance/bundle/validate/enum/output.txt b/acceptance/bundle/validate/enum/output.txt index 2943e29b3f..54893438d6 100644 --- a/acceptance/bundle/validate/enum/output.txt +++ b/acceptance/bundle/validate/enum/output.txt @@ -2,31 +2,31 @@ >>> [CLI] bundle validate Warning: invalid value "INVALID_AVAILABILITY" for enum field. Valid values are [ON_DEMAND SPOT SPOT_WITH_FALLBACK] at resources.jobs.my_job_invalid.tasks[0].new_cluster.aws_attributes.availability - in databricks.yml:9:29 + in databricks.yml:56:29 Warning: invalid value "INVALID_CONDITION" for enum field. Valid values are [ALL_DONE ALL_FAILED ALL_SUCCESS AT_LEAST_ONE_FAILED AT_LEAST_ONE_SUCCESS NONE_FAILED] at resources.jobs.my_job_invalid.tasks[0].run_if - in databricks.yml:18:19 + in databricks.yml:46:19 Warning: invalid value "INVALID_ENGINE" for enum field. Valid values are [NULL PHOTON STANDARD] at resources.jobs.my_job_invalid.tasks[0].new_cluster.runtime_engine - in databricks.yml:14:29 + in databricks.yml:53:29 Warning: invalid value "INVALID_MODE" for enum field. Valid values are [DATA_SECURITY_MODE_AUTO DATA_SECURITY_MODE_DEDICATED DATA_SECURITY_MODE_STANDARD LEGACY_PASSTHROUGH LEGACY_SINGLE_USER LEGACY_SINGLE_USER_STANDARD LEGACY_TABLE_ACL NONE SINGLE_USER USER_ISOLATION] at resources.jobs.my_job_invalid.tasks[0].new_cluster.data_security_mode - in databricks.yml:11:33 + in databricks.yml:54:33 Warning: invalid value "INVALID_SOURCE" for enum field. Valid values are [GIT WORKSPACE] at resources.jobs.my_job_invalid.tasks[0].notebook_task.source - in databricks.yml:17:21 + in databricks.yml:49:21 Warning: invalid value "INVALID_TYPE" for enum field. Valid values are [complex] at variables.my_variable_invalid.type - in databricks.yml:42:11 + in databricks.yml:11:11 Warning: invalid value "INVALID_VOLUME_TYPE" for enum field. Valid values are [GENERAL_PURPOSE_SSD THROUGHPUT_OPTIMIZED_HDD] at resources.jobs.my_job_invalid.tasks[0].new_cluster.aws_attributes.ebs_volume_type - in databricks.yml:10:32 + in databricks.yml:57:32 Name: test-bundle Target: default diff --git a/acceptance/bundle/validate/models/missing_name/databricks.yml b/acceptance/bundle/validate/models/missing_name/databricks.yml index 4e4941777d..c50607ee39 100644 --- a/acceptance/bundle/validate/models/missing_name/databricks.yml +++ b/acceptance/bundle/validate/models/missing_name/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: models: mymodel: {} diff --git a/acceptance/bundle/validate/models/missing_name/output.txt b/acceptance/bundle/validate/models/missing_name/output.txt index 77dfd61284..24e6c1d2ca 100644 --- a/acceptance/bundle/validate/models/missing_name/output.txt +++ b/acceptance/bundle/validate/models/missing_name/output.txt @@ -1,6 +1,6 @@ Warning: required field "name" is not set at resources.models.mymodel - in databricks.yml:5:14 + in databricks.yml:6:14 Name: test-bundle Target: default diff --git a/acceptance/bundle/validate/no_dashboard_etag/databricks.yml b/acceptance/bundle/validate/no_dashboard_etag/databricks.yml index 4b4cc929a4..b0d23ab91e 100644 --- a/acceptance/bundle/validate/no_dashboard_etag/databricks.yml +++ b/acceptance/bundle/validate/no_dashboard_etag/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: dashboards: foobar: diff --git a/acceptance/bundle/validate/no_dashboard_etag/output.txt b/acceptance/bundle/validate/no_dashboard_etag/output.txt index d7d3ca110b..ea8f0382b1 100644 --- a/acceptance/bundle/validate/no_dashboard_etag/output.txt +++ b/acceptance/bundle/validate/no_dashboard_etag/output.txt @@ -2,7 +2,7 @@ >>> [CLI] bundle validate Error: dashboard "foobar" has an etag set. Etags must not be set in bundle configuration at resources.dashboards.foobar - in databricks.yml:6:7 + in databricks.yml:7:7 Name: test-bundle Target: default diff --git a/acceptance/bundle/validate/permissions/databricks.yml b/acceptance/bundle/validate/permissions/databricks.yml index 2c43c8a99a..535ea581bb 100644 --- a/acceptance/bundle/validate/permissions/databricks.yml +++ b/acceptance/bundle/validate/permissions/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: can_manage_run_wins: diff --git a/acceptance/bundle/validate/presets_max_concurrent_runs/databricks.yml b/acceptance/bundle/validate/presets_max_concurrent_runs/databricks.yml index e77dbca6a5..98ba016743 100644 --- a/acceptance/bundle/validate/presets_max_concurrent_runs/databricks.yml +++ b/acceptance/bundle/validate/presets_max_concurrent_runs/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: job1: diff --git a/acceptance/bundle/validate/presets_tags/databricks.yml b/acceptance/bundle/validate/presets_tags/databricks.yml index 3bf1751d4f..f89aafe17a 100644 --- a/acceptance/bundle/validate/presets_tags/databricks.yml +++ b/acceptance/bundle/validate/presets_tags/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: jobs: job1: diff --git a/acceptance/bundle/validate/required/databricks.yml b/acceptance/bundle/validate/required/databricks.yml index fbda26fa81..82175fb553 100644 --- a/acceptance/bundle/validate/required/databricks.yml +++ b/acceptance/bundle/validate/required/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + artifacts: my_artifact: files: diff --git a/acceptance/bundle/validate/required/output.txt b/acceptance/bundle/validate/required/output.txt index 6b6d3a144b..ae3e6dad2f 100644 --- a/acceptance/bundle/validate/required/output.txt +++ b/acceptance/bundle/validate/required/output.txt @@ -2,23 +2,23 @@ >>> [CLI] bundle validate Warning: required field "catalog_name" is not set at resources.volumes.my_volume - in databricks.yml:23:7 + in databricks.yml:35:7 Warning: required field "job_id" is not set at resources.jobs.my_job_1.tasks[1].run_job_task - in databricks.yml:14:25 + in databricks.yml:29:24 Warning: required field "name" is not set at resources.models.my_model_1 - in databricks.yml:18:7 + in databricks.yml:13:7 Warning: required field "schema_name" is not set at resources.volumes.my_volume - in databricks.yml:23:7 + in databricks.yml:35:7 Warning: required field "source" is not set at artifacts.my_artifact.files[0] - in databricks.yml:4:9 + in databricks.yml:7:9 Name: test-bundle Target: default diff --git a/acceptance/bundle/validate/sync_patterns/databricks.yml b/acceptance/bundle/validate/sync_patterns/databricks.yml index 88a28aca4e..a52e98aec0 100644 --- a/acceptance/bundle/validate/sync_patterns/databricks.yml +++ b/acceptance/bundle/validate/sync_patterns/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + sync: include: - conf/dir/*.yml diff --git a/acceptance/bundle/validate/volume_defaults/databricks.yml b/acceptance/bundle/validate/volume_defaults/databricks.yml index 5a93e15ec0..159db5c751 100644 --- a/acceptance/bundle/validate/volume_defaults/databricks.yml +++ b/acceptance/bundle/validate/volume_defaults/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + resources: volumes: v1: diff --git a/acceptance/bundle/validate/volume_defaults/output.txt b/acceptance/bundle/validate/volume_defaults/output.txt index 60cd668c7d..cb6213ead2 100644 --- a/acceptance/bundle/validate/volume_defaults/output.txt +++ b/acceptance/bundle/validate/volume_defaults/output.txt @@ -1,46 +1,46 @@ Warning: required field "catalog_name" is not set - at resources.volumes.v3 + at resources.volumes.v2 in databricks.yml:10:7 Warning: required field "catalog_name" is not set - at resources.volumes.v1 - in databricks.yml:6:7 + at resources.volumes.v3 + in databricks.yml:13:7 Warning: required field "catalog_name" is not set + at resources.volumes.v1 + in databricks.yml:7:7 + +Warning: required field "name" is not set at resources.volumes.v2 - in databricks.yml:8:7 + in databricks.yml:10:7 Warning: required field "name" is not set at resources.volumes.v3 - in databricks.yml:10:7 + in databricks.yml:13:7 Warning: required field "name" is not set at resources.volumes.v1 - in databricks.yml:6:7 + in databricks.yml:7:7 -Warning: required field "name" is not set +Warning: required field "schema_name" is not set at resources.volumes.v2 - in databricks.yml:8:7 + in databricks.yml:10:7 Warning: required field "schema_name" is not set at resources.volumes.v3 - in databricks.yml:10:7 + in databricks.yml:13:7 Warning: required field "schema_name" is not set at resources.volumes.v1 - in databricks.yml:6:7 - -Warning: required field "schema_name" is not set - at resources.volumes.v2 - in databricks.yml:8:7 + in databricks.yml:7:7 Warning: invalid value "" for enum field. Valid values are [EXTERNAL MANAGED] at resources.volumes.v1.volume_type - in databricks.yml:6:20 + in databricks.yml:7:20 Warning: invalid value "already-set" for enum field. Valid values are [EXTERNAL MANAGED] at resources.volumes.v2.volume_type - in databricks.yml:8:20 + in databricks.yml:10:20 { "v1": { diff --git a/acceptance/bundle/variables/complex/test.toml b/acceptance/bundle/variables/complex/test.toml index cd4e656e05..3bea5e3e31 100644 --- a/acceptance/bundle/variables/complex/test.toml +++ b/acceptance/bundle/variables/complex/test.toml @@ -1,2 +1 @@ Badness = 'databricks.yml is broken: mapping has duplicate key task_key but "bundle validate" accepts it' -BundleConfig.default_name = "" diff --git a/acceptance/bundle/variables/int/databricks.yml b/acceptance/bundle/variables/int/databricks.yml index 3703cd97b3..8d86911329 100644 --- a/acceptance/bundle/variables/int/databricks.yml +++ b/acceptance/bundle/variables/int/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + variables: foo: default: 25 diff --git a/acceptance/bundle/variables/prepend-workspace-var/databricks.yml b/acceptance/bundle/variables/prepend-workspace-var/databricks.yml index c843752f8a..1b6f60c86a 100644 --- a/acceptance/bundle/variables/prepend-workspace-var/databricks.yml +++ b/acceptance/bundle/variables/prepend-workspace-var/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + workspace: profile: profile_name root_path: ${var.workspace_root}/path/to/root diff --git a/acceptance/bundle/variables/prepend-workspace-var/output.txt b/acceptance/bundle/variables/prepend-workspace-var/output.txt index 27b025275e..657ebe4d84 100644 --- a/acceptance/bundle/variables/prepend-workspace-var/output.txt +++ b/acceptance/bundle/variables/prepend-workspace-var/output.txt @@ -1,14 +1,11 @@ /Workspace should be prepended on all paths, but it is not the case: Warning: required field "entry_point" is not set at resources.jobs.my_job.tasks[0].python_wheel_task - in databricks.yml:23:13 - -Warning: required field "name" is not set - at bundle + in databricks.yml:26:13 Warning: required field "package_name" is not set at resources.jobs.my_job.tasks[0].python_wheel_task - in databricks.yml:23:13 + in databricks.yml:26:13 { "bundle": { @@ -16,6 +13,7 @@ Warning: required field "package_name" is not set "git": { "bundle_root_path": "." }, + "name": "test-bundle", "target": "dev" }, "resources": { diff --git a/acceptance/bundle/variables/prepend-workspace-var/test.toml b/acceptance/bundle/variables/prepend-workspace-var/test.toml deleted file mode 100644 index 0724077f7e..0000000000 --- a/acceptance/bundle/variables/prepend-workspace-var/test.toml +++ /dev/null @@ -1 +0,0 @@ -BundleConfig.default_name = "" diff --git a/acceptance/bundle/variables/resolve-resources-fields/databricks.yml b/acceptance/bundle/variables/resolve-resources-fields/databricks.yml index ac4ca6b357..8838355acc 100644 --- a/acceptance/bundle/variables/resolve-resources-fields/databricks.yml +++ b/acceptance/bundle/variables/resolve-resources-fields/databricks.yml @@ -1,3 +1,6 @@ +bundle: + name: test-bundle + variables: a: default: ${resources.schemas.foo.name} diff --git a/acceptance/bundle/volume_path/invalid_file/databricks.yml b/acceptance/bundle/volume_path/invalid_file/databricks.yml index 0b01e009e9..5222ecec9e 100644 --- a/acceptance/bundle/volume_path/invalid_file/databricks.yml +++ b/acceptance/bundle/volume_path/invalid_file/databricks.yml @@ -1,2 +1,5 @@ +bundle: + name: test-bundle + workspace: file_path: "/Volumes/test" diff --git a/acceptance/bundle/volume_path/invalid_file/output.txt b/acceptance/bundle/volume_path/invalid_file/output.txt index f7a8f746b2..7094be33c7 100644 --- a/acceptance/bundle/volume_path/invalid_file/output.txt +++ b/acceptance/bundle/volume_path/invalid_file/output.txt @@ -1,6 +1,6 @@ Error: workspace.file_path /Volumes/test starts with /Volumes. /Volumes can only be used with workspace.artifact_path. at workspace.file_path - in databricks.yml:4:14 + in databricks.yml:5:14 For more information, see https://docs.databricks.com/aws/en/dev-tools/bundles/settings#workspace diff --git a/acceptance/bundle/volume_path/invalid_resource/databricks.yml b/acceptance/bundle/volume_path/invalid_resource/databricks.yml index 8952373295..baa115e11b 100644 --- a/acceptance/bundle/volume_path/invalid_resource/databricks.yml +++ b/acceptance/bundle/volume_path/invalid_resource/databricks.yml @@ -1,2 +1,5 @@ +bundle: + name: test-bundle + workspace: resource_path: "/Volumes/test" diff --git a/acceptance/bundle/volume_path/invalid_resource/output.txt b/acceptance/bundle/volume_path/invalid_resource/output.txt index 3a78f581d4..4df4823eab 100644 --- a/acceptance/bundle/volume_path/invalid_resource/output.txt +++ b/acceptance/bundle/volume_path/invalid_resource/output.txt @@ -1,6 +1,6 @@ Error: workspace.resource_path /Volumes/test starts with /Volumes. /Volumes can only be used with workspace.artifact_path. at workspace.resource_path - in databricks.yml:4:18 + in databricks.yml:5:18 For more information, see https://docs.databricks.com/aws/en/dev-tools/bundles/settings#workspace diff --git a/acceptance/bundle/volume_path/invalid_root/databricks.yml b/acceptance/bundle/volume_path/invalid_root/databricks.yml index f98ab2e5e1..298b5c775f 100644 --- a/acceptance/bundle/volume_path/invalid_root/databricks.yml +++ b/acceptance/bundle/volume_path/invalid_root/databricks.yml @@ -1,2 +1,5 @@ +bundle: + name: test-bundle + workspace: root_path: "/Volumes/test" diff --git a/acceptance/bundle/volume_path/invalid_root/output.txt b/acceptance/bundle/volume_path/invalid_root/output.txt index afd92a9d22..6f232eefb5 100644 --- a/acceptance/bundle/volume_path/invalid_root/output.txt +++ b/acceptance/bundle/volume_path/invalid_root/output.txt @@ -1,6 +1,6 @@ Error: workspace.root_path /Volumes/test starts with /Volumes. /Volumes can only be used with workspace.artifact_path. at workspace.root_path - in databricks.yml:4:14 + in databricks.yml:5:14 For more information, see https://docs.databricks.com/aws/en/dev-tools/bundles/settings#workspace diff --git a/acceptance/bundle/volume_path/invalid_state/databricks.yml b/acceptance/bundle/volume_path/invalid_state/databricks.yml index 86755e5586..64b0e5ec8a 100644 --- a/acceptance/bundle/volume_path/invalid_state/databricks.yml +++ b/acceptance/bundle/volume_path/invalid_state/databricks.yml @@ -1,2 +1,5 @@ +bundle: + name: test-bundle + workspace: state_path: "/Volumes/test" diff --git a/acceptance/bundle/volume_path/invalid_state/output.txt b/acceptance/bundle/volume_path/invalid_state/output.txt index 631fdd5fd1..a9475f6468 100644 --- a/acceptance/bundle/volume_path/invalid_state/output.txt +++ b/acceptance/bundle/volume_path/invalid_state/output.txt @@ -1,6 +1,6 @@ Error: workspace.state_path /Volumes/test starts with /Volumes. /Volumes can only be used with workspace.artifact_path. at workspace.state_path - in databricks.yml:4:15 + in databricks.yml:5:15 For more information, see https://docs.databricks.com/aws/en/dev-tools/bundles/settings#workspace diff --git a/acceptance/bundle/volume_path/valid/databricks.yml b/acceptance/bundle/volume_path/valid/databricks.yml index 562d5a2af3..549e38db49 100644 --- a/acceptance/bundle/volume_path/valid/databricks.yml +++ b/acceptance/bundle/volume_path/valid/databricks.yml @@ -1,2 +1,5 @@ +bundle: + name: test-bundle + workspace: artifact_path: "/Volumes/main/default/artifacts/workspace.artifact_path" diff --git a/acceptance/internal/config.go b/acceptance/internal/config.go index 327bf34105..22bb998702 100644 --- a/acceptance/internal/config.go +++ b/acceptance/internal/config.go @@ -125,29 +125,8 @@ type TestConfig struct { // For cloud+windows tests, max(Timeout, TimeoutWindows, TimeoutCloud) is used for timeout TimeoutCloud time.Duration - // Maps a name (arbitrary string, can be used to override/disable setting in a child config) to a mapping that specifies how - // to update databricks.yml (or other file designated by BundleConfigTarget). - // Example: - // BundleConfig.header.bundle.name = "test-bundle" - // This overwrite bundle.name in the databricks.yml, so you can omit adding """ - // bundle: - // name: somename - // """ to every test. - // If child config wants to disable or override this, they can simply do - // BundleConfig.header = "" - BundleConfig map[string]any - - // Target config for BundleConfig updates. Empty string disables BundleConfig updates. - // Null means "databricks.yml" - BundleConfigTarget *string - // If true, skip this test when running on DBR / workspace file system. SkipOnDbr *bool - - // To be added: - // BundleConfigMatrix is to BundleConfig what EnvMatrix is to Env - // It creates different tests for each possible configuration update. - // BundleConfigMatrix map[string][]any } type ServerStub struct { @@ -237,9 +216,6 @@ func DoLoadConfig(t *testing.T, path string) TestConfig { keys := meta.Undecoded() for ind, key := range keys { - if len(key) > 0 && key[0] == "BundleConfig" { - continue - } t.Errorf("Undecoded key in %s[%d]: %#v", path, ind, key) } diff --git a/acceptance/selftest/bundleconfig/different_target/out.my.yml b/acceptance/selftest/bundleconfig/different_target/out.my.yml deleted file mode 100644 index a6f2be5744..0000000000 --- a/acceptance/selftest/bundleconfig/different_target/out.my.yml +++ /dev/null @@ -1,16 +0,0 @@ -bundle: - name: my-bundle -resources: - jobs: - example_job: - list2: 123 - name: Example Job - new_list: - - abc - - def - new_map: - key: value - new_string: hello - string2: - - item1 - - item2 diff --git a/acceptance/selftest/bundleconfig/different_target/out.test.toml b/acceptance/selftest/bundleconfig/different_target/out.test.toml deleted file mode 100644 index d560f1de04..0000000000 --- a/acceptance/selftest/bundleconfig/different_target/out.test.toml +++ /dev/null @@ -1,5 +0,0 @@ -Local = true -Cloud = false - -[EnvMatrix] - DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/selftest/bundleconfig/different_target/output.txt b/acceptance/selftest/bundleconfig/different_target/output.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/acceptance/selftest/bundleconfig/different_target/script b/acceptance/selftest/bundleconfig/different_target/script deleted file mode 100644 index 389111898c..0000000000 --- a/acceptance/selftest/bundleconfig/different_target/script +++ /dev/null @@ -1 +0,0 @@ -mv my.yml out.my.yml diff --git a/acceptance/selftest/bundleconfig/different_target/test.toml b/acceptance/selftest/bundleconfig/different_target/test.toml deleted file mode 100644 index e30696ac25..0000000000 --- a/acceptance/selftest/bundleconfig/different_target/test.toml +++ /dev/null @@ -1 +0,0 @@ -BundleConfigTarget = "my.yml" diff --git a/acceptance/selftest/bundleconfig/disabled1/databricks.yml b/acceptance/selftest/bundleconfig/disabled1/databricks.yml deleted file mode 100644 index fd75daccda..0000000000 --- a/acceptance/selftest/bundleconfig/disabled1/databricks.yml +++ /dev/null @@ -1 +0,0 @@ -# should not be changed diff --git a/acceptance/selftest/bundleconfig/disabled1/out.test.toml b/acceptance/selftest/bundleconfig/disabled1/out.test.toml deleted file mode 100644 index d560f1de04..0000000000 --- a/acceptance/selftest/bundleconfig/disabled1/out.test.toml +++ /dev/null @@ -1,5 +0,0 @@ -Local = true -Cloud = false - -[EnvMatrix] - DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/selftest/bundleconfig/disabled1/output.txt b/acceptance/selftest/bundleconfig/disabled1/output.txt deleted file mode 100644 index fd75daccda..0000000000 --- a/acceptance/selftest/bundleconfig/disabled1/output.txt +++ /dev/null @@ -1 +0,0 @@ -# should not be changed diff --git a/acceptance/selftest/bundleconfig/disabled1/script b/acceptance/selftest/bundleconfig/disabled1/script deleted file mode 100644 index e17a1a94b6..0000000000 --- a/acceptance/selftest/bundleconfig/disabled1/script +++ /dev/null @@ -1 +0,0 @@ -cat databricks.yml diff --git a/acceptance/selftest/bundleconfig/disabled1/test.toml b/acceptance/selftest/bundleconfig/disabled1/test.toml deleted file mode 100644 index e07ec4a780..0000000000 --- a/acceptance/selftest/bundleconfig/disabled1/test.toml +++ /dev/null @@ -1 +0,0 @@ -BundleConfigTarget = "" diff --git a/acceptance/selftest/bundleconfig/disabled2/databricks.yml b/acceptance/selftest/bundleconfig/disabled2/databricks.yml deleted file mode 100644 index fd75daccda..0000000000 --- a/acceptance/selftest/bundleconfig/disabled2/databricks.yml +++ /dev/null @@ -1 +0,0 @@ -# should not be changed diff --git a/acceptance/selftest/bundleconfig/disabled2/out.test.toml b/acceptance/selftest/bundleconfig/disabled2/out.test.toml deleted file mode 100644 index d560f1de04..0000000000 --- a/acceptance/selftest/bundleconfig/disabled2/out.test.toml +++ /dev/null @@ -1,5 +0,0 @@ -Local = true -Cloud = false - -[EnvMatrix] - DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/selftest/bundleconfig/disabled2/output.txt b/acceptance/selftest/bundleconfig/disabled2/output.txt deleted file mode 100644 index fd75daccda..0000000000 --- a/acceptance/selftest/bundleconfig/disabled2/output.txt +++ /dev/null @@ -1 +0,0 @@ -# should not be changed diff --git a/acceptance/selftest/bundleconfig/disabled2/script b/acceptance/selftest/bundleconfig/disabled2/script deleted file mode 100644 index e17a1a94b6..0000000000 --- a/acceptance/selftest/bundleconfig/disabled2/script +++ /dev/null @@ -1 +0,0 @@ -cat databricks.yml diff --git a/acceptance/selftest/bundleconfig/disabled2/test.toml b/acceptance/selftest/bundleconfig/disabled2/test.toml deleted file mode 100644 index c2cb6d29c8..0000000000 --- a/acceptance/selftest/bundleconfig/disabled2/test.toml +++ /dev/null @@ -1,2 +0,0 @@ -BundleConfig.config1 = "" -BundleConfig.config2 = "" diff --git a/acceptance/selftest/bundleconfig/empty/out.test.toml b/acceptance/selftest/bundleconfig/empty/out.test.toml deleted file mode 100644 index d560f1de04..0000000000 --- a/acceptance/selftest/bundleconfig/empty/out.test.toml +++ /dev/null @@ -1,5 +0,0 @@ -Local = true -Cloud = false - -[EnvMatrix] - DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/selftest/bundleconfig/empty/output.txt b/acceptance/selftest/bundleconfig/empty/output.txt deleted file mode 100644 index a6f2be5744..0000000000 --- a/acceptance/selftest/bundleconfig/empty/output.txt +++ /dev/null @@ -1,16 +0,0 @@ -bundle: - name: my-bundle -resources: - jobs: - example_job: - list2: 123 - name: Example Job - new_list: - - abc - - def - new_map: - key: value - new_string: hello - string2: - - item1 - - item2 diff --git a/acceptance/selftest/bundleconfig/empty/script b/acceptance/selftest/bundleconfig/empty/script deleted file mode 100644 index e17a1a94b6..0000000000 --- a/acceptance/selftest/bundleconfig/empty/script +++ /dev/null @@ -1 +0,0 @@ -cat databricks.yml diff --git a/acceptance/selftest/bundleconfig/matching/databricks.yml b/acceptance/selftest/bundleconfig/matching/databricks.yml deleted file mode 100644 index 69ba774dae..0000000000 --- a/acceptance/selftest/bundleconfig/matching/databricks.yml +++ /dev/null @@ -1,19 +0,0 @@ -bundle: - name: "my-bundle-2" - -# This comment should remain in the result, because BundleConfig values have no effect - -resources: - jobs: - example_job: - list2: 123456 - name: Example Job 2 - new_list: - - abc 2 - - def 2 - new_map: - key: value 2 - new_string: hello 2 - string2: - - item1 2 - - item2 2 diff --git a/acceptance/selftest/bundleconfig/matching/out.test.toml b/acceptance/selftest/bundleconfig/matching/out.test.toml deleted file mode 100644 index d560f1de04..0000000000 --- a/acceptance/selftest/bundleconfig/matching/out.test.toml +++ /dev/null @@ -1,5 +0,0 @@ -Local = true -Cloud = false - -[EnvMatrix] - DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/selftest/bundleconfig/matching/output.txt b/acceptance/selftest/bundleconfig/matching/output.txt deleted file mode 100644 index 69ba774dae..0000000000 --- a/acceptance/selftest/bundleconfig/matching/output.txt +++ /dev/null @@ -1,19 +0,0 @@ -bundle: - name: "my-bundle-2" - -# This comment should remain in the result, because BundleConfig values have no effect - -resources: - jobs: - example_job: - list2: 123456 - name: Example Job 2 - new_list: - - abc 2 - - def 2 - new_map: - key: value 2 - new_string: hello 2 - string2: - - item1 2 - - item2 2 diff --git a/acceptance/selftest/bundleconfig/matching/script b/acceptance/selftest/bundleconfig/matching/script deleted file mode 100644 index e17a1a94b6..0000000000 --- a/acceptance/selftest/bundleconfig/matching/script +++ /dev/null @@ -1 +0,0 @@ -cat databricks.yml diff --git a/acceptance/selftest/bundleconfig/override/databricks.yml b/acceptance/selftest/bundleconfig/override/databricks.yml deleted file mode 100644 index 19e4395095..0000000000 --- a/acceptance/selftest/bundleconfig/override/databricks.yml +++ /dev/null @@ -1,16 +0,0 @@ -bundle: - name: this-name-takes-priority - -resources: - jobs: - example_job: - other: attribute - string_dq: "[string]" - string_sq: '[string]' - string1: "string" - string2: "string" - list1: [string1, string2] - list2: [string1, string2] - true: true - false: false - null: null diff --git a/acceptance/selftest/bundleconfig/override/out.test.toml b/acceptance/selftest/bundleconfig/override/out.test.toml deleted file mode 100644 index d560f1de04..0000000000 --- a/acceptance/selftest/bundleconfig/override/out.test.toml +++ /dev/null @@ -1,5 +0,0 @@ -Local = true -Cloud = false - -[EnvMatrix] - DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/selftest/bundleconfig/override/output.txt b/acceptance/selftest/bundleconfig/override/output.txt deleted file mode 100644 index 5e8404824b..0000000000 --- a/acceptance/selftest/bundleconfig/override/output.txt +++ /dev/null @@ -1,26 +0,0 @@ -bundle: - name: this-name-takes-priority -resources: - jobs: - example_job: - false: false - true: true - null: null - list1: - - string1 - - string2 - list2: - - string1 - - string2 - name: Example Job - new_list: - - abc - - def - new_map: - key: value - new_string: hello - other: attribute - string_dq: '[string]' - string_sq: '[string]' - string1: string - string2: string diff --git a/acceptance/selftest/bundleconfig/override/script b/acceptance/selftest/bundleconfig/override/script deleted file mode 100644 index e17a1a94b6..0000000000 --- a/acceptance/selftest/bundleconfig/override/script +++ /dev/null @@ -1 +0,0 @@ -cat databricks.yml diff --git a/acceptance/selftest/bundleconfig/test.toml b/acceptance/selftest/bundleconfig/test.toml deleted file mode 100644 index 85b8622371..0000000000 --- a/acceptance/selftest/bundleconfig/test.toml +++ /dev/null @@ -1,12 +0,0 @@ -[BundleConfig.config1.bundle] -name = "my-bundle" - -[BundleConfig.config2.resources.jobs.example_job] -name = "Example Job" -new_string = "hello" -new_list = ["abc", "def"] -new_map = {key= "value"} - -# change datatype -list2 = 123 # insert number instead of a list -string2 = ["item1", "item2"]