diff --git a/acceptance/bundle/config-remote-sync/cli_defaults/output.txt b/acceptance/bundle/config-remote-sync/cli_defaults/output.txt index 8220de776a..5bc8304d66 100644 --- a/acceptance/bundle/config-remote-sync/cli_defaults/output.txt +++ b/acceptance/bundle/config-remote-sync/cli_defaults/output.txt @@ -66,3 +66,18 @@ Resource: resources.pipelines.pipeline1 path: /Users/{{workspace_user_name}}/notebook + channel: PREVIEW + edition: CORE + +>>> [CLI] bundle destroy --auto-approve +The following resources will be deleted: + delete resources.jobs.job1 + delete resources.jobs.job2 + delete resources.pipelines.pipeline1 + +This action will result in the deletion of the following Lakeflow Spark Declarative Pipelines along with the +Streaming Tables (STs) and Materialized Views (MVs) managed by them: + delete resources.pipelines.pipeline1 + +All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default + +Deleting files... +Destroy complete! diff --git a/acceptance/bundle/config-remote-sync/cli_defaults/script b/acceptance/bundle/config-remote-sync/cli_defaults/script index 1930b75743..cf626b9dc9 100755 --- a/acceptance/bundle/config-remote-sync/cli_defaults/script +++ b/acceptance/bundle/config-remote-sync/cli_defaults/script @@ -2,6 +2,11 @@ envsubst < databricks.yml.tmpl > databricks.yml +cleanup() { + trace $CLI bundle destroy --auto-approve +} +trap cleanup EXIT + $CLI bundle deploy job1_id="$(read_id.py job1)" job2_id="$(read_id.py job2)" diff --git a/acceptance/bundle/config-remote-sync/config_edits/output.txt b/acceptance/bundle/config-remote-sync/config_edits/output.txt index 59b019ed3e..d86fbc26db 100644 --- a/acceptance/bundle/config-remote-sync/config_edits/output.txt +++ b/acceptance/bundle/config-remote-sync/config_edits/output.txt @@ -62,3 +62,12 @@ Resource: resources.jobs.my_job + max_concurrent_runs: 5 timeout_seconds: 3600 environments: + +>>> [CLI] bundle destroy --auto-approve +The following resources will be deleted: + delete resources.jobs.my_job + +All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default + +Deleting files... +Destroy complete! diff --git a/acceptance/bundle/config-remote-sync/config_edits/script b/acceptance/bundle/config-remote-sync/config_edits/script index 5fe1469821..e7defc9b65 100755 --- a/acceptance/bundle/config-remote-sync/config_edits/script +++ b/acceptance/bundle/config-remote-sync/config_edits/script @@ -2,6 +2,11 @@ envsubst < databricks.yml.tmpl > databricks.yml +cleanup() { + trace $CLI bundle destroy --auto-approve +} +trap cleanup EXIT + touch dummy.whl $CLI bundle deploy job_id="$(read_id.py my_job)" diff --git a/acceptance/bundle/config-remote-sync/flushed_cache/output.txt b/acceptance/bundle/config-remote-sync/flushed_cache/output.txt index e4f2a40b24..32ded32061 100644 --- a/acceptance/bundle/config-remote-sync/flushed_cache/output.txt +++ b/acceptance/bundle/config-remote-sync/flushed_cache/output.txt @@ -20,3 +20,12 @@ Resource: resources.jobs.test_job max_concurrent_runs: replace + +>>> [CLI] bundle destroy --auto-approve +The following resources will be deleted: + delete resources.jobs.test_job + +All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default + +Deleting files... +Destroy complete! diff --git a/acceptance/bundle/config-remote-sync/flushed_cache/script b/acceptance/bundle/config-remote-sync/flushed_cache/script index 533ca74123..7571c62bbb 100755 --- a/acceptance/bundle/config-remote-sync/flushed_cache/script +++ b/acceptance/bundle/config-remote-sync/flushed_cache/script @@ -2,6 +2,11 @@ envsubst < databricks.yml.tmpl > databricks.yml +cleanup() { + trace $CLI bundle destroy --auto-approve +} +trap cleanup EXIT + title "Deploy bundle" echo $CLI bundle deploy diff --git a/acceptance/bundle/config-remote-sync/formatting_preserved/output.txt b/acceptance/bundle/config-remote-sync/formatting_preserved/output.txt index 524b261d24..5cb473d1f8 100644 --- a/acceptance/bundle/config-remote-sync/formatting_preserved/output.txt +++ b/acceptance/bundle/config-remote-sync/formatting_preserved/output.txt @@ -37,3 +37,12 @@ Resource: resources.jobs.my_job - # Tags for categorization tags: + +>>> [CLI] bundle destroy --auto-approve +The following resources will be deleted: + delete resources.jobs.my_job + +All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default + +Deleting files... +Destroy complete! diff --git a/acceptance/bundle/config-remote-sync/formatting_preserved/script b/acceptance/bundle/config-remote-sync/formatting_preserved/script index fb5fdea5ba..74fdc331f2 100755 --- a/acceptance/bundle/config-remote-sync/formatting_preserved/script +++ b/acceptance/bundle/config-remote-sync/formatting_preserved/script @@ -2,6 +2,11 @@ envsubst < databricks.yml.tmpl > databricks.yml +cleanup() { + trace $CLI bundle destroy --auto-approve +} +trap cleanup EXIT + touch dummy.whl $CLI bundle deploy job_id="$(read_id.py my_job)" diff --git a/acceptance/bundle/config-remote-sync/job_fields/output.txt b/acceptance/bundle/config-remote-sync/job_fields/output.txt index a434e8c53c..3141780d7c 100644 --- a/acceptance/bundle/config-remote-sync/job_fields/output.txt +++ b/acceptance/bundle/config-remote-sync/job_fields/output.txt @@ -60,3 +60,12 @@ Resource: resources.jobs.my_job + team: data targets: default: + +>>> [CLI] bundle destroy --auto-approve +The following resources will be deleted: + delete resources.jobs.my_job + +All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default + +Deleting files... +Destroy complete! diff --git a/acceptance/bundle/config-remote-sync/job_fields/script b/acceptance/bundle/config-remote-sync/job_fields/script index 29dd2d3104..299b6d3592 100755 --- a/acceptance/bundle/config-remote-sync/job_fields/script +++ b/acceptance/bundle/config-remote-sync/job_fields/script @@ -2,6 +2,11 @@ envsubst < databricks.yml.tmpl > databricks.yml +cleanup() { + trace $CLI bundle destroy --auto-approve +} +trap cleanup EXIT + touch dummy.whl $CLI bundle deploy job_id="$(read_id.py my_job)" diff --git a/acceptance/bundle/config-remote-sync/job_multiple_tasks/output.txt b/acceptance/bundle/config-remote-sync/job_multiple_tasks/output.txt index 1cb47b6625..f3350a057f 100644 --- a/acceptance/bundle/config-remote-sync/job_multiple_tasks/output.txt +++ b/acceptance/bundle/config-remote-sync/job_multiple_tasks/output.txt @@ -114,3 +114,13 @@ Resource: resources.jobs.rename_task_job + - task_key: b_task_renamed notebook_task: notebook_path: /Users/{{workspace_user_name}}/c_task + +>>> [CLI] bundle destroy --auto-approve +The following resources will be deleted: + delete resources.jobs.my_job + delete resources.jobs.rename_task_job + +All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default + +Deleting files... +Destroy complete! diff --git a/acceptance/bundle/config-remote-sync/job_multiple_tasks/script b/acceptance/bundle/config-remote-sync/job_multiple_tasks/script index 097516a7a2..be6d61a4df 100755 --- a/acceptance/bundle/config-remote-sync/job_multiple_tasks/script +++ b/acceptance/bundle/config-remote-sync/job_multiple_tasks/script @@ -2,6 +2,11 @@ envsubst < databricks.yml.tmpl > databricks.yml +cleanup() { + trace $CLI bundle destroy --auto-approve +} +trap cleanup EXIT + touch dummy.whl $CLI bundle deploy job_id="$(read_id.py my_job)" diff --git a/acceptance/bundle/config-remote-sync/job_pipeline_task/output.txt b/acceptance/bundle/config-remote-sync/job_pipeline_task/output.txt index 0b80132945..0c30accbb3 100644 --- a/acceptance/bundle/config-remote-sync/job_pipeline_task/output.txt +++ b/acceptance/bundle/config-remote-sync/job_pipeline_task/output.txt @@ -42,3 +42,17 @@ Resource: resources.pipelines.my_pipeline pipeline_id: ${resources.pipelines.my_pipeline.id} - full_refresh: false + full_refresh: true + +>>> [CLI] bundle destroy --auto-approve +The following resources will be deleted: + delete resources.jobs.my_job + delete resources.pipelines.my_pipeline + +This action will result in the deletion of the following Lakeflow Spark Declarative Pipelines along with the +Streaming Tables (STs) and Materialized Views (MVs) managed by them: + delete resources.pipelines.my_pipeline + +All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default + +Deleting files... +Destroy complete! diff --git a/acceptance/bundle/config-remote-sync/job_pipeline_task/script b/acceptance/bundle/config-remote-sync/job_pipeline_task/script index 98a4d5e33c..867fae764d 100755 --- a/acceptance/bundle/config-remote-sync/job_pipeline_task/script +++ b/acceptance/bundle/config-remote-sync/job_pipeline_task/script @@ -2,6 +2,11 @@ envsubst < databricks.yml.tmpl > databricks.yml +cleanup() { + trace $CLI bundle destroy --auto-approve +} +trap cleanup EXIT + touch dummy.whl $CLI bundle deploy job_id="$(read_id.py my_job)" diff --git a/acceptance/bundle/config-remote-sync/multiple_files/output.txt b/acceptance/bundle/config-remote-sync/multiple_files/output.txt index 3f0dde9c59..959d8e9066 100644 --- a/acceptance/bundle/config-remote-sync/multiple_files/output.txt +++ b/acceptance/bundle/config-remote-sync/multiple_files/output.txt @@ -92,3 +92,13 @@ Resource: resources.jobs.job_two notebook_task: notebook_path: /Users/{{workspace_user_name}}/extra + task_key: extra_task + +>>> [CLI] bundle destroy --auto-approve +The following resources will be deleted: + delete resources.jobs.job_one + delete resources.jobs.job_two + +All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/dev + +Deleting files... +Destroy complete! diff --git a/acceptance/bundle/config-remote-sync/multiple_files/script b/acceptance/bundle/config-remote-sync/multiple_files/script index 7bc24f4f52..d66bb7bbbf 100755 --- a/acceptance/bundle/config-remote-sync/multiple_files/script +++ b/acceptance/bundle/config-remote-sync/multiple_files/script @@ -4,6 +4,11 @@ envsubst < databricks.yml.tmpl > databricks.yml envsubst < resources/job1.yml.tmpl > resources/job1.yml envsubst < resources/job2.yml.tmpl > resources/job2.yml +cleanup() { + trace $CLI bundle destroy --auto-approve +} +trap cleanup EXIT + touch dummy.whl $CLI bundle deploy diff --git a/acceptance/bundle/config-remote-sync/multiple_resources/output.txt b/acceptance/bundle/config-remote-sync/multiple_resources/output.txt index 236315b98a..90aca6046a 100644 --- a/acceptance/bundle/config-remote-sync/multiple_resources/output.txt +++ b/acceptance/bundle/config-remote-sync/multiple_resources/output.txt @@ -49,3 +49,13 @@ Resource: resources.jobs.job_two num_workers: 1 + tags: + team: ml + +>>> [CLI] bundle destroy --auto-approve +The following resources will be deleted: + delete resources.jobs.job_one + delete resources.jobs.job_two + +All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default + +Deleting files... +Destroy complete! diff --git a/acceptance/bundle/config-remote-sync/multiple_resources/script b/acceptance/bundle/config-remote-sync/multiple_resources/script index 9fedcee207..3b398261b7 100755 --- a/acceptance/bundle/config-remote-sync/multiple_resources/script +++ b/acceptance/bundle/config-remote-sync/multiple_resources/script @@ -2,6 +2,11 @@ envsubst < databricks.yml.tmpl > databricks.yml +cleanup() { + trace $CLI bundle destroy --auto-approve +} +trap cleanup EXIT + touch dummy.whl $CLI bundle deploy diff --git a/acceptance/bundle/config-remote-sync/output_json/output.txt b/acceptance/bundle/config-remote-sync/output_json/output.txt index 1691c5b447..2ae4806761 100644 --- a/acceptance/bundle/config-remote-sync/output_json/output.txt +++ b/acceptance/bundle/config-remote-sync/output_json/output.txt @@ -26,3 +26,12 @@ Deployment complete! } } } + +>>> [CLI] bundle destroy --auto-approve +The following resources will be deleted: + delete resources.jobs.test_job + +All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default + +Deleting files... +Destroy complete! diff --git a/acceptance/bundle/config-remote-sync/output_json/script b/acceptance/bundle/config-remote-sync/output_json/script index 536cf595f9..761a4e3de1 100755 --- a/acceptance/bundle/config-remote-sync/output_json/script +++ b/acceptance/bundle/config-remote-sync/output_json/script @@ -2,6 +2,11 @@ envsubst < databricks.yml.tmpl > databricks.yml +cleanup() { + trace $CLI bundle destroy --auto-approve +} +trap cleanup EXIT + touch dummy.whl $CLI bundle deploy job_id="$(read_id.py test_job)" diff --git a/acceptance/bundle/config-remote-sync/output_no_changes/output.txt b/acceptance/bundle/config-remote-sync/output_no_changes/output.txt index d88b9c2feb..6aa616cbee 100644 --- a/acceptance/bundle/config-remote-sync/output_no_changes/output.txt +++ b/acceptance/bundle/config-remote-sync/output_no_changes/output.txt @@ -16,3 +16,12 @@ No changes detected. "files": null, "changes": {} } + +>>> [CLI] bundle destroy --auto-approve +The following resources will be deleted: + delete resources.jobs.test_job + +All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default + +Deleting files... +Destroy complete! diff --git a/acceptance/bundle/config-remote-sync/output_no_changes/script b/acceptance/bundle/config-remote-sync/output_no_changes/script index d978026651..ea238cc52a 100755 --- a/acceptance/bundle/config-remote-sync/output_no_changes/script +++ b/acceptance/bundle/config-remote-sync/output_no_changes/script @@ -2,6 +2,11 @@ envsubst < databricks.yml.tmpl > databricks.yml +cleanup() { + trace $CLI bundle destroy --auto-approve +} +trap cleanup EXIT + touch dummy.whl $CLI bundle deploy diff --git a/acceptance/bundle/config-remote-sync/pipeline_fields/output.txt b/acceptance/bundle/config-remote-sync/pipeline_fields/output.txt index 2d2c671e18..d536597186 100644 --- a/acceptance/bundle/config-remote-sync/pipeline_fields/output.txt +++ b/acceptance/bundle/config-remote-sync/pipeline_fields/output.txt @@ -55,3 +55,16 @@ Resource: resources.pipelines.my_pipeline + foo: bar targets: default: + +>>> [CLI] bundle destroy --auto-approve +The following resources will be deleted: + delete resources.pipelines.my_pipeline + +This action will result in the deletion of the following Lakeflow Spark Declarative Pipelines along with the +Streaming Tables (STs) and Materialized Views (MVs) managed by them: + delete resources.pipelines.my_pipeline + +All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default + +Deleting files... +Destroy complete! diff --git a/acceptance/bundle/config-remote-sync/pipeline_fields/script b/acceptance/bundle/config-remote-sync/pipeline_fields/script index 6ab2c931db..69e2c87b7c 100755 --- a/acceptance/bundle/config-remote-sync/pipeline_fields/script +++ b/acceptance/bundle/config-remote-sync/pipeline_fields/script @@ -2,6 +2,11 @@ envsubst < databricks.yml.tmpl > databricks.yml +cleanup() { + trace $CLI bundle destroy --auto-approve +} +trap cleanup EXIT + $CLI bundle deploy pipeline_id="$(read_id.py my_pipeline)" diff --git a/acceptance/bundle/config-remote-sync/target_override/output.txt b/acceptance/bundle/config-remote-sync/target_override/output.txt index bbafa785c6..d2f23a83d4 100644 --- a/acceptance/bundle/config-remote-sync/target_override/output.txt +++ b/acceptance/bundle/config-remote-sync/target_override/output.txt @@ -40,3 +40,12 @@ Resource: resources.jobs.my_job - env: dev + env: staging + owner: data-team + +>>> [CLI] bundle destroy --auto-approve -t dev +The following resources will be deleted: + delete resources.jobs.my_job + +All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/dev + +Deleting files... +Destroy complete! diff --git a/acceptance/bundle/config-remote-sync/target_override/script b/acceptance/bundle/config-remote-sync/target_override/script index ad1cf8889d..671eb75ed2 100755 --- a/acceptance/bundle/config-remote-sync/target_override/script +++ b/acceptance/bundle/config-remote-sync/target_override/script @@ -2,6 +2,11 @@ envsubst < databricks.yml.tmpl > databricks.yml +cleanup() { + trace $CLI bundle destroy --auto-approve -t dev +} +trap cleanup EXIT + touch dummy.whl $CLI bundle deploy -t dev job_id="$(read_id.py my_job)"