Skip to content

Commit ab83bd4

Browse files
Disable alerts until server side issues are fixed (#3603)
## Why Alerts API today has issues that make the DABs UX borderline unusable. Examples are: 1. The validation errors are not readable. 2. Server side defaults configured for many fields cause TF errors. This PR disables alerts until these issues are worked out. Support for alerts was originally added in #3033 ## Tests Existing tests.
1 parent 09bcf78 commit ab83bd4

File tree

23 files changed

+152
-911
lines changed

23 files changed

+152
-911
lines changed

NEXT_CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
## Release v0.269.0
44

55
### Notable Changes
6-
* Add support for SQL Alerts in DABs ([#3033](https://github.com/databricks/cli/pull/3033))
76

87
### CLI
98

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

44
[EnvMatrix]
55
DATABRICKS_CLI_DEPLOYMENT = ["terraform"]

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

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

44
# Permissions with alerts does not work with direct deployment yet.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
Cloud = false
2+
Local = false # Enable when releasing support for alerts.
23

34
BundleConfigTarget = "databricks.yml"

acceptance/bundle/summary/modified_status/output.txt

Lines changed: 12 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11

22
=== Initial view of resources without id and modified_status=created
33
>>> [CLI] bundle summary -o json
4+
Warning: unknown field: alerts
5+
at resources
6+
in databricks.yml:4:3
7+
48
{
5-
"alerts": {
6-
"my_alert": {
7-
"custom_description": "test-alert-description",
8-
"custom_summary": "test-alert-summary",
9-
"display_name": "test-alert",
10-
"modified_status": "created",
11-
"parent_path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/resources",
12-
"permissions": [],
13-
"query_text": "SELECT 1",
14-
"warehouse_id": "test-sql-warehouse"
15-
}
16-
},
179
"pipelines": {
1810
"my_pipeline": {
1911
"channel": "CURRENT",
@@ -58,27 +50,22 @@
5850
}
5951

6052
>>> [CLI] bundle deploy
53+
Warning: unknown field: alerts
54+
at resources
55+
in databricks.yml:4:3
56+
6157
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
6258
Deploying resources...
6359
Updating deployment state...
6460
Deployment complete!
6561

6662
=== Post-deployment view of resources with id and without modified_status
6763
>>> [CLI] bundle summary -o json
64+
Warning: unknown field: alerts
65+
at resources
66+
in databricks.yml:4:3
67+
6868
{
69-
"alerts": {
70-
"my_alert": {
71-
"custom_description": "test-alert-description",
72-
"custom_summary": "test-alert-summary",
73-
"display_name": "test-alert",
74-
"id": "[UUID]",
75-
"parent_path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/resources",
76-
"permissions": [],
77-
"query_text": "SELECT 1",
78-
"url": "[DATABRICKS_URL]/sql/alerts-v2/[UUID]?o=[NUMID]",
79-
"warehouse_id": "test-sql-warehouse"
80-
}
81-
},
8269
"pipelines": {
8370
"my_pipeline": {
8471
"channel": "CURRENT",
@@ -128,13 +115,6 @@ Deployment complete!
128115
=== Expecting all resources to have modified_status=deleted
129116
>>> [CLI] bundle summary -o json
130117
{
131-
"alerts": {
132-
"my_alert": {
133-
"id": "[UUID]",
134-
"modified_status": "deleted",
135-
"url": "[DATABRICKS_URL]/sql/alerts-v2/[UUID]?o=[NUMID]"
136-
}
137-
},
138118
"pipelines": {
139119
"my_pipeline": {
140120
"id": "[UUID]",
@@ -160,7 +140,6 @@ Deployment complete!
160140

161141
>>> [CLI] bundle destroy --auto-approve
162142
The following resources will be deleted:
163-
delete alert my_alert
164143
delete pipeline my_pipeline
165144
delete schema my_schema
166145
delete sql_warehouse my_sql_warehouse

acceptance/bundle/validate/empty_resources/empty_def/output.txt

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,8 @@ Error: secret_scope rname is not defined
143143
}
144144

145145
=== resources.alerts.rname ===
146-
Error: alert rname is not defined
147-
at resources.alerts.rname
148-
in databricks.yml:6:11
146+
Warning: unknown field: alerts
147+
at resources
148+
in databricks.yml:5:3
149149

150-
{
151-
"alerts": {
152-
"rname": null
153-
}
154-
}
150+
{}

acceptance/bundle/validate/empty_resources/empty_dict/output.txt

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,8 @@ Warning: required field "name" is not set
199199
}
200200

201201
=== resources.alerts.rname ===
202-
{
203-
"alerts": {
204-
"rname": {
205-
"parent_path": "/Workspace/Users/[USERNAME]/.bundle/BUNDLE/default/resources",
206-
"permissions": []
207-
}
208-
}
209-
}
202+
Warning: unknown field: alerts
203+
at resources
204+
in databricks.yml:5:3
205+
206+
{}

acceptance/bundle/validate/empty_resources/null/output.txt

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,8 @@ Error: secret_scope rname is not defined
143143
}
144144

145145
=== resources.alerts.rname ===
146-
Error: alert rname is not defined
147-
at resources.alerts.rname
148-
in databricks.yml:6:12
146+
Warning: unknown field: alerts
147+
at resources
148+
in databricks.yml:5:3
149149

150-
{
151-
"alerts": {
152-
"rname": null
153-
}
154-
}
150+
{}

acceptance/bundle/validate/empty_resources/with_grants/output.txt

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -244,15 +244,8 @@ Warning: required field "name" is not set
244244
}
245245

246246
=== resources.alerts.rname ===
247-
Warning: unknown field: grants
248-
at resources.alerts.rname
249-
in databricks.yml:7:7
247+
Warning: unknown field: alerts
248+
at resources
249+
in databricks.yml:5:3
250250

251-
{
252-
"alerts": {
253-
"rname": {
254-
"parent_path": "/Workspace/Users/[USERNAME]/.bundle/BUNDLE/default/resources",
255-
"permissions": []
256-
}
257-
}
258-
}
251+
{}

acceptance/bundle/validate/empty_resources/with_permissions/output.txt

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,8 @@ Warning: required field "name" is not set
217217
}
218218

219219
=== resources.alerts.rname ===
220-
{
221-
"alerts": {
222-
"rname": {
223-
"parent_path": "/Workspace/Users/[USERNAME]/.bundle/BUNDLE/default/resources",
224-
"permissions": []
225-
}
226-
}
227-
}
220+
Warning: unknown field: alerts
221+
at resources
222+
in databricks.yml:5:3
223+
224+
{}

0 commit comments

Comments
 (0)