Skip to content

Commit dccd96b

Browse files
Fix: Use purge option when deleting alerts (#4505)
## Changes Alerts are soft deleted by default and have a limit of 1000 per workspace. This PR perma-deletes them instead when they are managed by DABs. ## Why Fixes our test envs where we run into the limit. Perma-delete is also the right thing to do for DABs. ## Tests Enabled earlier disabled tests. `bundle/resources/alerts/basic` confirms that the fix works.
1 parent 577ca76 commit dccd96b

File tree

15 files changed

+48
-20
lines changed

15 files changed

+48
-20
lines changed

acceptance/bundle/deployment/bind/alert/out.test.toml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

acceptance/bundle/deployment/bind/alert/test.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Cloud = false
1+
Cloud = true
22
Local = false
33

44
# Alert tests timeout during bundle deploy (hang at file upload for 50+ minutes).

acceptance/bundle/generate/alert/out.test.toml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

acceptance/bundle/generate/alert/test.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Cloud = false
1+
Cloud = true
22
Local = false
33

44
# Alert tests timeout during bundle deploy (hang at file upload for 50+ minutes).

acceptance/bundle/resources/alerts/basic/out.test.toml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

acceptance/bundle/resources/alerts/basic/output.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,9 @@ Deleting files...
6262
Destroy complete!
6363

6464
>>> [CLI] alerts-v2 get-alert [ALERT_ID]
65-
{
66-
"display_name": "My alert",
67-
"lifecycle_state": "DELETED"
68-
}
65+
Error: Node with resource name None does not exist.
66+
67+
Exit code: 1
6968

7069
>>> [CLI] bundle summary
7170
Name: alerts-basic-[UNIQUE_NAME]

acceptance/bundle/resources/alerts/basic/script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ trace $CLI bundle plan
1616

1717
trace $CLI bundle destroy --auto-approve
1818

19-
trace $CLI alerts-v2 get-alert $alert_id | jq '{display_name, lifecycle_state}'
19+
errcode trace $CLI alerts-v2 get-alert $alert_id
2020

2121
trace $CLI bundle summary

acceptance/bundle/resources/alerts/basic/test.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Local = true
2-
Cloud = false
2+
Cloud = true
33
RecordRequests = false
44
Ignore = [".databricks"]
55

acceptance/bundle/resources/alerts/with_file/out.test.toml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

acceptance/bundle/resources/alerts/with_file/test.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Local = false
2-
Cloud = false
2+
Cloud = true
33
RecordRequests = false
44
Ignore = [".databricks"]
55

0 commit comments

Comments
 (0)