diff --git a/.agents/rules/testing.md b/.agents/rules/testing.md index bbfd1ce5e5..39f551e597 100644 --- a/.agents/rules/testing.md +++ b/.agents/rules/testing.md @@ -146,6 +146,7 @@ Ignore = ["databricks.yml"] # parsed as EnvMatrix.Ignore, not top-level Ignore - `errcode CMD...`: run CMD; if it exits non-zero, append `Exit code: N` to the output but let the script continue (scripts run under `bash -e`, which would otherwise abort). Use when a command is *allowed* to fail and later steps must still run. - `musterr CMD...`: run CMD and fail the whole test if it *succeeds*; on the expected failure the script continues. Use to assert a command must error. - `withdir DIR CMD...`: run CMD with the working directory set to DIR, restoring it afterwards. +- `destroy-bundle [ARGS...]`: run `bundle destroy --auto-approve` (traced, so output is identical to calling it directly) and then remove the `~/.bundle/` directory the bundle was deployed under. Prefer it over a bare `trace $CLI bundle destroy --auto-approve` when the test is done with the bundle: on a real workspace a leftover directory is never reused, and they accumulate against the workspace's child-node limit. It removes the directory recursively, so do not use it to destroy one target while another target of the same bundle must stay deployed. - `git-repo-init`: initialize a deterministic git repo (fixed user/email, no hooks) and commit `databricks.yml`. - `uuid`, `sethome DIR`, `venv_activate`, `as-test-sp CMD...`, `readplanarg FILE`, `envsubst`: see `acceptance/script.prepare` for the full list and exact semantics. diff --git a/acceptance/apps/deploy/bundle-no-args-with-flags/script b/acceptance/apps/deploy/bundle-no-args-with-flags/script index 559a185952..e3e9f716e4 100644 --- a/acceptance/apps/deploy/bundle-no-args-with-flags/script +++ b/acceptance/apps/deploy/bundle-no-args-with-flags/script @@ -3,4 +3,4 @@ trace $CLI apps deploy --skip-validation --auto-approve --force-lock --fail-on-active-runs -trace $CLI bundle destroy --auto-approve +destroy-bundle diff --git a/acceptance/apps/deploy/bundle-no-args/script b/acceptance/apps/deploy/bundle-no-args/script index dd17862224..0d27602618 100644 --- a/acceptance/apps/deploy/bundle-no-args/script +++ b/acceptance/apps/deploy/bundle-no-args/script @@ -4,4 +4,4 @@ trace $CLI apps deploy --skip-validation -trace $CLI bundle destroy --auto-approve +destroy-bundle diff --git a/acceptance/bundle/ai_runtime_task/local_code_source/script b/acceptance/bundle/ai_runtime_task/local_code_source/script index fe5e707ce0..3a194dec9a 100644 --- a/acceptance/bundle/ai_runtime_task/local_code_source/script +++ b/acceptance/bundle/ai_runtime_task/local_code_source/script @@ -25,5 +25,5 @@ trace $CLI bundle deploy trace print_requests.py --sort --del-field raw_body '//.air_snapshots/' title "destroy removes the deployed bundle (including the synced snapshots)\n" -trace $CLI bundle destroy --auto-approve +destroy-bundle rm out.requests.txt diff --git a/acceptance/bundle/apps/app_yaml/script b/acceptance/bundle/apps/app_yaml/script index d0dd8d5f80..2e5489cbac 100644 --- a/acceptance/bundle/apps/app_yaml/script +++ b/acceptance/bundle/apps/app_yaml/script @@ -5,5 +5,5 @@ trace jq 'select(.path | test("app.yml"))' out.requests.txt | sed 's/\\r//g' > #trace print_requests.py //apps # currently fails due to TF inserting description="" rm out.requests.txt -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests.py //apps diff --git a/acceptance/bundle/apps/compute_size/script b/acceptance/bundle/apps/compute_size/script index 5f4714ae8d..a7939b6050 100644 --- a/acceptance/bundle/apps/compute_size/script +++ b/acceptance/bundle/apps/compute_size/script @@ -5,7 +5,7 @@ envsubst < databricks.yml.tmpl > databricks.yml # Set up cleanup trap to ensure resources are destroyed even on failure cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/apps/git_source/script b/acceptance/bundle/apps/git_source/script index f9d90c84a5..32d0782d17 100644 --- a/acceptance/bundle/apps/git_source/script +++ b/acceptance/bundle/apps/git_source/script @@ -5,7 +5,7 @@ envsubst < databricks.yml.tmpl > databricks.yml # Set up cleanup trap to ensure resources are destroyed even on failure cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/apps/job_permissions/script b/acceptance/bundle/apps/job_permissions/script index 50d92015c5..d5eb817665 100644 --- a/acceptance/bundle/apps/job_permissions/script +++ b/acceptance/bundle/apps/job_permissions/script @@ -35,4 +35,4 @@ patch -s --no-backup-if-mismatch databricks.yml < fix.patch trace $CLI bundle deploy -qq trace has_manage_run -trace $CLI bundle destroy --auto-approve +destroy-bundle diff --git a/acceptance/bundle/bundle_tag/id/script b/acceptance/bundle/bundle_tag/id/script index dbc595a277..ff688e96f2 100644 --- a/acceptance/bundle/bundle_tag/id/script +++ b/acceptance/bundle/bundle_tag/id/script @@ -4,5 +4,5 @@ trace $CLI bundle plan trace $CLI bundle deploy trace print_requests.py //jobs trace $CLI bundle summary -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests.py //jobs diff --git a/acceptance/bundle/bundle_tag/url/script b/acceptance/bundle/bundle_tag/url/script index dbc595a277..ff688e96f2 100644 --- a/acceptance/bundle/bundle_tag/url/script +++ b/acceptance/bundle/bundle_tag/url/script @@ -4,5 +4,5 @@ trace $CLI bundle plan trace $CLI bundle deploy trace print_requests.py //jobs trace $CLI bundle summary -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests.py //jobs diff --git a/acceptance/bundle/config-remote-sync/cli_defaults/script b/acceptance/bundle/config-remote-sync/cli_defaults/script index cf626b9dc9..b86714a830 100755 --- a/acceptance/bundle/config-remote-sync/cli_defaults/script +++ b/acceptance/bundle/config-remote-sync/cli_defaults/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/config_edits/script b/acceptance/bundle/config-remote-sync/config_edits/script index e7defc9b65..e50ba9caed 100755 --- a/acceptance/bundle/config-remote-sync/config_edits/script +++ b/acceptance/bundle/config-remote-sync/config_edits/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/dashboard_etag/script b/acceptance/bundle/config-remote-sync/dashboard_etag/script index 990988c590..b6b81ed552 100644 --- a/acceptance/bundle/config-remote-sync/dashboard_etag/script +++ b/acceptance/bundle/config-remote-sync/dashboard_etag/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/flushed_cache/script b/acceptance/bundle/config-remote-sync/flushed_cache/script index 7571c62bbb..71b9b2e6da 100755 --- a/acceptance/bundle/config-remote-sync/flushed_cache/script +++ b/acceptance/bundle/config-remote-sync/flushed_cache/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/formatting_preserved/script b/acceptance/bundle/config-remote-sync/formatting_preserved/script index 526ba1f439..bd8e69b8fd 100755 --- a/acceptance/bundle/config-remote-sync/formatting_preserved/script +++ b/acceptance/bundle/config-remote-sync/formatting_preserved/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/job_fields/script b/acceptance/bundle/config-remote-sync/job_fields/script index c667e273b2..acdb210a5a 100755 --- a/acceptance/bundle/config-remote-sync/job_fields/script +++ b/acceptance/bundle/config-remote-sync/job_fields/script @@ -5,7 +5,7 @@ add_repl "$DEFAULT_SPARK_VERSION" DEFAULT_SPARK_VERSION add_repl "$NODE_TYPE_ID" NODE_TYPE_ID cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle # destroy records requests too; drop the recorded file so it is not compared. rm -f out.requests.txt } diff --git a/acceptance/bundle/config-remote-sync/job_multiple_tasks/script b/acceptance/bundle/config-remote-sync/job_multiple_tasks/script index ff2b7e464a..c39a75a512 100755 --- a/acceptance/bundle/config-remote-sync/job_multiple_tasks/script +++ b/acceptance/bundle/config-remote-sync/job_multiple_tasks/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/job_params_variables/script b/acceptance/bundle/config-remote-sync/job_params_variables/script index 8a8acc6d97..70a40ae8a7 100644 --- a/acceptance/bundle/config-remote-sync/job_params_variables/script +++ b/acceptance/bundle/config-remote-sync/job_params_variables/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/job_pipeline_task/script b/acceptance/bundle/config-remote-sync/job_pipeline_task/script index d5587a201e..da3cd4e448 100755 --- a/acceptance/bundle/config-remote-sync/job_pipeline_task/script +++ b/acceptance/bundle/config-remote-sync/job_pipeline_task/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/multiple_files/script b/acceptance/bundle/config-remote-sync/multiple_files/script index 4316a3f1cc..f6cc6188f8 100755 --- a/acceptance/bundle/config-remote-sync/multiple_files/script +++ b/acceptance/bundle/config-remote-sync/multiple_files/script @@ -5,7 +5,7 @@ envsubst < resources/job1.yml.tmpl > resources/job1.yml envsubst < resources/job2.yml.tmpl > resources/job2.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/multiple_resources/script b/acceptance/bundle/config-remote-sync/multiple_resources/script index 7a89c168d6..b420c53c93 100755 --- a/acceptance/bundle/config-remote-sync/multiple_resources/script +++ b/acceptance/bundle/config-remote-sync/multiple_resources/script @@ -6,7 +6,7 @@ cleanup() { # Restore original config before destroy to avoid Terraform errors # from server-side-only fields (e.g. creator_name) written by config-remote-sync. envsubst < databricks.yml.tmpl > databricks.yml - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/output_json/script b/acceptance/bundle/config-remote-sync/output_json/script index b3b9f6ab6c..58e83e4494 100755 --- a/acceptance/bundle/config-remote-sync/output_json/script +++ b/acceptance/bundle/config-remote-sync/output_json/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/output_no_changes/script b/acceptance/bundle/config-remote-sync/output_no_changes/script index 1bef0ab9c0..1ba82e296f 100755 --- a/acceptance/bundle/config-remote-sync/output_no_changes/script +++ b/acceptance/bundle/config-remote-sync/output_no_changes/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/pipeline_fields/script b/acceptance/bundle/config-remote-sync/pipeline_fields/script index 1fe0261689..beef4407d9 100755 --- a/acceptance/bundle/config-remote-sync/pipeline_fields/script +++ b/acceptance/bundle/config-remote-sync/pipeline_fields/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/policy_injected_cluster_fields/script b/acceptance/bundle/config-remote-sync/policy_injected_cluster_fields/script index bcc9844b03..a068c9e49a 100644 --- a/acceptance/bundle/config-remote-sync/policy_injected_cluster_fields/script +++ b/acceptance/bundle/config-remote-sync/policy_injected_cluster_fields/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/resolve_variables/script b/acceptance/bundle/config-remote-sync/resolve_variables/script index 9a18bfe2d5..2fb57e77fe 100755 --- a/acceptance/bundle/config-remote-sync/resolve_variables/script +++ b/acceptance/bundle/config-remote-sync/resolve_variables/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle # destroy records requests too; drop the recorded file so it is not compared. rm -f out.requests.txt } diff --git a/acceptance/bundle/config-remote-sync/select_basic/script b/acceptance/bundle/config-remote-sync/select_basic/script index a85bb0b46a..27f2c8e8d2 100644 --- a/acceptance/bundle/config-remote-sync/select_basic/script +++ b/acceptance/bundle/config-remote-sync/select_basic/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/select_multiple/script b/acceptance/bundle/config-remote-sync/select_multiple/script index 8eab7443af..4db2dcf57a 100644 --- a/acceptance/bundle/config-remote-sync/select_multiple/script +++ b/acceptance/bundle/config-remote-sync/select_multiple/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/skip_permissions/script b/acceptance/bundle/config-remote-sync/skip_permissions/script index 585db4a553..401a8dc23e 100644 --- a/acceptance/bundle/config-remote-sync/skip_permissions/script +++ b/acceptance/bundle/config-remote-sync/skip_permissions/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/split/isolation/script b/acceptance/bundle/config-remote-sync/split/isolation/script index b1320eed71..074008220b 100644 --- a/acceptance/bundle/config-remote-sync/split/isolation/script +++ b/acceptance/bundle/config-remote-sync/split/isolation/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve -t dev + destroy-bundle -t dev } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/split/keyed_edit/script b/acceptance/bundle/config-remote-sync/split/keyed_edit/script index dcfc102845..15bb249799 100644 --- a/acceptance/bundle/config-remote-sync/split/keyed_edit/script +++ b/acceptance/bundle/config-remote-sync/split/keyed_edit/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve -t dev + destroy-bundle -t dev } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/split/keyed_remove/script b/acceptance/bundle/config-remote-sync/split/keyed_remove/script index 73998fa670..2c4b84afae 100644 --- a/acceptance/bundle/config-remote-sync/split/keyed_remove/script +++ b/acceptance/bundle/config-remote-sync/split/keyed_remove/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve -t dev + destroy-bundle -t dev } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/split/keyed_rename/script b/acceptance/bundle/config-remote-sync/split/keyed_rename/script index 88b8106ed5..5cb3352554 100644 --- a/acceptance/bundle/config-remote-sync/split/keyed_rename/script +++ b/acceptance/bundle/config-remote-sync/split/keyed_rename/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve -t dev + destroy-bundle -t dev } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/split/keyed_twoblock/script b/acceptance/bundle/config-remote-sync/split/keyed_twoblock/script index 2b7d8cf82c..f2aa15a7da 100644 --- a/acceptance/bundle/config-remote-sync/split/keyed_twoblock/script +++ b/acceptance/bundle/config-remote-sync/split/keyed_twoblock/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve -t dev + destroy-bundle -t dev } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/split/multifile/script b/acceptance/bundle/config-remote-sync/split/multifile/script index 4f82441d08..81c3f66c4a 100644 --- a/acceptance/bundle/config-remote-sync/split/multifile/script +++ b/acceptance/bundle/config-remote-sync/split/multifile/script @@ -5,7 +5,7 @@ envsubst < overrides/10-first.yml.tmpl > overrides/10-first.yml envsubst < overrides/20-second.yml.tmpl > overrides/20-second.yml cleanup() { - trace $CLI bundle destroy --auto-approve -t dev + destroy-bundle -t dev } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/split/nested_sequence/script b/acceptance/bundle/config-remote-sync/split/nested_sequence/script index 26d2646899..f608274d31 100644 --- a/acceptance/bundle/config-remote-sync/split/nested_sequence/script +++ b/acceptance/bundle/config-remote-sync/split/nested_sequence/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve -t dev + destroy-bundle -t dev } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/split/positional/script b/acceptance/bundle/config-remote-sync/split/positional/script index fa7b1d54db..22f53f5d62 100644 --- a/acceptance/bundle/config-remote-sync/split/positional/script +++ b/acceptance/bundle/config-remote-sync/split/positional/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve -t dev + destroy-bundle -t dev } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/split/target_variable/script b/acceptance/bundle/config-remote-sync/split/target_variable/script index da7ff42824..8e29227ec9 100644 --- a/acceptance/bundle/config-remote-sync/split/target_variable/script +++ b/acceptance/bundle/config-remote-sync/split/target_variable/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve -t dev + destroy-bundle -t dev } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/target_override/script b/acceptance/bundle/config-remote-sync/target_override/script index 671eb75ed2..7a71035ff5 100755 --- a/acceptance/bundle/config-remote-sync/target_override/script +++ b/acceptance/bundle/config-remote-sync/target_override/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve -t dev + destroy-bundle -t dev } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/task_rename_revert/script b/acceptance/bundle/config-remote-sync/task_rename_revert/script index a01c1196de..067c9c44c3 100644 --- a/acceptance/bundle/config-remote-sync/task_rename_revert/script +++ b/acceptance/bundle/config-remote-sync/task_rename_revert/script @@ -3,7 +3,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/config-remote-sync/validation_errors/script b/acceptance/bundle/config-remote-sync/validation_errors/script index 828ec20644..3d62be17a8 100644 --- a/acceptance/bundle/config-remote-sync/validation_errors/script +++ b/acceptance/bundle/config-remote-sync/validation_errors/script @@ -8,7 +8,7 @@ cleanup() { # Restore valid paths for destroy to work (includes pipeline_root_v2 from sync) mkdir -p pipeline_root pipeline_root_v2 src echo '# Databricks notebook source' > src/notebook.py - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/deploy/empty-bundle/script b/acceptance/bundle/deploy/empty-bundle/script index 775ccd0def..39c314b60a 100644 --- a/acceptance/bundle/deploy/empty-bundle/script +++ b/acceptance/bundle/deploy/empty-bundle/script @@ -1,6 +1,6 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/deploy/files/no-snapshot-sync/script b/acceptance/bundle/deploy/files/no-snapshot-sync/script index bc8544715e..8c1089dff5 100644 --- a/acceptance/bundle/deploy/files/no-snapshot-sync/script +++ b/acceptance/bundle/deploy/files/no-snapshot-sync/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/deploy/immutable-no-artifacts/script b/acceptance/bundle/deploy/immutable-no-artifacts/script index a7aad71875..2e4b83ec06 100644 --- a/acceptance/bundle/deploy/immutable-no-artifacts/script +++ b/acceptance/bundle/deploy/immutable-no-artifacts/script @@ -15,4 +15,4 @@ trace $CLI jobs get $JOB_ID | jq '.settings.tasks' | jq '.[] | select(.spark_pyt trace $CLI jobs get $JOB_ID | jq '.settings.tasks' | jq '.[] | select(.notebook_task != null) | .notebook_task.notebook_path' trace $CLI jobs get $JOB_ID | jq '.settings.tasks' | jq '.[] | select(.notebook_task != null) | .notebook_task.base_parameters.path' -trace $CLI bundle destroy --auto-approve +destroy-bundle diff --git a/acceptance/bundle/deploy/immutable-permissions-change/script b/acceptance/bundle/deploy/immutable-permissions-change/script index 458bfdd2c8..5cf4ed05ca 100644 --- a/acceptance/bundle/deploy/immutable-permissions-change/script +++ b/acceptance/bundle/deploy/immutable-permissions-change/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/deploy/immutable/script b/acceptance/bundle/deploy/immutable/script index 85e9a908d1..d075d1adfa 100644 --- a/acceptance/bundle/deploy/immutable/script +++ b/acceptance/bundle/deploy/immutable/script @@ -1,6 +1,6 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/deploy/partial-summary-on-push-fail/script b/acceptance/bundle/deploy/partial-summary-on-push-fail/script index 9e11abbe1b..c353073f42 100644 --- a/acceptance/bundle/deploy/partial-summary-on-push-fail/script +++ b/acceptance/bundle/deploy/partial-summary-on-push-fail/script @@ -2,7 +2,7 @@ cleanup() { # Second deploy has no fault, so it succeeds and prints both summary lines; this # both cleans up and shows the contrast with the failed deploy above. trace $CLI bundle deploy - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/deploy/pipeline-config-dots/script b/acceptance/bundle/deploy/pipeline-config-dots/script index 82f07ae34d..9ea5fba218 100644 --- a/acceptance/bundle/deploy/pipeline-config-dots/script +++ b/acceptance/bundle/deploy/pipeline-config-dots/script @@ -1,7 +1,7 @@ trace $CLI bundle validate cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/deploy/readplan/basic/script b/acceptance/bundle/deploy/readplan/basic/script index 89bf2487b8..dcd3bc704a 100644 --- a/acceptance/bundle/deploy/readplan/basic/script +++ b/acceptance/bundle/deploy/readplan/basic/script @@ -14,5 +14,5 @@ trace $CLI bundle deploy --plan out.plan_skip.json # Show what requests were made (should not create/update job again; should not read remote state) trace print_requests.py --get //jobs | contains.py "!GET" "!POST" -trace $CLI bundle destroy --auto-approve +destroy-bundle rm out.requests.txt diff --git a/acceptance/bundle/deploy/readplan/cli-version-mismatch/script b/acceptance/bundle/deploy/readplan/cli-version-mismatch/script index b7fe9ee268..1310b6ac62 100644 --- a/acceptance/bundle/deploy/readplan/cli-version-mismatch/script +++ b/acceptance/bundle/deploy/readplan/cli-version-mismatch/script @@ -5,5 +5,5 @@ jq '.cli_version = "1.2.3"' plan.json > plan.json.tmp && mv plan.json.tmp plan.j trace $CLI bundle deploy --plan plan.json rm plan.json print_requests.py //jobs -trace $CLI bundle destroy --auto-approve +destroy-bundle rm out.requests.txt diff --git a/acceptance/bundle/deploy/readplan/postgres_role/script b/acceptance/bundle/deploy/readplan/postgres_role/script index efade4e278..726b2d3fa7 100644 --- a/acceptance/bundle/deploy/readplan/postgres_role/script +++ b/acceptance/bundle/deploy/readplan/postgres_role/script @@ -19,5 +19,5 @@ trace print_requests.py //roles # A follow-up plan must show no drift. trace $CLI bundle plan -trace $CLI bundle destroy --auto-approve +destroy-bundle rm out.requests.txt diff --git a/acceptance/bundle/deploy/readplan/serial-mismatch/script b/acceptance/bundle/deploy/readplan/serial-mismatch/script index 170f44a4c8..05e4c344ff 100644 --- a/acceptance/bundle/deploy/readplan/serial-mismatch/script +++ b/acceptance/bundle/deploy/readplan/serial-mismatch/script @@ -11,4 +11,4 @@ jq '.serial = 999' plan.json > plan.json.tmp && mv plan.json.tmp plan.json musterr $CLI bundle deploy --plan plan.json rm plan.json -trace $CLI bundle destroy --auto-approve +destroy-bundle diff --git a/acceptance/bundle/deploy/spark-jar-task/script b/acceptance/bundle/deploy/spark-jar-task/script index d736ca6bfa..2299932331 100644 --- a/acceptance/bundle/deploy/spark-jar-task/script +++ b/acceptance/bundle/deploy/spark-jar-task/script @@ -1,4 +1,4 @@ envsubst < databricks.yml.tmpl > databricks.yml -trap "errcode trace '$CLI' bundle destroy --auto-approve" EXIT +trap "errcode destroy-bundle" EXIT trace $CLI bundle deploy trace $CLI bundle run jar_job diff --git a/acceptance/bundle/deployment/bind/catalog/script b/acceptance/bundle/deployment/bind/catalog/script index f00c7819e4..d25f1943ab 100644 --- a/acceptance/bundle/deployment/bind/catalog/script +++ b/acceptance/bundle/deployment/bind/catalog/script @@ -20,7 +20,7 @@ title "Unbind catalog" trace $CLI bundle deployment unbind foo title "Destroy bundle" -trace $CLI bundle destroy --auto-approve +destroy-bundle title "Read the pre-defined catalog again (expecting it still exists): " trace $CLI catalogs get "test-catalog-$UNIQUE_NAME" | jq '{comment, name}' diff --git a/acceptance/bundle/deployment/bind/dashboard/script b/acceptance/bundle/deployment/bind/dashboard/script index 3d4163a947..34f10ab826 100644 --- a/acceptance/bundle/deployment/bind/dashboard/script +++ b/acceptance/bundle/deployment/bind/dashboard/script @@ -22,7 +22,7 @@ trace $CLI lakeview get "${DASHBOARD_ID}" | jq --sort-keys '{display_name, lifec trace $CLI bundle deployment unbind dashboard1 -trace $CLI bundle destroy --auto-approve +destroy-bundle # Read the pre-defined dashboard again (expecting it still exists and is not deleted): trace $CLI lakeview get "${DASHBOARD_ID}" | jq --sort-keys '{display_name, lifecycle_state, path, parent_path, serialized_dashboard} | .serialized_dashboard |= fromjson' diff --git a/acceptance/bundle/deployment/bind/experiment/script b/acceptance/bundle/deployment/bind/experiment/script index 70cf193381..d2658a0fe2 100644 --- a/acceptance/bundle/deployment/bind/experiment/script +++ b/acceptance/bundle/deployment/bind/experiment/script @@ -33,6 +33,6 @@ $CLI bundle plan --output json | jq '{plan: .plan | map_values({action, name_cha trace $CLI bundle deployment unbind experiment1 -trace $CLI bundle destroy --auto-approve +destroy-bundle trace $CLI experiments get-experiment ${EXPERIMENT_ID} | jq '{name: .experiment.name, lifecycle_stage: .experiment.lifecycle_stage}' diff --git a/acceptance/bundle/deployment/bind/external_location/script b/acceptance/bundle/deployment/bind/external_location/script index 6f91ac1169..01070882bd 100644 --- a/acceptance/bundle/deployment/bind/external_location/script +++ b/acceptance/bundle/deployment/bind/external_location/script @@ -20,7 +20,7 @@ title "Unbind external location" trace $CLI bundle deployment unbind test_location title "Destroy bundle" -trace $CLI bundle destroy --auto-approve +destroy-bundle title "Read the pre-defined external location again (expecting it still exists): " trace $CLI external-locations get "test-location-$UNIQUE_NAME" | jq '{name, url, credential_name}' diff --git a/acceptance/bundle/deployment/bind/genie_space/script b/acceptance/bundle/deployment/bind/genie_space/script index 896685a231..b7c75fd55f 100644 --- a/acceptance/bundle/deployment/bind/genie_space/script +++ b/acceptance/bundle/deployment/bind/genie_space/script @@ -24,7 +24,7 @@ trace $CLI genie get-space "${GENIE_SPACE_ID}" | jq --sort-keys '{title, parent_ trace $CLI bundle deployment unbind genie_space1 -trace $CLI bundle destroy --auto-approve +destroy-bundle # Read the Genie space again (expecting it still exists and is not deleted): trace $CLI genie get-space "${GENIE_SPACE_ID}" | jq --sort-keys '{title, parent_path, warehouse_id}' diff --git a/acceptance/bundle/deployment/bind/job/generate-and-bind/script b/acceptance/bundle/deployment/bind/job/generate-and-bind/script index a1f6e2c34e..9a902cdb52 100644 --- a/acceptance/bundle/deployment/bind/job/generate-and-bind/script +++ b/acceptance/bundle/deployment/bind/job/generate-and-bind/script @@ -47,7 +47,7 @@ trace cat resources/test_job_key.job.yml | grep "name: generate-job-${UNIQUE_NAM trace $CLI bundle deployment bind test_job_key $JOB_ID --auto-approve trace $CLI bundle deploy -trace $CLI bundle destroy --auto-approve +destroy-bundle title "Check that job is bound and does not exist after bundle is destroyed:" trace errcode $CLI jobs get "${JOB_ID}" --output json diff --git a/acceptance/bundle/deployment/bind/job/job-spark-python-task/script b/acceptance/bundle/deployment/bind/job/job-spark-python-task/script index c083189941..7414610b14 100644 --- a/acceptance/bundle/deployment/bind/job/job-spark-python-task/script +++ b/acceptance/bundle/deployment/bind/job/job-spark-python-task/script @@ -50,7 +50,7 @@ title "Remove .databricks directory to simulate fresh deployment:" trace rm -rf .databricks title "Destroy the bundle:" -trace $CLI bundle destroy --auto-approve +destroy-bundle title "Read the pre-defined job again (expecting it still exists):" trace $CLI jobs get ${JOB_ID} | jq '{job_id, settings: {name: .settings.name, tasks: [.settings.tasks[] | {task_key, spark_python_task: {python_file: .spark_python_task.python_file}}]}}' diff --git a/acceptance/bundle/deployment/bind/model-serving-endpoint/script b/acceptance/bundle/deployment/bind/model-serving-endpoint/script index 100b70b29e..f07db3240c 100644 --- a/acceptance/bundle/deployment/bind/model-serving-endpoint/script +++ b/acceptance/bundle/deployment/bind/model-serving-endpoint/script @@ -21,7 +21,7 @@ trace $CLI serving-endpoints get "${ENDPOINT_NAME}" | jq '{name, permission_leve trace $CLI bundle deployment unbind endpoint1 -trace $CLI bundle destroy --auto-approve +destroy-bundle # Read the pre-defined serving-endpoint again (expecting it still exists and is not deleted): trace $CLI serving-endpoints get "${ENDPOINT_NAME}" | jq '{name, permission_level, route_optimized, state}' diff --git a/acceptance/bundle/deployment/bind/registered-model/script b/acceptance/bundle/deployment/bind/registered-model/script index 2229197247..211e493090 100644 --- a/acceptance/bundle/deployment/bind/registered-model/script +++ b/acceptance/bundle/deployment/bind/registered-model/script @@ -26,7 +26,7 @@ trace $CLI registered-models get "${MODEL_FULL_NAME}" | jq '{full_name, schema_n trace $CLI bundle deployment unbind model1 -trace $CLI bundle destroy --auto-approve +destroy-bundle # Read the pre-defined model again (expecting it still exists and is not deleted): trace $CLI registered-models get "${MODEL_FULL_NAME}" | jq '{full_name, schema_name, name}' diff --git a/acceptance/bundle/deployment/bind/secret-scope/script b/acceptance/bundle/deployment/bind/secret-scope/script index e67b4f91f9..f907da576c 100644 --- a/acceptance/bundle/deployment/bind/secret-scope/script +++ b/acceptance/bundle/deployment/bind/secret-scope/script @@ -18,6 +18,6 @@ trace $CLI secrets list-scopes -o json | jq --arg value ${SECRET_SCOPE_NAME} '.[ trace $CLI bundle deployment unbind secret_scope1 -trace $CLI bundle destroy --auto-approve +destroy-bundle trace $CLI secrets list-scopes -o json | jq --arg value ${SECRET_SCOPE_NAME} '.[] | select(.name == $value)' diff --git a/acceptance/bundle/deployment/bind/vector_search_endpoint/script b/acceptance/bundle/deployment/bind/vector_search_endpoint/script index bf45cbea78..45802397f4 100644 --- a/acceptance/bundle/deployment/bind/vector_search_endpoint/script +++ b/acceptance/bundle/deployment/bind/vector_search_endpoint/script @@ -17,7 +17,7 @@ trace $CLI vector-search-endpoints get-endpoint "${ENDPOINT_NAME}" | jq '{id, na trace $CLI bundle deployment unbind endpoint1 -trace $CLI bundle destroy --auto-approve +destroy-bundle # Read the pre-defined endpoint again (expecting it still exists and is not deleted): trace $CLI vector-search-endpoints get-endpoint "${ENDPOINT_NAME}" | jq '{id, name, endpoint_type}' diff --git a/acceptance/bundle/deployment/bind/vector_search_index/script b/acceptance/bundle/deployment/bind/vector_search_index/script index 16f36a496f..d6268eaf91 100644 --- a/acceptance/bundle/deployment/bind/vector_search_index/script +++ b/acceptance/bundle/deployment/bind/vector_search_index/script @@ -21,7 +21,7 @@ trace $CLI vector-search-indexes get-index "${INDEX_NAME}" | jq '{name, endpoint trace $CLI bundle deployment unbind index1 -trace $CLI bundle destroy --auto-approve +destroy-bundle # Read the pre-defined index again (expecting it still exists and is not deleted): trace $CLI vector-search-indexes get-index "${INDEX_NAME}" | jq '{name, endpoint_name, index_type, primary_key}' diff --git a/acceptance/bundle/deployment/bind/volume/script b/acceptance/bundle/deployment/bind/volume/script index dee5352a83..5395c9f280 100644 --- a/acceptance/bundle/deployment/bind/volume/script +++ b/acceptance/bundle/deployment/bind/volume/script @@ -25,6 +25,6 @@ trace $CLI volumes read "${VOLUME_FULL_NAME}" | jq '{catalog_name, full_name, sc trace $CLI bundle deployment unbind volume1 -trace $CLI bundle destroy --auto-approve +destroy-bundle trace $CLI volumes read "${VOLUME_FULL_NAME}" | jq '{catalog_name, full_name, schema_name, volume_type}' diff --git a/acceptance/bundle/deployment/unbind/grants/script b/acceptance/bundle/deployment/unbind/grants/script index f6da92a7e6..fddc209cb4 100644 --- a/acceptance/bundle/deployment/unbind/grants/script +++ b/acceptance/bundle/deployment/unbind/grants/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle if [[ -n "$schema_id" ]]; then trace $CLI schemas delete $schema_id fi diff --git a/acceptance/bundle/deployment/unbind/permissions/script b/acceptance/bundle/deployment/unbind/permissions/script index 078e3c3af6..e6565dda66 100644 --- a/acceptance/bundle/deployment/unbind/permissions/script +++ b/acceptance/bundle/deployment/unbind/permissions/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle trace $CLI jobs delete $job_id echo $? } diff --git a/acceptance/bundle/destroy/jobs-and-pipeline/script b/acceptance/bundle/destroy/jobs-and-pipeline/script index 57ee878f12..fdd23a2465 100644 --- a/acceptance/bundle/destroy/jobs-and-pipeline/script +++ b/acceptance/bundle/destroy/jobs-and-pipeline/script @@ -8,7 +8,7 @@ DEPLOYMENT_PATH="//Workspace/Users/${CURRENT_USER_NAME}/.bundle/${UNIQUE_NAME}" cleanup() { title "Destroy bundle" - trace $CLI bundle destroy --auto-approve + destroy-bundle title "Assert pipeline is deleted" trace errcode $CLI pipelines get "${PIPELINE_ID}" diff --git a/acceptance/bundle/generate/auto-bind/script b/acceptance/bundle/generate/auto-bind/script index f6517a8adb..3858b76a87 100755 --- a/acceptance/bundle/generate/auto-bind/script +++ b/acceptance/bundle/generate/auto-bind/script @@ -45,7 +45,7 @@ title "Deploy the bound job:" trace $CLI bundle deploy title "Destroy the bundle:" -trace $CLI bundle destroy --auto-approve +destroy-bundle title "Check that job is bound and does not exist after bundle is destroyed:" trace errcode $CLI jobs get "${JOB_ID}" --output json diff --git a/acceptance/bundle/generate/pipeline_and_deploy/script b/acceptance/bundle/generate/pipeline_and_deploy/script index 32d4cbcbc4..2e531ffb07 100644 --- a/acceptance/bundle/generate/pipeline_and_deploy/script +++ b/acceptance/bundle/generate/pipeline_and_deploy/script @@ -50,4 +50,4 @@ title "Deploy the generated bundle" trace $CLI bundle deploy title "Destroy the deployed bundle" -trace $CLI bundle destroy --auto-approve +destroy-bundle diff --git a/acceptance/bundle/generate/python_job_and_deploy/script b/acceptance/bundle/generate/python_job_and_deploy/script index f9629bf8e7..e7dc2d8d33 100644 --- a/acceptance/bundle/generate/python_job_and_deploy/script +++ b/acceptance/bundle/generate/python_job_and_deploy/script @@ -47,4 +47,4 @@ title "Deploy the generated bundle" trace $CLI bundle deploy title "Destroy the deployed bundle" -trace $CLI bundle destroy --auto-approve +destroy-bundle diff --git a/acceptance/bundle/integration_whl/base/script b/acceptance/bundle/integration_whl/base/script index 0be0b1aa9b..0be8063ce7 100644 --- a/acceptance/bundle/integration_whl/base/script +++ b/acceptance/bundle/integration_whl/base/script @@ -1,7 +1,7 @@ export EXTRA_CONFIG=empty.yml envsubst < databricks.yml.tmpl > databricks.yml trace cat databricks.yml -trap "errcode trace '$CLI' bundle destroy --auto-approve" EXIT +trap "errcode destroy-bundle" EXIT trace $CLI bundle deploy # Add all resource IDs to runtime replacements to avoid pattern matching ambiguity diff --git a/acceptance/bundle/integration_whl/custom_params/script b/acceptance/bundle/integration_whl/custom_params/script index ff98482dc8..6024bb665c 100644 --- a/acceptance/bundle/integration_whl/custom_params/script +++ b/acceptance/bundle/integration_whl/custom_params/script @@ -2,7 +2,7 @@ export EXTRA_CONFIG=empty.yml envsubst < $TESTDIR/../base/databricks.yml.tmpl > databricks.yml cp -r $TESTDIR/../base/{$EXTRA_CONFIG,setup.py,my_test_code} . trace cat databricks.yml -trap "errcode trace '$CLI' bundle destroy --auto-approve" EXIT +trap "errcode destroy-bundle" EXIT trace $CLI bundle deploy # Add all resource IDs to runtime replacements to avoid pattern matching ambiguity diff --git a/acceptance/bundle/integration_whl/interactive_cluster/script b/acceptance/bundle/integration_whl/interactive_cluster/script index 49ad28155b..748b50bb28 100644 --- a/acceptance/bundle/integration_whl/interactive_cluster/script +++ b/acceptance/bundle/integration_whl/interactive_cluster/script @@ -1,7 +1,7 @@ export DATA_SECURITY_MODE=USER_ISOLATION envsubst < databricks.yml.tmpl > databricks.yml trace cat databricks.yml -trap "errcode trace '$CLI' bundle destroy --auto-approve" EXIT +trap "errcode destroy-bundle" EXIT trace $CLI bundle deploy # Add all resource IDs to runtime replacements to avoid pattern matching ambiguity diff --git a/acceptance/bundle/integration_whl/interactive_cluster_dynamic_version/script b/acceptance/bundle/integration_whl/interactive_cluster_dynamic_version/script index b30a73ee0d..6aa341f28d 100644 --- a/acceptance/bundle/integration_whl/interactive_cluster_dynamic_version/script +++ b/acceptance/bundle/integration_whl/interactive_cluster_dynamic_version/script @@ -1,6 +1,6 @@ envsubst < databricks.yml.tmpl > databricks.yml cp -r $TESTDIR/../interactive_cluster/{setup.py,my_test_code} . -trap "errcode trace '$CLI' bundle destroy --auto-approve" EXIT +trap "errcode destroy-bundle" EXIT trace $CLI bundle deploy # Add all resource IDs to runtime replacements to avoid pattern matching ambiguity diff --git a/acceptance/bundle/integration_whl/interactive_single_user/script b/acceptance/bundle/integration_whl/interactive_single_user/script index 25227da81c..21f20b4672 100644 --- a/acceptance/bundle/integration_whl/interactive_single_user/script +++ b/acceptance/bundle/integration_whl/interactive_single_user/script @@ -2,7 +2,7 @@ export DATA_SECURITY_MODE=SINGLE_USER envsubst < $TESTDIR/../interactive_cluster/databricks.yml.tmpl > databricks.yml trace cat databricks.yml cp -r $TESTDIR/../interactive_cluster/{setup.py,my_test_code} . -trap "errcode trace '$CLI' bundle destroy --auto-approve" EXIT +trap "errcode destroy-bundle" EXIT trace $CLI bundle deploy # Add all resource IDs to runtime replacements to avoid pattern matching ambiguity diff --git a/acceptance/bundle/integration_whl/serverless/script b/acceptance/bundle/integration_whl/serverless/script index fc4be42b3c..6b04ab80ea 100644 --- a/acceptance/bundle/integration_whl/serverless/script +++ b/acceptance/bundle/integration_whl/serverless/script @@ -1,6 +1,6 @@ envsubst < databricks.yml.tmpl > databricks.yml trace cp -r $TESTDIR/../base/{setup.py,my_test_code} . -trap "errcode trace '$CLI' bundle destroy --auto-approve" EXIT +trap "errcode destroy-bundle" EXIT trace $CLI bundle deploy # Add all resource IDs to runtime replacements to avoid pattern matching ambiguity diff --git a/acceptance/bundle/integration_whl/serverless_custom_params/script b/acceptance/bundle/integration_whl/serverless_custom_params/script index 9f57bd052e..b8fc4016b3 100644 --- a/acceptance/bundle/integration_whl/serverless_custom_params/script +++ b/acceptance/bundle/integration_whl/serverless_custom_params/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/integration_whl/serverless_dynamic_version/script b/acceptance/bundle/integration_whl/serverless_dynamic_version/script index fc4be42b3c..6b04ab80ea 100644 --- a/acceptance/bundle/integration_whl/serverless_dynamic_version/script +++ b/acceptance/bundle/integration_whl/serverless_dynamic_version/script @@ -1,6 +1,6 @@ envsubst < databricks.yml.tmpl > databricks.yml trace cp -r $TESTDIR/../base/{setup.py,my_test_code} . -trap "errcode trace '$CLI' bundle destroy --auto-approve" EXIT +trap "errcode destroy-bundle" EXIT trace $CLI bundle deploy # Add all resource IDs to runtime replacements to avoid pattern matching ambiguity diff --git a/acceptance/bundle/integration_whl/serverless_extras/script b/acceptance/bundle/integration_whl/serverless_extras/script index 2de85e21b4..9570f427f6 100644 --- a/acceptance/bundle/integration_whl/serverless_extras/script +++ b/acceptance/bundle/integration_whl/serverless_extras/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/integration_whl/serverless_extras_dynamic_version/script b/acceptance/bundle/integration_whl/serverless_extras_dynamic_version/script index 2de85e21b4..9570f427f6 100644 --- a/acceptance/bundle/integration_whl/serverless_extras_dynamic_version/script +++ b/acceptance/bundle/integration_whl/serverless_extras_dynamic_version/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/integration_whl/wrapper/script b/acceptance/bundle/integration_whl/wrapper/script index d0f98cb289..481e175fcb 100644 --- a/acceptance/bundle/integration_whl/wrapper/script +++ b/acceptance/bundle/integration_whl/wrapper/script @@ -7,7 +7,7 @@ export EXTRA_CONFIG=python_wheel_wrapper.yml envsubst < $TESTDIR/../base/databricks.yml.tmpl > databricks.yml cp -r $TESTDIR/../base/{$EXTRA_CONFIG,setup.py,my_test_code} . trace cat databricks.yml -trap "errcode trace '$CLI' bundle destroy --auto-approve" EXIT +trap "errcode destroy-bundle" EXIT trace $CLI bundle deploy # Add all resource IDs to runtime replacements to avoid pattern matching ambiguity diff --git a/acceptance/bundle/integration_whl/wrapper_custom_params/script b/acceptance/bundle/integration_whl/wrapper_custom_params/script index ab9c450327..7319af7fbc 100644 --- a/acceptance/bundle/integration_whl/wrapper_custom_params/script +++ b/acceptance/bundle/integration_whl/wrapper_custom_params/script @@ -3,6 +3,6 @@ export EXTRA_CONFIG=python_wheel_wrapper.yml envsubst < $TESTDIR/../base/databricks.yml.tmpl > databricks.yml cp -r $TESTDIR/../base/{$EXTRA_CONFIG,setup.py,my_test_code} . trace cat databricks.yml -trap "errcode trace '$CLI' bundle destroy --auto-approve" EXIT +trap "errcode destroy-bundle" EXIT trace $CLI bundle deploy trace $CLI bundle run some_other_job --python-params param1,param2 diff --git a/acceptance/bundle/quiet-levels/script b/acceptance/bundle/quiet-levels/script index cfe42aaab5..defe6ba27b 100644 --- a/acceptance/bundle/quiet-levels/script +++ b/acceptance/bundle/quiet-levels/script @@ -42,4 +42,4 @@ trace $CLI bundle destroy --auto-approve -q # a TTY, so TestApprovalForDestroyQuietWhilePrompting covers it. title "destroy --auto-approve -qq: nothing" trace $CLI bundle deploy -qq -trace $CLI bundle destroy --auto-approve -qq +destroy-bundle -qq diff --git a/acceptance/bundle/resource_deps/create_error/script b/acceptance/bundle/resource_deps/create_error/script index d475fdaea7..f0f4a3428c 100644 --- a/acceptance/bundle/resource_deps/create_error/script +++ b/acceptance/bundle/resource_deps/create_error/script @@ -18,5 +18,5 @@ diff.py out.deploy.$DATABRICKS_BUNDLE_ENGINE.txt out.deploy2.$DATABRICKS_BUNDLE_ rm out.deploy2.$DATABRICKS_BUNDLE_ENGINE.txt trace print_requests.py //jobs -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests.py //jobs diff --git a/acceptance/bundle/resource_deps/job_id/script b/acceptance/bundle/resource_deps/job_id/script index 3b033fe390..a06d1849c5 100644 --- a/acceptance/bundle/resource_deps/job_id/script +++ b/acceptance/bundle/resource_deps/job_id/script @@ -12,5 +12,5 @@ trace $CLI bundle plan -o json > out.plan_delete.$DATABRICKS_BUNDLE_ENGINE.json trace $CLI bundle deploy trace print_requests.py //jobs -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests.py //jobs diff --git a/acceptance/bundle/resource_deps/job_id_big_graph/delete_all/script b/acceptance/bundle/resource_deps/job_id_big_graph/delete_all/script index 9136c748ee..99978e3e2b 100644 --- a/acceptance/bundle/resource_deps/job_id_big_graph/delete_all/script +++ b/acceptance/bundle/resource_deps/job_id_big_graph/delete_all/script @@ -15,5 +15,5 @@ cp empty.yml databricks.yml trace $CLI bundle plan > out.plan_delete.txt trace $CLI bundle deploy -trace $CLI bundle destroy --auto-approve +destroy-bundle rm -f out.requests.txt diff --git a/acceptance/bundle/resource_deps/job_id_big_graph/destroy/script b/acceptance/bundle/resource_deps/job_id_big_graph/destroy/script index 7e7ec71b1a..0f6c43fc6e 100644 --- a/acceptance/bundle/resource_deps/job_id_big_graph/destroy/script +++ b/acceptance/bundle/resource_deps/job_id_big_graph/destroy/script @@ -10,5 +10,5 @@ replace_ids.py trace $CLI bundle plan > out.plan_sanity.txt title "Destroy all via bundle destroy" -trace $CLI bundle destroy --auto-approve +destroy-bundle rm -f out.requests.txt diff --git a/acceptance/bundle/resource_deps/job_id_delete_bar/script b/acceptance/bundle/resource_deps/job_id_delete_bar/script index 62bdc1e3fe..06a3241782 100644 --- a/acceptance/bundle/resource_deps/job_id_delete_bar/script +++ b/acceptance/bundle/resource_deps/job_id_delete_bar/script @@ -14,5 +14,5 @@ trace $CLI bundle deploy # (foo's dependency on bar was removed in only_foo.yml), so execution order is non-deterministic. trace print_requests.py --sort //jobs > out.deploy2.requests.$DATABRICKS_BUNDLE_ENGINE.json -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests.py //jobs diff --git a/acceptance/bundle/resource_deps/job_id_delete_foo/script b/acceptance/bundle/resource_deps/job_id_delete_foo/script index 89e1d97bd3..fece716c76 100644 --- a/acceptance/bundle/resource_deps/job_id_delete_foo/script +++ b/acceptance/bundle/resource_deps/job_id_delete_foo/script @@ -12,5 +12,5 @@ trace $CLI bundle plan -o json > out.plan_delete.$DATABRICKS_BUNDLE_ENGINE.json trace $CLI bundle deploy trace print_requests.py //jobs -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests.py //jobs diff --git a/acceptance/bundle/resource_deps/jobs_update/script b/acceptance/bundle/resource_deps/jobs_update/script index 3cb808b187..9d60b4dc51 100644 --- a/acceptance/bundle/resource_deps/jobs_update/script +++ b/acceptance/bundle/resource_deps/jobs_update/script @@ -25,7 +25,7 @@ trace $CLI jobs get $foo_id > out.get_foo.$DATABRICKS_BUNDLE_ENGINE.json trace $CLI jobs get $bar_id rm out.requests.txt -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests.py //jobs trace musterr $CLI jobs get $foo_id diff --git a/acceptance/bundle/resource_deps/jobs_update_remote/script b/acceptance/bundle/resource_deps/jobs_update_remote/script index 09572ae04b..7d4ce2812f 100644 --- a/acceptance/bundle/resource_deps/jobs_update_remote/script +++ b/acceptance/bundle/resource_deps/jobs_update_remote/script @@ -15,5 +15,5 @@ trace envsubst < job_update.json > tmp.json && mv tmp.json job_update.json trace $CLI jobs reset --json @job_update.json $CLI bundle plan -o json > out.plan_update.$DATABRICKS_BUNDLE_ENGINE.json -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests.py //jobs diff --git a/acceptance/bundle/resource_deps/pipelines_recreate/script b/acceptance/bundle/resource_deps/pipelines_recreate/script index 1a06b13bc2..0d06b039e1 100644 --- a/acceptance/bundle/resource_deps/pipelines_recreate/script +++ b/acceptance/bundle/resource_deps/pipelines_recreate/script @@ -33,7 +33,7 @@ $CLI bundle plan -o json > out.plan_noop.$DATABRICKS_BUNDLE_ENGINE.json trace $CLI bundle deploy trace print_requests.py //jobs //pipelines -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests.py //jobs //pipelines trace musterr $CLI pipelines get $foo_id diff --git a/acceptance/bundle/resource_deps/remote_app_url/script b/acceptance/bundle/resource_deps/remote_app_url/script index d38692366b..ba4fcbf386 100644 --- a/acceptance/bundle/resource_deps/remote_app_url/script +++ b/acceptance/bundle/resource_deps/remote_app_url/script @@ -5,5 +5,5 @@ trace print_requests.py '^//import-file/' trace $CLI bundle deploy trace print_requests.py '^//import-file/' -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests.py --sort '^//import-file/' diff --git a/acceptance/bundle/resources/alerts/basic/script b/acceptance/bundle/resources/alerts/basic/script index e47c734d1b..196a80126d 100644 --- a/acceptance/bundle/resources/alerts/basic/script +++ b/acceptance/bundle/resources/alerts/basic/script @@ -14,7 +14,7 @@ trace $CLI permissions get alertsv2 $alert_id | jq ".access_control_list.[]" -c title "assert that no permanent drift happens" trace $CLI bundle plan -trace $CLI bundle destroy --auto-approve +destroy-bundle errcode trace $CLI alerts-v2 get-alert $alert_id diff --git a/acceptance/bundle/resources/alerts/with_file/script b/acceptance/bundle/resources/alerts/with_file/script index 02a51e6d2c..ecb8d16983 100755 --- a/acceptance/bundle/resources/alerts/with_file/script +++ b/acceptance/bundle/resources/alerts/with_file/script @@ -2,7 +2,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/apps/config-drift-stopped/script b/acceptance/bundle/resources/apps/config-drift-stopped/script index c449a3099a..16d36aed98 100644 --- a/acceptance/bundle/resources/apps/config-drift-stopped/script +++ b/acceptance/bundle/resources/apps/config-drift-stopped/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/apps/config-drift/script b/acceptance/bundle/resources/apps/config-drift/script index 4728255dc8..ef09702ed7 100644 --- a/acceptance/bundle/resources/apps/config-drift/script +++ b/acceptance/bundle/resources/apps/config-drift/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/apps/inline_config/script b/acceptance/bundle/resources/apps/inline_config/script index 764ab0bc99..d0be6283c6 100755 --- a/acceptance/bundle/resources/apps/inline_config/script +++ b/acceptance/bundle/resources/apps/inline_config/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/apps/lifecycle-started-omitted/script b/acceptance/bundle/resources/apps/lifecycle-started-omitted/script index c836adff58..4addda1b9a 100644 --- a/acceptance/bundle/resources/apps/lifecycle-started-omitted/script +++ b/acceptance/bundle/resources/apps/lifecycle-started-omitted/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/apps/lifecycle-started-toggle/script b/acceptance/bundle/resources/apps/lifecycle-started-toggle/script index 7b5a2c8c32..48d4b790d4 100644 --- a/acceptance/bundle/resources/apps/lifecycle-started-toggle/script +++ b/acceptance/bundle/resources/apps/lifecycle-started-toggle/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/apps/lifecycle-started/script b/acceptance/bundle/resources/apps/lifecycle-started/script index 710dec5a10..63035a4718 100644 --- a/acceptance/bundle/resources/apps/lifecycle-started/script +++ b/acceptance/bundle/resources/apps/lifecycle-started/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/apps/update/script b/acceptance/bundle/resources/apps/update/script index 0d988c0d4a..e5bdd74274 100644 --- a/acceptance/bundle/resources/apps/update/script +++ b/acceptance/bundle/resources/apps/update/script @@ -24,5 +24,5 @@ trace print_requests >> out.requests.$DATABRICKS_BUNDLE_ENGINE.json trace $CLI bundle plan trace $CLI bundle summary -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests >> out.requests.$DATABRICKS_BUNDLE_ENGINE.json diff --git a/acceptance/bundle/resources/catalogs/auto-approve/script b/acceptance/bundle/resources/catalogs/auto-approve/script index 62d2cafa98..421997b0d4 100755 --- a/acceptance/bundle/resources/catalogs/auto-approve/script +++ b/acceptance/bundle/resources/catalogs/auto-approve/script @@ -7,7 +7,7 @@ VOLUME_NAME="test-volume-${UNIQUE_NAME}" cleanup() { title "Test cleanup" - trace $CLI bundle destroy --auto-approve + destroy-bundle title "Assert the catalog is deleted" trace errcode $CLI catalogs get "${CATALOG_NAME}" 2>/dev/null diff --git a/acceptance/bundle/resources/catalogs/basic/script b/acceptance/bundle/resources/catalogs/basic/script index f5d2fd8248..9f8a5e7143 100644 --- a/acceptance/bundle/resources/catalogs/basic/script +++ b/acceptance/bundle/resources/catalogs/basic/script @@ -4,7 +4,7 @@ CATALOG_NAME="test_catalog_${UNIQUE_NAME}" cleanup() { title "Test cleanup" - trace $CLI bundle destroy --auto-approve + destroy-bundle title "Assert the catalog is deleted" trace errcode $CLI catalogs get "${CATALOG_NAME}" 2>/dev/null diff --git a/acceptance/bundle/resources/catalogs/with-schemas/script b/acceptance/bundle/resources/catalogs/with-schemas/script index 039a20fd67..b5a943df04 100644 --- a/acceptance/bundle/resources/catalogs/with-schemas/script +++ b/acceptance/bundle/resources/catalogs/with-schemas/script @@ -5,7 +5,7 @@ SCHEMA_FULL_NAME="${CATALOG_NAME}.schema1" cleanup() { title "Test cleanup" - trace $CLI bundle destroy --auto-approve + destroy-bundle title "Assert schema is deleted" trace errcode $CLI schemas get "${SCHEMA_FULL_NAME}" 2>/dev/null diff --git a/acceptance/bundle/resources/clusters/deploy/data_security_mode/script b/acceptance/bundle/resources/clusters/deploy/data_security_mode/script index 43b1af4911..834c46c82c 100644 --- a/acceptance/bundle/resources/clusters/deploy/data_security_mode/script +++ b/acceptance/bundle/resources/clusters/deploy/data_security_mode/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/clusters/deploy/local_ssd_count/script b/acceptance/bundle/resources/clusters/deploy/local_ssd_count/script index aa76b105bf..1bd368a3ee 100644 --- a/acceptance/bundle/resources/clusters/deploy/local_ssd_count/script +++ b/acceptance/bundle/resources/clusters/deploy/local_ssd_count/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/clusters/deploy/simple/script b/acceptance/bundle/resources/clusters/deploy/simple/script index 12977cedb0..8f47fc0515 100644 --- a/acceptance/bundle/resources/clusters/deploy/simple/script +++ b/acceptance/bundle/resources/clusters/deploy/simple/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/clusters/deploy/update-after-create/script b/acceptance/bundle/resources/clusters/deploy/update-after-create/script index 83f25cd240..d04d5fc800 100644 --- a/acceptance/bundle/resources/clusters/deploy/update-after-create/script +++ b/acceptance/bundle/resources/clusters/deploy/update-after-create/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/clusters/deploy/update-and-resize-autoscale/script b/acceptance/bundle/resources/clusters/deploy/update-and-resize-autoscale/script index 02dcebeb3f..4c056694bb 100755 --- a/acceptance/bundle/resources/clusters/deploy/update-and-resize-autoscale/script +++ b/acceptance/bundle/resources/clusters/deploy/update-and-resize-autoscale/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/clusters/deploy/update-and-resize/script b/acceptance/bundle/resources/clusters/deploy/update-and-resize/script index 7d007495c3..4827bdb4d9 100644 --- a/acceptance/bundle/resources/clusters/deploy/update-and-resize/script +++ b/acceptance/bundle/resources/clusters/deploy/update-and-resize/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/clusters/lifecycle-started-toggle/script b/acceptance/bundle/resources/clusters/lifecycle-started-toggle/script index 27a8e73a3b..d4e4605588 100644 --- a/acceptance/bundle/resources/clusters/lifecycle-started-toggle/script +++ b/acceptance/bundle/resources/clusters/lifecycle-started-toggle/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/clusters/lifecycle-started/script b/acceptance/bundle/resources/clusters/lifecycle-started/script index 871f70407f..c1bcb3fa99 100644 --- a/acceptance/bundle/resources/clusters/lifecycle-started/script +++ b/acceptance/bundle/resources/clusters/lifecycle-started/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/clusters/resize-terminated-fallback/script b/acceptance/bundle/resources/clusters/resize-terminated-fallback/script index eff7c541b9..cc21a8d99a 100644 --- a/acceptance/bundle/resources/clusters/resize-terminated-fallback/script +++ b/acceptance/bundle/resources/clusters/resize-terminated-fallback/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/clusters/run/spark_python_task/script b/acceptance/bundle/resources/clusters/run/spark_python_task/script index 708bfaa821..dc3c6c4977 100644 --- a/acceptance/bundle/resources/clusters/run/spark_python_task/script +++ b/acceptance/bundle/resources/clusters/run/spark_python_task/script @@ -3,7 +3,7 @@ trace cp $TESTDIR/../../deploy/simple/databricks.yml.tmpl . envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/dashboards/change-embed-credentials/script b/acceptance/bundle/resources/dashboards/change-embed-credentials/script index 7504615032..09021493e2 100755 --- a/acceptance/bundle/resources/dashboards/change-embed-credentials/script +++ b/acceptance/bundle/resources/dashboards/change-embed-credentials/script @@ -1,7 +1,7 @@ export EMBED_CREDENTIALS="false" cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/dashboards/change-name/script b/acceptance/bundle/resources/dashboards/change-name/script index f361ed4417..a06ef66c30 100644 --- a/acceptance/bundle/resources/dashboards/change-name/script +++ b/acceptance/bundle/resources/dashboards/change-name/script @@ -1,7 +1,7 @@ export NAME="dashboard1" cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/dashboards/change-parent-path/script b/acceptance/bundle/resources/dashboards/change-parent-path/script index 4440d5f132..2aac16c494 100755 --- a/acceptance/bundle/resources/dashboards/change-parent-path/script +++ b/acceptance/bundle/resources/dashboards/change-parent-path/script @@ -4,7 +4,7 @@ export USERNAME=$($CLI current-user me --output json | jq -r '.userName') export PARENT_PATH=" /Users/$USERNAME/.bundle/change-parent-path-$UNIQUE_NAME/default/resources" cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/dashboards/change-serialized-dashboard/script b/acceptance/bundle/resources/dashboards/change-serialized-dashboard/script index 43327a7ff1..5dd65f4ade 100755 --- a/acceptance/bundle/resources/dashboards/change-serialized-dashboard/script +++ b/acceptance/bundle/resources/dashboards/change-serialized-dashboard/script @@ -1,5 +1,5 @@ cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/dashboards/dataset-catalog-schema/script b/acceptance/bundle/resources/dashboards/dataset-catalog-schema/script index aa3aa4026b..7873a24128 100755 --- a/acceptance/bundle/resources/dashboards/dataset-catalog-schema/script +++ b/acceptance/bundle/resources/dashboards/dataset-catalog-schema/script @@ -9,7 +9,7 @@ export DASHBOARD_DISPLAY_NAME envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/dashboards/delete-trashed-out-of-band/script b/acceptance/bundle/resources/dashboards/delete-trashed-out-of-band/script index 2c1396ac61..5f6f167918 100755 --- a/acceptance/bundle/resources/dashboards/delete-trashed-out-of-band/script +++ b/acceptance/bundle/resources/dashboards/delete-trashed-out-of-band/script @@ -30,4 +30,4 @@ trace $CLI bundle plan -o json > out.plan.$DATABRICKS_BUNDLE_ENGINE.json # Run destroy - should succeed even though dashboard is already trashed. # -qq drops the summary: terraform refreshes the trashed dashboard away and reports # "0 deleted" while direct still counts it as "1 deleted". -trace $CLI bundle destroy --auto-approve -qq +destroy-bundle -qq diff --git a/acceptance/bundle/resources/dashboards/destroy/script b/acceptance/bundle/resources/dashboards/destroy/script index e0419b0507..1cf5e902d9 100755 --- a/acceptance/bundle/resources/dashboards/destroy/script +++ b/acceptance/bundle/resources/dashboards/destroy/script @@ -16,6 +16,6 @@ add_repl "$DASHBOARD_ID" DASHBOARD_ID # Verify dashboard was deployed trace retry $CLI lakeview get $DASHBOARD_ID | jq '{lifecycle_state, parent_path}' -trace $CLI bundle destroy --auto-approve +destroy-bundle trace $CLI lakeview get $DASHBOARD_ID | jq '{lifecycle_state, parent_path}' diff --git a/acceptance/bundle/resources/dashboards/detect-change/script b/acceptance/bundle/resources/dashboards/detect-change/script index 2b4966fd87..5ac4493740 100644 --- a/acceptance/bundle/resources/dashboards/detect-change/script +++ b/acceptance/bundle/resources/dashboards/detect-change/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/dashboards/generate_inplace/script b/acceptance/bundle/resources/dashboards/generate_inplace/script index a8112a752a..f495f3dd1b 100644 --- a/acceptance/bundle/resources/dashboards/generate_inplace/script +++ b/acceptance/bundle/resources/dashboards/generate_inplace/script @@ -5,7 +5,7 @@ mv databricks.yml.subst databricks.yml trace $CLI bundle deploy cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/dashboards/nested-folders/script b/acceptance/bundle/resources/dashboards/nested-folders/script index c5004f3d6a..4cff79c52c 100644 --- a/acceptance/bundle/resources/dashboards/nested-folders/script +++ b/acceptance/bundle/resources/dashboards/nested-folders/script @@ -8,7 +8,7 @@ envsubst < databricks.yml.tmpl > databricks.yml envsubst < resources/dashboards.yml.tmpl > resources/dashboards.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/dashboards/publish-failure-stale-content/script b/acceptance/bundle/resources/dashboards/publish-failure-stale-content/script index 4102246567..469f2c6b1b 100644 --- a/acceptance/bundle/resources/dashboards/publish-failure-stale-content/script +++ b/acceptance/bundle/resources/dashboards/publish-failure-stale-content/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/dashboards/republish-after-draft-update/script b/acceptance/bundle/resources/dashboards/republish-after-draft-update/script index 9cd9a12869..9f5de43209 100644 --- a/acceptance/bundle/resources/dashboards/republish-after-draft-update/script +++ b/acceptance/bundle/resources/dashboards/republish-after-draft-update/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/dashboards/simple/script b/acceptance/bundle/resources/dashboards/simple/script index 4c8b9b55ac..cf1e8a8950 100644 --- a/acceptance/bundle/resources/dashboards/simple/script +++ b/acceptance/bundle/resources/dashboards/simple/script @@ -8,7 +8,7 @@ export DASHBOARD_DISPLAY_NAME envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/dashboards/simple_outside_bundle_root/script b/acceptance/bundle/resources/dashboards/simple_outside_bundle_root/script index 7d4f814f70..0be51c9813 100644 --- a/acceptance/bundle/resources/dashboards/simple_outside_bundle_root/script +++ b/acceptance/bundle/resources/dashboards/simple_outside_bundle_root/script @@ -8,7 +8,7 @@ export DASHBOARD_DISPLAY_NAME envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/dashboards/simple_syncroot/script b/acceptance/bundle/resources/dashboards/simple_syncroot/script index 63cfaa008a..31b8cebabb 100644 --- a/acceptance/bundle/resources/dashboards/simple_syncroot/script +++ b/acceptance/bundle/resources/dashboards/simple_syncroot/script @@ -8,7 +8,7 @@ export DASHBOARD_DISPLAY_NAME envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm sample-dashboard.lvdash.json } trap cleanup EXIT diff --git a/acceptance/bundle/resources/database_catalogs/basic/script b/acceptance/bundle/resources/database_catalogs/basic/script index 705c7b349a..da4e49038f 100644 --- a/acceptance/bundle/resources/database_catalogs/basic/script +++ b/acceptance/bundle/resources/database_catalogs/basic/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/database_catalogs/recreate/script b/acceptance/bundle/resources/database_catalogs/recreate/script index 78243de704..7e974f0f56 100644 --- a/acceptance/bundle/resources/database_catalogs/recreate/script +++ b/acceptance/bundle/resources/database_catalogs/recreate/script @@ -1,5 +1,5 @@ cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/database_instances/recreate/script b/acceptance/bundle/resources/database_instances/recreate/script index e331f9ee6a..63d247c6ca 100644 --- a/acceptance/bundle/resources/database_instances/recreate/script +++ b/acceptance/bundle/resources/database_instances/recreate/script @@ -1,5 +1,5 @@ cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/database_instances/single-instance/script b/acceptance/bundle/resources/database_instances/single-instance/script index 1f3cb82511..99bbedb727 100644 --- a/acceptance/bundle/resources/database_instances/single-instance/script +++ b/acceptance/bundle/resources/database_instances/single-instance/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/experiments/basic/script b/acceptance/bundle/resources/experiments/basic/script index 3513bf00cb..c59a7acfc6 100755 --- a/acceptance/bundle/resources/experiments/basic/script +++ b/acceptance/bundle/resources/experiments/basic/script @@ -1,5 +1,5 @@ cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/external_locations/script b/acceptance/bundle/resources/external_locations/script index 1ff7d02ec4..1fef0ced8f 100755 --- a/acceptance/bundle/resources/external_locations/script +++ b/acceptance/bundle/resources/external_locations/script @@ -7,7 +7,7 @@ EXT_LOCATION_NAME="test_ext_location_${UNIQUE_NAME}" cleanup() { title "Test cleanup" - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/genie_spaces/delete_warning/script b/acceptance/bundle/resources/genie_spaces/delete_warning/script index 1be2558790..f391494a92 100644 --- a/acceptance/bundle/resources/genie_spaces/delete_warning/script +++ b/acceptance/bundle/resources/genie_spaces/delete_warning/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/genie_spaces/inline/script b/acceptance/bundle/resources/genie_spaces/inline/script index 812cfb9abd..e9a0eff756 100644 --- a/acceptance/bundle/resources/genie_spaces/inline/script +++ b/acceptance/bundle/resources/genie_spaces/inline/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/genie_spaces/parent_path_update/script b/acceptance/bundle/resources/genie_spaces/parent_path_update/script index cc7359b67d..802dabc83b 100644 --- a/acceptance/bundle/resources/genie_spaces/parent_path_update/script +++ b/acceptance/bundle/resources/genie_spaces/parent_path_update/script @@ -1,5 +1,5 @@ cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/genie_spaces/recreate_when_gone/script b/acceptance/bundle/resources/genie_spaces/recreate_when_gone/script index 0ccb456f1c..1c96205366 100644 --- a/acceptance/bundle/resources/genie_spaces/recreate_when_gone/script +++ b/acceptance/bundle/resources/genie_spaces/recreate_when_gone/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/genie_spaces/serialized_space/script b/acceptance/bundle/resources/genie_spaces/serialized_space/script index bf5aea4c21..045f4a5b73 100644 --- a/acceptance/bundle/resources/genie_spaces/serialized_space/script +++ b/acceptance/bundle/resources/genie_spaces/serialized_space/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/genie_spaces/simple/script b/acceptance/bundle/resources/genie_spaces/simple/script index 6ad76a8ab2..91df3e80be 100644 --- a/acceptance/bundle/resources/genie_spaces/simple/script +++ b/acceptance/bundle/resources/genie_spaces/simple/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/genie_spaces/version_migration/script b/acceptance/bundle/resources/genie_spaces/version_migration/script index 141efd5bef..db669cc8fe 100644 --- a/acceptance/bundle/resources/genie_spaces/version_migration/script +++ b/acceptance/bundle/resources/genie_spaces/version_migration/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/grants/catalogs/script b/acceptance/bundle/resources/grants/catalogs/script index 067710b705..57d7e0e45c 100755 --- a/acceptance/bundle/resources/grants/catalogs/script +++ b/acceptance/bundle/resources/grants/catalogs/script @@ -20,5 +20,5 @@ trace print_requests.py //permissions > out.deploy2.requests.$DATABRICKS_BUNDLE_ trace $CLI grants get catalog catalog_grants_$UNIQUE_NAME | jq --sort-keys -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests.py //permissions > out.destroy.requests.$DATABRICKS_BUNDLE_ENGINE.json diff --git a/acceptance/bundle/resources/grants/registered_models/script b/acceptance/bundle/resources/grants/registered_models/script index 98d73773af..18dab27b7d 100644 --- a/acceptance/bundle/resources/grants/registered_models/script +++ b/acceptance/bundle/resources/grants/registered_models/script @@ -8,5 +8,5 @@ trace print_requests.py //permissions > out.deploy1.requests.$DATABRICKS_BUNDLE_ # Since we're sending different requests between terraform and direct, assert that the end result is the same: trace $CLI grants get function main.myschema_$UNIQUE_NAME.mymodel | jq --sort-keys -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests.py //permissions > out.destroy.requests.$DATABRICKS_BUNDLE_ENGINE.json diff --git a/acceptance/bundle/resources/grants/schemas/all_privileges/script b/acceptance/bundle/resources/grants/schemas/all_privileges/script index e8f6e243dd..fd7d783799 100644 --- a/acceptance/bundle/resources/grants/schemas/all_privileges/script +++ b/acceptance/bundle/resources/grants/schemas/all_privileges/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/grants/schemas/change_privilege/script b/acceptance/bundle/resources/grants/schemas/change_privilege/script index 737f7491d3..1065d57274 100644 --- a/acceptance/bundle/resources/grants/schemas/change_privilege/script +++ b/acceptance/bundle/resources/grants/schemas/change_privilege/script @@ -20,5 +20,5 @@ trace print_requests.py //permissions > out.deploy2.requests.$DATABRICKS_BUNDLE_ trace $CLI grants get schema main.schema_grants_$UNIQUE_NAME | jq --sort-keys -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests.py //permissions > out.destroy.requests.$DATABRICKS_BUNDLE_ENGINE.json diff --git a/acceptance/bundle/resources/grants/schemas/duplicate_principals/script b/acceptance/bundle/resources/grants/schemas/duplicate_principals/script index 12a255773b..a7c7168cab 100644 --- a/acceptance/bundle/resources/grants/schemas/duplicate_principals/script +++ b/acceptance/bundle/resources/grants/schemas/duplicate_principals/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/grants/schemas/duplicate_privileges/script b/acceptance/bundle/resources/grants/schemas/duplicate_privileges/script index b1244a4c78..983f8301f3 100644 --- a/acceptance/bundle/resources/grants/schemas/duplicate_privileges/script +++ b/acceptance/bundle/resources/grants/schemas/duplicate_privileges/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/grants/volumes/script b/acceptance/bundle/resources/grants/volumes/script index 725049cda8..49cbcc2523 100644 --- a/acceptance/bundle/resources/grants/volumes/script +++ b/acceptance/bundle/resources/grants/volumes/script @@ -16,5 +16,5 @@ trace print_requests.py //permissions > out.deploy2.requests.$DATABRICKS_BUNDLE_ trace $CLI grants get volume main.schema_grants_$UNIQUE_NAME.volume_name | jq --sort-keys -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests.py //permissions > out.destroy.requests.$DATABRICKS_BUNDLE_ENGINE.json diff --git a/acceptance/bundle/resources/instance_pools/script b/acceptance/bundle/resources/instance_pools/script index 208a61abc1..5cc0b366a4 100644 --- a/acceptance/bundle/resources/instance_pools/script +++ b/acceptance/bundle/resources/instance_pools/script @@ -25,7 +25,7 @@ trace jq 'select(.method == "POST" and (.path | contains("/instance-pools/edit") trace $CLI bundle summary title "Destroy the instance pool" -trace $CLI bundle destroy --auto-approve +destroy-bundle title "Verify the destroy request" trace jq 'select(.method == "POST" and (.path | contains("/instance-pools/delete")))' out.requests.txt diff --git a/acceptance/bundle/resources/job_runs/basic/script b/acceptance/bundle/resources/job_runs/basic/script index 1c69eb547b..fb26354957 100644 --- a/acceptance/bundle/resources/job_runs/basic/script +++ b/acceptance/bundle/resources/job_runs/basic/script @@ -1,5 +1,5 @@ cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle # destroy deletes the triggered run via jobs/runs/delete (also unlinks out.requests.txt) trace print_requests.py //jobs/runs/delete } diff --git a/acceptance/bundle/resources/job_runs/failed_run/script b/acceptance/bundle/resources/job_runs/failed_run/script index 0fe2455618..03732bc25a 100644 --- a/acceptance/bundle/resources/job_runs/failed_run/script +++ b/acceptance/bundle/resources/job_runs/failed_run/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/job_runs/interrupted_run/script b/acceptance/bundle/resources/job_runs/interrupted_run/script index 11ef0aa184..e9df592661 100644 --- a/acceptance/bundle/resources/job_runs/interrupted_run/script +++ b/acceptance/bundle/resources/job_runs/interrupted_run/script @@ -1,5 +1,5 @@ cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/job_runs/job_parameters/script b/acceptance/bundle/resources/job_runs/job_parameters/script index 16eedf5d7d..6ba551d07f 100644 --- a/acceptance/bundle/resources/job_runs/job_parameters/script +++ b/acceptance/bundle/resources/job_runs/job_parameters/script @@ -1,5 +1,5 @@ cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/job_runs/on_bundle_deploy/script b/acceptance/bundle/resources/job_runs/on_bundle_deploy/script index e24cf944cd..fc5bed539f 100644 --- a/acceptance/bundle/resources/job_runs/on_bundle_deploy/script +++ b/acceptance/bundle/resources/job_runs/on_bundle_deploy/script @@ -1,5 +1,5 @@ cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/job_runs/redeploy/script b/acceptance/bundle/resources/job_runs/redeploy/script index 8ceb3a8805..9482845800 100644 --- a/acceptance/bundle/resources/job_runs/redeploy/script +++ b/acceptance/bundle/resources/job_runs/redeploy/script @@ -1,5 +1,5 @@ cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/job_runs/retried_run_now/script b/acceptance/bundle/resources/job_runs/retried_run_now/script index 0d69e76df6..7efd3144ca 100644 --- a/acceptance/bundle/resources/job_runs/retried_run_now/script +++ b/acceptance/bundle/resources/job_runs/retried_run_now/script @@ -1,5 +1,5 @@ cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/job_runs/wait/script b/acceptance/bundle/resources/job_runs/wait/script index 70cee1c908..19ea4aaaf6 100644 --- a/acceptance/bundle/resources/job_runs/wait/script +++ b/acceptance/bundle/resources/job_runs/wait/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/jobs/alert-task/script b/acceptance/bundle/resources/jobs/alert-task/script index 1dcc1d37a0..73e10b8a44 100644 --- a/acceptance/bundle/resources/jobs/alert-task/script +++ b/acceptance/bundle/resources/jobs/alert-task/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/jobs/big_id/script b/acceptance/bundle/resources/jobs/big_id/script index 0b803cb1b8..444c1c0489 100644 --- a/acceptance/bundle/resources/jobs/big_id/script +++ b/acceptance/bundle/resources/jobs/big_id/script @@ -4,5 +4,5 @@ $CLI bundle deploy $(readplanarg out.plan.direct.json) trace print_requests.py //jobs print_state.py > out.state.$DATABRICKS_BUNDLE_ENGINE.json trace $CLI bundle plan | contains.py '0 to add, 0 to change, 0 to delete' -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests.py //jobs diff --git a/acceptance/bundle/resources/jobs/check-metadata/script b/acceptance/bundle/resources/jobs/check-metadata/script index a486009c74..05442578b6 100644 --- a/acceptance/bundle/resources/jobs/check-metadata/script +++ b/acceptance/bundle/resources/jobs/check-metadata/script @@ -2,7 +2,7 @@ envsubst < databricks.yml.tmpl > databricks.yml envsubst < a/b/resources.yml.tmpl > a/b/resources.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/jobs/double-underscore-keys/script b/acceptance/bundle/resources/jobs/double-underscore-keys/script index e3d101db85..64b2d2391b 100644 --- a/acceptance/bundle/resources/jobs/double-underscore-keys/script +++ b/acceptance/bundle/resources/jobs/double-underscore-keys/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/jobs/fail-on-active-runs/script b/acceptance/bundle/resources/jobs/fail-on-active-runs/script index 688f81d80b..42aa8cad84 100644 --- a/acceptance/bundle/resources/jobs/fail-on-active-runs/script +++ b/acceptance/bundle/resources/jobs/fail-on-active-runs/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/jobs/shared-root-path/script b/acceptance/bundle/resources/jobs/shared-root-path/script index 4e3e46c930..cb42e7425b 100644 --- a/acceptance/bundle/resources/jobs/shared-root-path/script +++ b/acceptance/bundle/resources/jobs/shared-root-path/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/jobs/update/script b/acceptance/bundle/resources/jobs/update/script index 270efcaea6..93717a42b6 100644 --- a/acceptance/bundle/resources/jobs/update/script +++ b/acceptance/bundle/resources/jobs/update/script @@ -29,7 +29,7 @@ trace $CLI jobs get $ppid | jq 'del(.settings.run_as)' rm out.requests.txt title "Destroy the job and verify that it's removed from the state and from remote" -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests.py //jobs trace musterr $CLI jobs get $ppid diff --git a/acceptance/bundle/resources/jobs/update_single_node/script b/acceptance/bundle/resources/jobs/update_single_node/script index 9e84f677e7..b3d7b98306 100644 --- a/acceptance/bundle/resources/jobs/update_single_node/script +++ b/acceptance/bundle/resources/jobs/update_single_node/script @@ -23,7 +23,7 @@ trace $CLI jobs get $ppid | jq 'del(.settings.run_as)' rm out.requests.txt title "Destroy the job and verify that it's removed from the state and from remote" -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests.py //jobs trace musterr $CLI jobs get $ppid diff --git a/acceptance/bundle/resources/model_serving_endpoints/basic/script b/acceptance/bundle/resources/model_serving_endpoints/basic/script index 972439f681..4ca7ab63ba 100755 --- a/acceptance/bundle/resources/model_serving_endpoints/basic/script +++ b/acceptance/bundle/resources/model_serving_endpoints/basic/script @@ -3,7 +3,7 @@ export ENDPOINT_NAME="test-endpoint-$UNIQUE_NAME-1" envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/model_serving_endpoints/drift/recreated_same_name/script b/acceptance/bundle/resources/model_serving_endpoints/drift/recreated_same_name/script index 3f26d4a073..341ccf4c9c 100644 --- a/acceptance/bundle/resources/model_serving_endpoints/drift/recreated_same_name/script +++ b/acceptance/bundle/resources/model_serving_endpoints/drift/recreated_same_name/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/model_serving_endpoints/recreate/catalog-name/script b/acceptance/bundle/resources/model_serving_endpoints/recreate/catalog-name/script index 919470c4ca..474b4abd61 100755 --- a/acceptance/bundle/resources/model_serving_endpoints/recreate/catalog-name/script +++ b/acceptance/bundle/resources/model_serving_endpoints/recreate/catalog-name/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/model_serving_endpoints/recreate/name-change/script b/acceptance/bundle/resources/model_serving_endpoints/recreate/name-change/script index d48a60c0ac..bd8e458a21 100755 --- a/acceptance/bundle/resources/model_serving_endpoints/recreate/name-change/script +++ b/acceptance/bundle/resources/model_serving_endpoints/recreate/name-change/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/model_serving_endpoints/recreate/route-optimized/script b/acceptance/bundle/resources/model_serving_endpoints/recreate/route-optimized/script index 0b68be7c35..fec7f91a7b 100755 --- a/acceptance/bundle/resources/model_serving_endpoints/recreate/route-optimized/script +++ b/acceptance/bundle/resources/model_serving_endpoints/recreate/route-optimized/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/model_serving_endpoints/recreate/schema-name/script b/acceptance/bundle/resources/model_serving_endpoints/recreate/schema-name/script index 0e31f7a484..b974e69dd0 100755 --- a/acceptance/bundle/resources/model_serving_endpoints/recreate/schema-name/script +++ b/acceptance/bundle/resources/model_serving_endpoints/recreate/schema-name/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/model_serving_endpoints/recreate/table-prefix/script b/acceptance/bundle/resources/model_serving_endpoints/recreate/table-prefix/script index 7f915920ba..809f753e78 100755 --- a/acceptance/bundle/resources/model_serving_endpoints/recreate/table-prefix/script +++ b/acceptance/bundle/resources/model_serving_endpoints/recreate/table-prefix/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/model_serving_endpoints/running-endpoint/script b/acceptance/bundle/resources/model_serving_endpoints/running-endpoint/script index 8b420559c3..91ac6bf555 100644 --- a/acceptance/bundle/resources/model_serving_endpoints/running-endpoint/script +++ b/acceptance/bundle/resources/model_serving_endpoints/running-endpoint/script @@ -3,7 +3,7 @@ export VERSION=$($CLI model-versions list system.ai.llama_v3_2_1b_instruct | jq envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/model_serving_endpoints/update/ai-gateway/script b/acceptance/bundle/resources/model_serving_endpoints/update/ai-gateway/script index 6e556d2b1a..3f0b2ee672 100755 --- a/acceptance/bundle/resources/model_serving_endpoints/update/ai-gateway/script +++ b/acceptance/bundle/resources/model_serving_endpoints/update/ai-gateway/script @@ -2,7 +2,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/model_serving_endpoints/update/both_gateway_and_tags/script b/acceptance/bundle/resources/model_serving_endpoints/update/both_gateway_and_tags/script index 763379ad9a..1ab098a08c 100755 --- a/acceptance/bundle/resources/model_serving_endpoints/update/both_gateway_and_tags/script +++ b/acceptance/bundle/resources/model_serving_endpoints/update/both_gateway_and_tags/script @@ -2,7 +2,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/model_serving_endpoints/update/config/script b/acceptance/bundle/resources/model_serving_endpoints/update/config/script index 3a28d1dcda..b11f32466d 100755 --- a/acceptance/bundle/resources/model_serving_endpoints/update/config/script +++ b/acceptance/bundle/resources/model_serving_endpoints/update/config/script @@ -2,7 +2,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/model_serving_endpoints/update/email-notifications/script b/acceptance/bundle/resources/model_serving_endpoints/update/email-notifications/script index 391d369d68..cc6d2199d1 100755 --- a/acceptance/bundle/resources/model_serving_endpoints/update/email-notifications/script +++ b/acceptance/bundle/resources/model_serving_endpoints/update/email-notifications/script @@ -2,7 +2,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/model_serving_endpoints/update/tags/script b/acceptance/bundle/resources/model_serving_endpoints/update/tags/script index 6f69dc2f06..693e7eae4a 100755 --- a/acceptance/bundle/resources/model_serving_endpoints/update/tags/script +++ b/acceptance/bundle/resources/model_serving_endpoints/update/tags/script @@ -2,7 +2,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/models/basic/script b/acceptance/bundle/resources/models/basic/script index f14cc0a226..3d17c47901 100644 --- a/acceptance/bundle/resources/models/basic/script +++ b/acceptance/bundle/resources/models/basic/script @@ -1,5 +1,5 @@ cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/models/readplan-permissions/script b/acceptance/bundle/resources/models/readplan-permissions/script index f8be26409e..5c9d22d790 100644 --- a/acceptance/bundle/resources/models/readplan-permissions/script +++ b/acceptance/bundle/resources/models/readplan-permissions/script @@ -1,5 +1,5 @@ cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/permissions/dashboards/create/script b/acceptance/bundle/resources/permissions/dashboards/create/script index 41f26f6360..44cf0c20f4 100644 --- a/acceptance/bundle/resources/permissions/dashboards/create/script +++ b/acceptance/bundle/resources/permissions/dashboards/create/script @@ -17,5 +17,5 @@ replace_ids.py print_requests.py //permissions > out.requests.deploy.$DATABRICKS_BUNDLE_ENGINE.json -trace $CLI bundle destroy --auto-approve +destroy-bundle print_requests.py //permissions > out.requests.destroy.$DATABRICKS_BUNDLE_ENGINE.json diff --git a/acceptance/bundle/resources/permissions/factcheck/script b/acceptance/bundle/resources/permissions/factcheck/script index cbddce5808..41b47da668 100644 --- a/acceptance/bundle/resources/permissions/factcheck/script +++ b/acceptance/bundle/resources/permissions/factcheck/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/permissions/genie_spaces/current_can_manage/script b/acceptance/bundle/resources/permissions/genie_spaces/current_can_manage/script index ae805caebb..ddcdc99dcd 100644 --- a/acceptance/bundle/resources/permissions/genie_spaces/current_can_manage/script +++ b/acceptance/bundle/resources/permissions/genie_spaces/current_can_manage/script @@ -9,5 +9,5 @@ trace $CLI bundle deploy replace_ids.py print_requests.py //permissions > out.requests.deploy.$DATABRICKS_BUNDLE_ENGINE.json -trace $CLI bundle destroy --auto-approve +destroy-bundle print_requests.py //permissions > out.requests.destroy.$DATABRICKS_BUNDLE_ENGINE.json diff --git a/acceptance/bundle/resources/permissions/genie_spaces/out_of_band_deletion/script b/acceptance/bundle/resources/permissions/genie_spaces/out_of_band_deletion/script index 30130e7588..c2c56400f9 100644 --- a/acceptance/bundle/resources/permissions/genie_spaces/out_of_band_deletion/script +++ b/acceptance/bundle/resources/permissions/genie_spaces/out_of_band_deletion/script @@ -1,5 +1,5 @@ cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/permissions/jobs/update/script b/acceptance/bundle/resources/permissions/jobs/update/script index 38ac1a5b62..54ae5403c9 100644 --- a/acceptance/bundle/resources/permissions/jobs/update/script +++ b/acceptance/bundle/resources/permissions/jobs/update/script @@ -48,6 +48,6 @@ trace $CLI bundle plan -o json > out.plan_set_empty.$DATABRICKS_BUNDLE_ENGINE.js trace $CLI bundle deploy trace print_requests.py //jobs/ > out.requests_set_empty.$DATABRICKS_BUNDLE_ENGINE.json -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests.py //jobs/ > out.requests_destroy.$DATABRICKS_BUNDLE_ENGINE.json #rm -fr .databricks diff --git a/acceptance/bundle/resources/permissions/models/current_can_manage/script b/acceptance/bundle/resources/permissions/models/current_can_manage/script index 0ade9d8934..3929fa0107 100644 --- a/acceptance/bundle/resources/permissions/models/current_can_manage/script +++ b/acceptance/bundle/resources/permissions/models/current_can_manage/script @@ -13,5 +13,5 @@ add_repl "$MODEL_ID" "FOO_MODEL_ID" print_requests.py //permissions > out.requests.deploy.$DATABRICKS_BUNDLE_ENGINE.json -trace $CLI bundle destroy --auto-approve +destroy-bundle print_requests.py //permissions > out.requests.destroy.$DATABRICKS_BUNDLE_ENGINE.json diff --git a/acceptance/bundle/resources/permissions/pipelines/update/script b/acceptance/bundle/resources/permissions/pipelines/update/script index 3fc2edd239..19d638e762 100644 --- a/acceptance/bundle/resources/permissions/pipelines/update/script +++ b/acceptance/bundle/resources/permissions/pipelines/update/script @@ -38,5 +38,5 @@ trace $CLI bundle deploy trace print_requests.py //pipeline > out.requests_restore_original.json trace $CLI bundle plan -trace $CLI bundle destroy --auto-approve +destroy-bundle print_requests.py //pipeline > out.requests_destroy.json diff --git a/acceptance/bundle/resources/permissions/target_permissions/script b/acceptance/bundle/resources/permissions/target_permissions/script index 1a07dad637..1c7a8261a4 100644 --- a/acceptance/bundle/resources/permissions/target_permissions/script +++ b/acceptance/bundle/resources/permissions/target_permissions/script @@ -3,5 +3,5 @@ $CLI bundle plan -o json > out.plan.$DATABRICKS_BUNDLE_ENGINE.json trace $CLI bundle deploy print_requests.py //jobs/ > out.requests_create.$DATABRICKS_BUNDLE_ENGINE.json -trace $CLI bundle destroy --auto-approve +destroy-bundle print_requests.py //jobs/ > out.requests_delete.$DATABRICKS_BUNDLE_ENGINE.json diff --git a/acceptance/bundle/resources/pipelines/allow-duplicate-names/script b/acceptance/bundle/resources/pipelines/allow-duplicate-names/script index d121e073a3..585343a554 100644 --- a/acceptance/bundle/resources/pipelines/allow-duplicate-names/script +++ b/acceptance/bundle/resources/pipelines/allow-duplicate-names/script @@ -3,7 +3,7 @@ envsubst < pipeline.json.tmpl > pipeline.json touch foo.py cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle trace $CLI pipelines delete ${PIPELINE_ID} rm out.requests.txt } diff --git a/acceptance/bundle/resources/pipelines/auto-approve/script b/acceptance/bundle/resources/pipelines/auto-approve/script index 7c68356ea7..59a0464fb6 100644 --- a/acceptance/bundle/resources/pipelines/auto-approve/script +++ b/acceptance/bundle/resources/pipelines/auto-approve/script @@ -2,7 +2,7 @@ envsubst < databricks.yml.tmpl > databricks.yml envsubst < resources.yml.tmpl > resources.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/pipelines/lakeflow-pipeline/script b/acceptance/bundle/resources/pipelines/lakeflow-pipeline/script index d380b57c97..269eadd601 100644 --- a/acceptance/bundle/resources/pipelines/lakeflow-pipeline/script +++ b/acceptance/bundle/resources/pipelines/lakeflow-pipeline/script @@ -2,7 +2,7 @@ envsubst < databricks.yml.tmpl > databricks.yml trace $CLI bundle validate cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/pipelines/recreate/script b/acceptance/bundle/resources/pipelines/recreate/script index 08423e1d32..6e6b8c51bc 100644 --- a/acceptance/bundle/resources/pipelines/recreate/script +++ b/acceptance/bundle/resources/pipelines/recreate/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/pipelines/update/script b/acceptance/bundle/resources/pipelines/update/script index 255dea2e00..bd3c2e9cf1 100644 --- a/acceptance/bundle/resources/pipelines/update/script +++ b/acceptance/bundle/resources/pipelines/update/script @@ -25,7 +25,7 @@ trace $CLI pipelines get $ppid rm out.requests.txt title "Destroy the pipeline and verify that it's removed from the state and from remote" -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests trace musterr $CLI pipelines get $ppid diff --git a/acceptance/bundle/resources/postgres_branches/basic/script b/acceptance/bundle/resources/postgres_branches/basic/script index 56af9987f8..ab148f5f2a 100644 --- a/acceptance/bundle/resources/postgres_branches/basic/script +++ b/acceptance/bundle/resources/postgres_branches/basic/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/postgres_branches/recreate/script b/acceptance/bundle/resources/postgres_branches/recreate/script index 6219513017..0bf4810590 100755 --- a/acceptance/bundle/resources/postgres_branches/recreate/script +++ b/acceptance/bundle/resources/postgres_branches/recreate/script @@ -41,7 +41,7 @@ branch_id_2=`read_id.py main` $CLI postgres get-branch $branch_id_2 | branch_fields > out.get_branch.txt title "Destroy and verify cleanup" -trace $CLI bundle destroy --auto-approve +destroy-bundle print_requests.py --del-body parent,project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id '//postgres' '^//workspace-files/' '^//workspace/' '^//telemetry-ext' '^//operations/' > out.requests.destroy.txt diff --git a/acceptance/bundle/resources/postgres_branches/update_protected/script b/acceptance/bundle/resources/postgres_branches/update_protected/script index 28d21b69ec..412c36e13b 100755 --- a/acceptance/bundle/resources/postgres_branches/update_protected/script +++ b/acceptance/bundle/resources/postgres_branches/update_protected/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/postgres_catalogs/basic/script b/acceptance/bundle/resources/postgres_catalogs/basic/script index 48f5485570..df87fbfba9 100644 --- a/acceptance/bundle/resources/postgres_catalogs/basic/script +++ b/acceptance/bundle/resources/postgres_catalogs/basic/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/postgres_catalogs/recreate/script b/acceptance/bundle/resources/postgres_catalogs/recreate/script index 4d9de78429..5f198d1f56 100644 --- a/acceptance/bundle/resources/postgres_catalogs/recreate/script +++ b/acceptance/bundle/resources/postgres_catalogs/recreate/script @@ -1,5 +1,5 @@ cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/postgres_databases/basic/script b/acceptance/bundle/resources/postgres_databases/basic/script index 0fed53dfcf..5abb2d9507 100644 --- a/acceptance/bundle/resources/postgres_databases/basic/script +++ b/acceptance/bundle/resources/postgres_databases/basic/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/postgres_databases/live_errors/bad_database_id/script b/acceptance/bundle/resources/postgres_databases/live_errors/bad_database_id/script index 7315f6f5d3..3b6f9e61fc 100644 --- a/acceptance/bundle/resources/postgres_databases/live_errors/bad_database_id/script +++ b/acceptance/bundle/resources/postgres_databases/live_errors/bad_database_id/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/postgres_databases/live_errors/bad_role_ref/script b/acceptance/bundle/resources/postgres_databases/live_errors/bad_role_ref/script index 0d040869c1..5909dbbecf 100644 --- a/acceptance/bundle/resources/postgres_databases/live_errors/bad_role_ref/script +++ b/acceptance/bundle/resources/postgres_databases/live_errors/bad_role_ref/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/postgres_databases/recreate/script b/acceptance/bundle/resources/postgres_databases/recreate/script index 578e6df92b..c07e939ae6 100644 --- a/acceptance/bundle/resources/postgres_databases/recreate/script +++ b/acceptance/bundle/resources/postgres_databases/recreate/script @@ -44,6 +44,6 @@ database_id_2=`read_id.py my_database` trace $CLI postgres get-database $database_id_2 | database_fields title "Destroy and verify cleanup" -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests.py --unique --del-body parent,project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id '//postgres' '^//workspace-files/' '^//workspace/' '^//telemetry-ext' '^//operations/' diff --git a/acceptance/bundle/resources/postgres_databases/replace_existing/script b/acceptance/bundle/resources/postgres_databases/replace_existing/script index 65db8cd6ae..a53a59b7b0 100644 --- a/acceptance/bundle/resources/postgres_databases/replace_existing/script +++ b/acceptance/bundle/resources/postgres_databases/replace_existing/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/postgres_databases/update/script b/acceptance/bundle/resources/postgres_databases/update/script index e23fea3bba..664ee5de14 100644 --- a/acceptance/bundle/resources/postgres_databases/update/script +++ b/acceptance/bundle/resources/postgres_databases/update/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/postgres_endpoints/basic/script b/acceptance/bundle/resources/postgres_endpoints/basic/script index 7a2be07d9f..702676c477 100755 --- a/acceptance/bundle/resources/postgres_endpoints/basic/script +++ b/acceptance/bundle/resources/postgres_endpoints/basic/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/postgres_endpoints/recreate/script b/acceptance/bundle/resources/postgres_endpoints/recreate/script index 6d4e7d62e1..071ab8c03b 100755 --- a/acceptance/bundle/resources/postgres_endpoints/recreate/script +++ b/acceptance/bundle/resources/postgres_endpoints/recreate/script @@ -40,6 +40,6 @@ endpoint_id_2=`read_id.py my_endpoint` trace $CLI postgres get-endpoint $endpoint_id_2 | jq 'del(.create_time, .update_time)' | jq '.status.endpoint_type' title "Destroy and verify cleanup" -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests.py --unique --del-body parent,project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id '//postgres' '^//workspace-files/' '^//workspace/' '^//telemetry-ext' '^//operations/' diff --git a/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/script b/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/script index 1df081df0a..243e46522b 100755 --- a/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/script +++ b/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/postgres_projects/basic/script b/acceptance/bundle/resources/postgres_projects/basic/script index f2ac6abbcf..12a9df3081 100755 --- a/acceptance/bundle/resources/postgres_projects/basic/script +++ b/acceptance/bundle/resources/postgres_projects/basic/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/postgres_projects/recreate/script b/acceptance/bundle/resources/postgres_projects/recreate/script index 7ed7fdd0f2..8855fc8c04 100644 --- a/acceptance/bundle/resources/postgres_projects/recreate/script +++ b/acceptance/bundle/resources/postgres_projects/recreate/script @@ -41,7 +41,7 @@ project_id_2=`read_id.py my_project` $CLI postgres get-project $project_id_2 | project_fields > out.get_project.txt title "Destroy and verify cleanup" -trace $CLI bundle destroy --auto-approve +destroy-bundle print_requests.py --del-body parent,project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id '//postgres' '^//workspace-files/' '^//workspace/' '^//telemetry-ext' '^//operations/' > out.requests.destroy.txt diff --git a/acceptance/bundle/resources/postgres_projects/update_display_name/script b/acceptance/bundle/resources/postgres_projects/update_display_name/script index 5c6ac02445..e77fcadd05 100755 --- a/acceptance/bundle/resources/postgres_projects/update_display_name/script +++ b/acceptance/bundle/resources/postgres_projects/update_display_name/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/postgres_roles/basic/script b/acceptance/bundle/resources/postgres_roles/basic/script index d5e3f421cd..e5a78c32fa 100644 --- a/acceptance/bundle/resources/postgres_roles/basic/script +++ b/acceptance/bundle/resources/postgres_roles/basic/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/postgres_roles/inherited-role-bind/script b/acceptance/bundle/resources/postgres_roles/inherited-role-bind/script index d98aed3e27..8f19b9f519 100644 --- a/acceptance/bundle/resources/postgres_roles/inherited-role-bind/script +++ b/acceptance/bundle/resources/postgres_roles/inherited-role-bind/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/postgres_roles/inherited-role-conflict/script b/acceptance/bundle/resources/postgres_roles/inherited-role-conflict/script index 0999984022..e31f6be848 100644 --- a/acceptance/bundle/resources/postgres_roles/inherited-role-conflict/script +++ b/acceptance/bundle/resources/postgres_roles/inherited-role-conflict/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/postgres_roles/recreate-postgres-role/script b/acceptance/bundle/resources/postgres_roles/recreate-postgres-role/script index 18041234f7..558aeb9d6c 100644 --- a/acceptance/bundle/resources/postgres_roles/recreate-postgres-role/script +++ b/acceptance/bundle/resources/postgres_roles/recreate-postgres-role/script @@ -35,6 +35,6 @@ role_name=`read_id.py my_role` trace $CLI postgres get-role $role_name | role_fields title "Destroy and verify cleanup" -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests.py --unique --del-body parent,project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id '//postgres' '^//workspace-files/' '^//workspace/' '^//telemetry-ext' '^//operations/' diff --git a/acceptance/bundle/resources/postgres_roles/recreate/script b/acceptance/bundle/resources/postgres_roles/recreate/script index 922b5abaa1..2a49c14244 100644 --- a/acceptance/bundle/resources/postgres_roles/recreate/script +++ b/acceptance/bundle/resources/postgres_roles/recreate/script @@ -37,6 +37,6 @@ role_id_2=`read_id.py my_role` trace $CLI postgres get-role $role_id_2 | role_fields title "Destroy and verify cleanup" -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests.py --unique --del-body parent,project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id '//postgres' '^//workspace-files/' '^//workspace/' '^//telemetry-ext' '^//operations/' diff --git a/acceptance/bundle/resources/postgres_roles/replace_existing/script b/acceptance/bundle/resources/postgres_roles/replace_existing/script index b7a64f0cc4..11a5239c0a 100644 --- a/acceptance/bundle/resources/postgres_roles/replace_existing/script +++ b/acceptance/bundle/resources/postgres_roles/replace_existing/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/postgres_roles/update/script b/acceptance/bundle/resources/postgres_roles/update/script index 6c727a3453..4425cbf128 100644 --- a/acceptance/bundle/resources/postgres_roles/update/script +++ b/acceptance/bundle/resources/postgres_roles/update/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/postgres_synced_tables/basic/script b/acceptance/bundle/resources/postgres_synced_tables/basic/script index 68b04d8330..b0af09931b 100644 --- a/acceptance/bundle/resources/postgres_synced_tables/basic/script +++ b/acceptance/bundle/resources/postgres_synced_tables/basic/script @@ -12,7 +12,7 @@ MSYS_NO_PATHCONV=1 $CLI api post "/api/2.0/sql/statements/" --json "{ }" > /dev/null cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle echo "Cleaning up temporary source table" $CLI tables delete main.source_$UNIQUE_NAME.trips_source || true $CLI schemas delete main.source_$UNIQUE_NAME || true diff --git a/acceptance/bundle/resources/postgres_synced_tables/recreate/script b/acceptance/bundle/resources/postgres_synced_tables/recreate/script index de437c0c15..b34dd87fc6 100644 --- a/acceptance/bundle/resources/postgres_synced_tables/recreate/script +++ b/acceptance/bundle/resources/postgres_synced_tables/recreate/script @@ -8,7 +8,7 @@ MSYS_NO_PATHCONV=1 $CLI api post "/api/2.0/sql/statements/" --json "{ }" > /dev/null cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle echo "Cleaning up temporary source table" $CLI tables delete main.source_$UNIQUE_NAME.trips_source || true $CLI schemas delete main.source_$UNIQUE_NAME || true diff --git a/acceptance/bundle/resources/quality_monitors/change_assets_dir/script b/acceptance/bundle/resources/quality_monitors/change_assets_dir/script index 6caf49a7f4..f6f5ba71cf 100644 --- a/acceptance/bundle/resources/quality_monitors/change_assets_dir/script +++ b/acceptance/bundle/resources/quality_monitors/change_assets_dir/script @@ -6,7 +6,7 @@ trace $CLI schemas create "qm_test_${UNIQUE_NAME}_2" main -o json | jq '{full_na trace create_table.py "$TABLE_NAME" cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle $CLI schemas delete "$SCHEMA_NAME" --force 2>/dev/null || true $CLI schemas delete "qm_test_${UNIQUE_NAME}_2" --force 2>/dev/null || true rm -f out.requests.txt diff --git a/acceptance/bundle/resources/quality_monitors/change_output_schema_name/script b/acceptance/bundle/resources/quality_monitors/change_output_schema_name/script index 72c57e0840..a629738265 100644 --- a/acceptance/bundle/resources/quality_monitors/change_output_schema_name/script +++ b/acceptance/bundle/resources/quality_monitors/change_output_schema_name/script @@ -6,7 +6,7 @@ trace $CLI schemas create "qm_test_${UNIQUE_NAME}_2" main -o json | jq '{full_na trace create_table.py "$TABLE_NAME" cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle $CLI schemas delete "$SCHEMA_NAME" --force 2>/dev/null || true $CLI schemas delete "qm_test_${UNIQUE_NAME}_2" --force 2>/dev/null || true rm -f out.requests.txt diff --git a/acceptance/bundle/resources/quality_monitors/change_table_name/script b/acceptance/bundle/resources/quality_monitors/change_table_name/script index 891aece1c1..54d0e2af3d 100644 --- a/acceptance/bundle/resources/quality_monitors/change_table_name/script +++ b/acceptance/bundle/resources/quality_monitors/change_table_name/script @@ -6,7 +6,7 @@ trace create_table.py "$TABLE_NAME" trace create_table.py "${TABLE_NAME}_2" cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle $CLI schemas delete "$SCHEMA_NAME" --force 2>/dev/null || true $CLI schemas delete "qm_test_${UNIQUE_NAME}_2" --force 2>/dev/null || true rm -f out.requests.txt diff --git a/acceptance/bundle/resources/quality_monitors/create/script b/acceptance/bundle/resources/quality_monitors/create/script index 97f6ce6a84..49036601f7 100644 --- a/acceptance/bundle/resources/quality_monitors/create/script +++ b/acceptance/bundle/resources/quality_monitors/create/script @@ -7,7 +7,7 @@ trace $CLI schemas create "qm_test_${UNIQUE_NAME}_2" main -o json | jq '{full_na trace create_table.py "$TABLE_NAME" cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle # Clean up schemas and table (suppress errors since they may already be gone) $CLI schemas delete "$SCHEMA_NAME" --force 2>/dev/null || true $CLI schemas delete "qm_test_${UNIQUE_NAME}_2" --force 2>/dev/null || true diff --git a/acceptance/bundle/resources/registered_models/aliases_converge/script b/acceptance/bundle/resources/registered_models/aliases_converge/script index ca9dc8f700..a75802a021 100644 --- a/acceptance/bundle/resources/registered_models/aliases_converge/script +++ b/acceptance/bundle/resources/registered_models/aliases_converge/script @@ -4,7 +4,7 @@ trace export COMMENT="original comment" envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/registered_models/basic/script b/acceptance/bundle/resources/registered_models/basic/script index 42313057e0..80fd04dc93 100644 --- a/acceptance/bundle/resources/registered_models/basic/script +++ b/acceptance/bundle/resources/registered_models/basic/script @@ -11,7 +11,7 @@ trace $CLI catalogs create ${catalog_name} | jq '{full_name}' trace $CLI schemas create ${schema_name} ${catalog_name} | jq '{full_name}' cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle trace $CLI schemas delete ${catalog_name}.${schema_name} --force trace $CLI catalogs delete ${catalog_name} --force } diff --git a/acceptance/bundle/resources/schemas/auto-approve/script b/acceptance/bundle/resources/schemas/auto-approve/script index 9ea9f4fc41..006f02e813 100644 --- a/acceptance/bundle/resources/schemas/auto-approve/script +++ b/acceptance/bundle/resources/schemas/auto-approve/script @@ -7,7 +7,7 @@ VOLUME_NAME="test-volume-${UNIQUE_NAME}" cleanup() { title "Test cleanup" - trace $CLI bundle destroy --auto-approve + destroy-bundle title "Assert the schema is deleted" trace errcode $CLI schemas get "${CATALOG_NAME}.${SCHEMA_NAME}" 2>/dev/null diff --git a/acceptance/bundle/resources/secret_scopes/basic/script b/acceptance/bundle/resources/secret_scopes/basic/script index e8aebc1853..d0a76d1b2e 100755 --- a/acceptance/bundle/resources/secret_scopes/basic/script +++ b/acceptance/bundle/resources/secret_scopes/basic/script @@ -3,7 +3,7 @@ export SECRET_SCOPE_NAME="test-scope-$UNIQUE_NAME-1" envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/secret_scopes/delete_scope/script b/acceptance/bundle/resources/secret_scopes/delete_scope/script index 5e42e2af4b..73b4e01e0b 100755 --- a/acceptance/bundle/resources/secret_scopes/delete_scope/script +++ b/acceptance/bundle/resources/secret_scopes/delete_scope/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/secret_scopes/permissions-collapse/script b/acceptance/bundle/resources/secret_scopes/permissions-collapse/script index 6c2b4366c3..f85c603275 100755 --- a/acceptance/bundle/resources/secret_scopes/permissions-collapse/script +++ b/acceptance/bundle/resources/secret_scopes/permissions-collapse/script @@ -3,7 +3,7 @@ export SECRET_SCOPE_NAME="test-scope-collapse-$UNIQUE_NAME" envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/secret_scopes/permissions/script b/acceptance/bundle/resources/secret_scopes/permissions/script index ad5d2a518f..95812b3115 100755 --- a/acceptance/bundle/resources/secret_scopes/permissions/script +++ b/acceptance/bundle/resources/secret_scopes/permissions/script @@ -31,7 +31,7 @@ EOF envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/sql_warehouses/lifecycle-started-edit/script b/acceptance/bundle/resources/sql_warehouses/lifecycle-started-edit/script index 5d444c6e4e..e4bee7bf0f 100644 --- a/acceptance/bundle/resources/sql_warehouses/lifecycle-started-edit/script +++ b/acceptance/bundle/resources/sql_warehouses/lifecycle-started-edit/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/sql_warehouses/lifecycle-started-toggle/script b/acceptance/bundle/resources/sql_warehouses/lifecycle-started-toggle/script index c9e7b940f1..5395201951 100644 --- a/acceptance/bundle/resources/sql_warehouses/lifecycle-started-toggle/script +++ b/acceptance/bundle/resources/sql_warehouses/lifecycle-started-toggle/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/sql_warehouses/lifecycle-started/script b/acceptance/bundle/resources/sql_warehouses/lifecycle-started/script index 369839f476..7936c329c9 100644 --- a/acceptance/bundle/resources/sql_warehouses/lifecycle-started/script +++ b/acceptance/bundle/resources/sql_warehouses/lifecycle-started/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/sql_warehouses/script b/acceptance/bundle/resources/sql_warehouses/script index b1d488f36d..d32022c634 100644 --- a/acceptance/bundle/resources/sql_warehouses/script +++ b/acceptance/bundle/resources/sql_warehouses/script @@ -25,7 +25,7 @@ trace jq 'select(.method == "POST" and (.path | contains("/sql/warehouses")) and trace $CLI bundle summary title "Destroy the warehouse" -trace $CLI bundle destroy --auto-approve +destroy-bundle title "Verify the destroy request" trace jq 'select(.method == "DELETE" and (.path | contains("/sql/warehouses")))' out.requests.txt diff --git a/acceptance/bundle/resources/synced_database_tables/basic/script b/acceptance/bundle/resources/synced_database_tables/basic/script index 4aa11ab849..485c3c513d 100644 --- a/acceptance/bundle/resources/synced_database_tables/basic/script +++ b/acceptance/bundle/resources/synced_database_tables/basic/script @@ -13,7 +13,7 @@ MSYS_NO_PATHCONV=1 $CLI api post "/api/2.0/sql/statements/" --json "{ }" > /dev/null cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle # Clean up the temporary source table echo "Cleaning up temporary source table" $CLI tables delete main.test_synced_$UNIQUE_NAME.trips_source || true diff --git a/acceptance/bundle/resources/synced_database_tables/recreate/script b/acceptance/bundle/resources/synced_database_tables/recreate/script index f77695bcd5..9b24838bf8 100644 --- a/acceptance/bundle/resources/synced_database_tables/recreate/script +++ b/acceptance/bundle/resources/synced_database_tables/recreate/script @@ -1,5 +1,5 @@ cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/vector_search_endpoints/basic/script b/acceptance/bundle/resources/vector_search_endpoints/basic/script index e68232aab3..4e95344a5a 100644 --- a/acceptance/bundle/resources/vector_search_endpoints/basic/script +++ b/acceptance/bundle/resources/vector_search_endpoints/basic/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/vector_search_endpoints/drift/budget_policy/script b/acceptance/bundle/resources/vector_search_endpoints/drift/budget_policy/script index 40328247a3..285d348fc8 100644 --- a/acceptance/bundle/resources/vector_search_endpoints/drift/budget_policy/script +++ b/acceptance/bundle/resources/vector_search_endpoints/drift/budget_policy/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/vector_search_endpoints/drift/recreated_same_name/script b/acceptance/bundle/resources/vector_search_endpoints/drift/recreated_same_name/script index 9c834c66e5..bcbbe7f118 100644 --- a/acceptance/bundle/resources/vector_search_endpoints/drift/recreated_same_name/script +++ b/acceptance/bundle/resources/vector_search_endpoints/drift/recreated_same_name/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/vector_search_endpoints/drift/target_qps/script b/acceptance/bundle/resources/vector_search_endpoints/drift/target_qps/script index 58ce3a2f5a..a7e4251705 100644 --- a/acceptance/bundle/resources/vector_search_endpoints/drift/target_qps/script +++ b/acceptance/bundle/resources/vector_search_endpoints/drift/target_qps/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/vector_search_endpoints/recreate/endpoint_type/script b/acceptance/bundle/resources/vector_search_endpoints/recreate/endpoint_type/script index b3920cacbb..33b15a8032 100644 --- a/acceptance/bundle/resources/vector_search_endpoints/recreate/endpoint_type/script +++ b/acceptance/bundle/resources/vector_search_endpoints/recreate/endpoint_type/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/vector_search_endpoints/update/budget_policy/script b/acceptance/bundle/resources/vector_search_endpoints/update/budget_policy/script index 8d19b9f60c..3b67969454 100644 --- a/acceptance/bundle/resources/vector_search_endpoints/update/budget_policy/script +++ b/acceptance/bundle/resources/vector_search_endpoints/update/budget_policy/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/vector_search_endpoints/update/target_qps/script b/acceptance/bundle/resources/vector_search_endpoints/update/target_qps/script index c17c8adfed..2c4c8b2f84 100644 --- a/acceptance/bundle/resources/vector_search_endpoints/update/target_qps/script +++ b/acceptance/bundle/resources/vector_search_endpoints/update/target_qps/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/vector_search_indexes/basic/script b/acceptance/bundle/resources/vector_search_indexes/basic/script index 2e513d8ea6..73b64b5ed4 100644 --- a/acceptance/bundle/resources/vector_search_indexes/basic/script +++ b/acceptance/bundle/resources/vector_search_indexes/basic/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/vector_search_indexes/drift/deleted_remotely/script b/acceptance/bundle/resources/vector_search_indexes/drift/deleted_remotely/script index f92a79a1ef..8bab175af1 100644 --- a/acceptance/bundle/resources/vector_search_indexes/drift/deleted_remotely/script +++ b/acceptance/bundle/resources/vector_search_indexes/drift/deleted_remotely/script @@ -2,7 +2,7 @@ envsubst < databricks.yml.tmpl > databricks.yml index_name="main.default.vs_index_${UNIQUE_NAME}" cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/vector_search_indexes/drift/orphaned_endpoint/script b/acceptance/bundle/resources/vector_search_indexes/drift/orphaned_endpoint/script index d3470f3841..162efdb98a 100644 --- a/acceptance/bundle/resources/vector_search_indexes/drift/orphaned_endpoint/script +++ b/acceptance/bundle/resources/vector_search_indexes/drift/orphaned_endpoint/script @@ -3,7 +3,7 @@ endpoint_name="vs-endpoint-${UNIQUE_NAME}" index_name="main.default.vs_index_${UNIQUE_NAME}" cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/vector_search_indexes/grants/select/script b/acceptance/bundle/resources/vector_search_indexes/grants/select/script index 5e3062f7e4..4c9dc3907a 100644 --- a/acceptance/bundle/resources/vector_search_indexes/grants/select/script +++ b/acceptance/bundle/resources/vector_search_indexes/grants/select/script @@ -2,7 +2,7 @@ envsubst < databricks.yml.tmpl > databricks.yml index_name="main.default.vs_index_${UNIQUE_NAME}" cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/vector_search_indexes/recreate/embedding_dimension/script b/acceptance/bundle/resources/vector_search_indexes/recreate/embedding_dimension/script index c56fb89841..085dd6068c 100644 --- a/acceptance/bundle/resources/vector_search_indexes/recreate/embedding_dimension/script +++ b/acceptance/bundle/resources/vector_search_indexes/recreate/embedding_dimension/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/vector_search_indexes/recreate/pending_deletion/script b/acceptance/bundle/resources/vector_search_indexes/recreate/pending_deletion/script index a17ef34ae5..7e37f1e7bb 100644 --- a/acceptance/bundle/resources/vector_search_indexes/recreate/pending_deletion/script +++ b/acceptance/bundle/resources/vector_search_indexes/recreate/pending_deletion/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/vector_search_indexes/recreate/with_endpoint/script b/acceptance/bundle/resources/vector_search_indexes/recreate/with_endpoint/script index b6170f5b61..ffb24ebecf 100644 --- a/acceptance/bundle/resources/vector_search_indexes/recreate/with_endpoint/script +++ b/acceptance/bundle/resources/vector_search_indexes/recreate/with_endpoint/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/vector_search_indexes/schema_normalization/script b/acceptance/bundle/resources/vector_search_indexes/schema_normalization/script index 02a84e6a3e..7a9297eea3 100644 --- a/acceptance/bundle/resources/vector_search_indexes/schema_normalization/script +++ b/acceptance/bundle/resources/vector_search_indexes/schema_normalization/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/resources/volumes/change-comment/script b/acceptance/bundle/resources/volumes/change-comment/script index 03254877b7..eab53f8651 100644 --- a/acceptance/bundle/resources/volumes/change-comment/script +++ b/acceptance/bundle/resources/volumes/change-comment/script @@ -27,7 +27,7 @@ trace print_requests.py //unity title "Verify updated deployment: should show new comment" trace $CLI volumes read main.myschema.myvolume | jq .comment -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests.py //unity trace musterr $CLI volumes read main.myschema.myvolume diff --git a/acceptance/bundle/resources/volumes/recreate/script b/acceptance/bundle/resources/volumes/recreate/script index 5e1b2e779e..c2b8f670dc 100644 --- a/acceptance/bundle/resources/volumes/recreate/script +++ b/acceptance/bundle/resources/volumes/recreate/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/resources/volumes/set-storage-location/script b/acceptance/bundle/resources/volumes/set-storage-location/script index 9c53155fff..ca4c2211c3 100644 --- a/acceptance/bundle/resources/volumes/set-storage-location/script +++ b/acceptance/bundle/resources/volumes/set-storage-location/script @@ -1,5 +1,5 @@ cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle trace print_requests.py //unity } diff --git a/acceptance/bundle/run/app-with-job/script b/acceptance/bundle/run/app-with-job/script index c340f796c4..e30791c79c 100644 --- a/acceptance/bundle/run/app-with-job/script +++ b/acceptance/bundle/run/app-with-job/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm out.app-run } trap cleanup EXIT diff --git a/acceptance/bundle/run_as/job_default/script b/acceptance/bundle/run_as/job_default/script index 3e80f98838..a4e29f84bf 100644 --- a/acceptance/bundle/run_as/job_default/script +++ b/acceptance/bundle/run_as/job_default/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/select/basic/script b/acceptance/bundle/select/basic/script index 88c61a537b..ef980a50b5 100644 --- a/acceptance/bundle/select/basic/script +++ b/acceptance/bundle/select/basic/script @@ -2,7 +2,7 @@ envsubst '$UNIQUE_NAME' < databricks.yml.tmpl > databricks.yml cleanup() { title "Destroy" - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/select/grants_permissions/script b/acceptance/bundle/select/grants_permissions/script index 1aab6a33fa..73d0304d3c 100644 --- a/acceptance/bundle/select/grants_permissions/script +++ b/acceptance/bundle/select/grants_permissions/script @@ -2,7 +2,7 @@ envsubst '$UNIQUE_NAME' < databricks.yml.tmpl > databricks.yml cleanup() { title "Destroy" - trace $CLI bundle destroy --auto-approve + destroy-bundle rm -f out.requests.txt } trap cleanup EXIT diff --git a/acceptance/bundle/select/plan_file_survives_not_selected/script b/acceptance/bundle/select/plan_file_survives_not_selected/script index 908aeb6ad1..d14c32ec9c 100644 --- a/acceptance/bundle/select/plan_file_survives_not_selected/script +++ b/acceptance/bundle/select/plan_file_survives_not_selected/script @@ -1,7 +1,7 @@ envsubst < databricks.yml.tmpl > databricks.yml cleanup() { - trace $CLI bundle destroy --auto-approve + destroy-bundle } trap cleanup EXIT diff --git a/acceptance/bundle/summary/modified_status/script b/acceptance/bundle/summary/modified_status/script index 4da723c08e..fb3291bba6 100644 --- a/acceptance/bundle/summary/modified_status/script +++ b/acceptance/bundle/summary/modified_status/script @@ -10,5 +10,5 @@ mv $VARIANT databricks.yml title "Expecting all resources to have modified_status=deleted" trace $CLI bundle summary -o json | jq .resources -trace $CLI bundle destroy --auto-approve +destroy-bundle trace $CLI bundle summary -o json | jq .resources diff --git a/acceptance/bundle/user_agent/simple/script b/acceptance/bundle/user_agent/simple/script index b1458b4a4c..68cbfb0819 100644 --- a/acceptance/bundle/user_agent/simple/script +++ b/acceptance/bundle/user_agent/simple/script @@ -16,5 +16,5 @@ trace print_requests.py --sort --get > out.requests.plan2.$DATABRICKS_BUNDLE_ENG musterr trace $CLI bundle run foo trace print_requests.py --sort --get > out.requests.run.$DATABRICKS_BUNDLE_ENGINE.json -trace $CLI bundle destroy --auto-approve +destroy-bundle trace print_requests.py --sort --get > out.requests.destroy.$DATABRICKS_BUNDLE_ENGINE.json diff --git a/acceptance/script.prepare b/acceptance/script.prepare index d71d37aae9..2625721271 100644 --- a/acceptance/script.prepare +++ b/acceptance/script.prepare @@ -166,6 +166,35 @@ as-test-sp() { "$@" } +# destroy-bundle destroys the bundle and then removes the ~/.bundle/ directory it +# was deployed under, so a destroy that only partially succeeded does not leave the tree +# behind. Test bundle names are unique per run, so nothing ever reuses a leftover +# directory and they pile up against the shared CI workspace's child-node limit. +# +# The `bundle destroy` invocation is traced exactly as a direct call would be, so +# switching a test to this helper does not change its output. The extra cleanup runs only +# against a real workspace and is best effort: it must never turn a passing test red. +destroy-bundle() { + local bundle_dir="" + if [[ -n "$CLOUD_ENV" ]]; then + local root_path + root_path=$($CLI bundle validate -o json 2>>LOG.destroy-bundle | jq -r '.workspace.root_path // empty') + if [[ -n "$root_path" ]]; then + bundle_dir=$(dirname "$root_path") + fi + fi + + local exit_code=0 + trace $CLI bundle destroy --auto-approve "$@" || exit_code=$? + + # Only ever clean up directories under .bundle. + if [[ -n "$bundle_dir" && "$(basename "$(dirname "$bundle_dir")")" == ".bundle" ]]; then + $CLI workspace delete "$bundle_dir" --recursive >>LOG.destroy-bundle 2>&1 || true + fi + + return $exit_code +} + readplanarg() { # Expands into "--plan " based on READPLAN env var # Use it with "bundle deploy" to configure two runs: once with saved plan and one without.