Skip to content

Commit 57fb6b6

Browse files
authored
Destroy test bundles in config-remote-sync (#4474)
## Changes Cleanup for created bundles in tests ## Why <!-- Why are these changes needed? Provide the context that the reviewer might be missing. For example, were there any decisions behind the change that are not reflected in the code itself? --> ## Tests <!-- How have you tested the changes? --> <!-- If your PR needs to be included in the release notes for next release, add a separate entry in NEXT_CHANGELOG.md as part of your PR. -->
1 parent 1114335 commit 57fb6b6

File tree

26 files changed

+200
-0
lines changed

26 files changed

+200
-0
lines changed

acceptance/bundle/config-remote-sync/cli_defaults/output.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,18 @@ Resource: resources.pipelines.pipeline1
6666
path: /Users/{{workspace_user_name}}/notebook
6767
+ channel: PREVIEW
6868
+ edition: CORE
69+
70+
>>> [CLI] bundle destroy --auto-approve
71+
The following resources will be deleted:
72+
delete resources.jobs.job1
73+
delete resources.jobs.job2
74+
delete resources.pipelines.pipeline1
75+
76+
This action will result in the deletion of the following Lakeflow Spark Declarative Pipelines along with the
77+
Streaming Tables (STs) and Materialized Views (MVs) managed by them:
78+
delete resources.pipelines.pipeline1
79+
80+
All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default
81+
82+
Deleting files...
83+
Destroy complete!

acceptance/bundle/config-remote-sync/cli_defaults/script

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
envsubst < databricks.yml.tmpl > databricks.yml
44

5+
cleanup() {
6+
trace $CLI bundle destroy --auto-approve
7+
}
8+
trap cleanup EXIT
9+
510
$CLI bundle deploy
611
job1_id="$(read_id.py job1)"
712
job2_id="$(read_id.py job2)"

acceptance/bundle/config-remote-sync/config_edits/output.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,12 @@ Resource: resources.jobs.my_job
6262
+ max_concurrent_runs: 5
6363
timeout_seconds: 3600
6464
environments:
65+
66+
>>> [CLI] bundle destroy --auto-approve
67+
The following resources will be deleted:
68+
delete resources.jobs.my_job
69+
70+
All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default
71+
72+
Deleting files...
73+
Destroy complete!

acceptance/bundle/config-remote-sync/config_edits/script

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
envsubst < databricks.yml.tmpl > databricks.yml
44

5+
cleanup() {
6+
trace $CLI bundle destroy --auto-approve
7+
}
8+
trap cleanup EXIT
9+
510
touch dummy.whl
611
$CLI bundle deploy
712
job_id="$(read_id.py my_job)"

acceptance/bundle/config-remote-sync/flushed_cache/output.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,12 @@ Resource: resources.jobs.test_job
2020
max_concurrent_runs: replace
2121

2222

23+
24+
>>> [CLI] bundle destroy --auto-approve
25+
The following resources will be deleted:
26+
delete resources.jobs.test_job
27+
28+
All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default
29+
30+
Deleting files...
31+
Destroy complete!

acceptance/bundle/config-remote-sync/flushed_cache/script

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
envsubst < databricks.yml.tmpl > databricks.yml
44

5+
cleanup() {
6+
trace $CLI bundle destroy --auto-approve
7+
}
8+
trap cleanup EXIT
9+
510
title "Deploy bundle"
611
echo
712
$CLI bundle deploy

acceptance/bundle/config-remote-sync/formatting_preserved/output.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,12 @@ Resource: resources.jobs.my_job
3737
-
3838
# Tags for categorization
3939
tags:
40+
41+
>>> [CLI] bundle destroy --auto-approve
42+
The following resources will be deleted:
43+
delete resources.jobs.my_job
44+
45+
All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default
46+
47+
Deleting files...
48+
Destroy complete!

acceptance/bundle/config-remote-sync/formatting_preserved/script

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
envsubst < databricks.yml.tmpl > databricks.yml
44

5+
cleanup() {
6+
trace $CLI bundle destroy --auto-approve
7+
}
8+
trap cleanup EXIT
9+
510
touch dummy.whl
611
$CLI bundle deploy
712
job_id="$(read_id.py my_job)"

acceptance/bundle/config-remote-sync/job_fields/output.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,12 @@ Resource: resources.jobs.my_job
6060
+ team: data
6161
targets:
6262
default:
63+
64+
>>> [CLI] bundle destroy --auto-approve
65+
The following resources will be deleted:
66+
delete resources.jobs.my_job
67+
68+
All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default
69+
70+
Deleting files...
71+
Destroy complete!

acceptance/bundle/config-remote-sync/job_fields/script

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
envsubst < databricks.yml.tmpl > databricks.yml
44

5+
cleanup() {
6+
trace $CLI bundle destroy --auto-approve
7+
}
8+
trap cleanup EXIT
9+
510
touch dummy.whl
611
$CLI bundle deploy
712
job_id="$(read_id.py my_job)"

0 commit comments

Comments
 (0)