Skip to content

Commit 90eb125

Browse files
authored
add 'bundle plan' to dashboards tests showing drift after deploy (#3966)
1 parent f028ef0 commit 90eb125

File tree

7 files changed

+14
-0
lines changed

7 files changed

+14
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
recreate dashboards.my_dashboard
2+
3+
Plan: 1 to add, 0 to change, 1 to delete, 0 unchanged
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged

acceptance/bundle/resources/dashboards/change-parent-path/script

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,5 @@ cat out.requests.txt | \
3737
jq 'select(.method == "POST" or .method == "PATCH" or .method == "DELETE")' | \
3838
jq 'select( (.path | contains("/api/2.0/lakeview/dashboards")) or ((.path == "/api/2.0/workspace/mkdirs") and (.body.path | contains("/default/resources"))))' \
3939
> out.dashboardrequests.txt
40+
41+
$CLI bundle plan > out.plan_after_deploy.$DATABRICKS_BUNDLE_ENGINE.txt
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
recreate dashboards.dashboard1
2+
3+
Plan: 1 to add, 0 to change, 1 to delete, 0 unchanged
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged

acceptance/bundle/resources/dashboards/simple/script

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ DASHBOARD_ID=$($CLI bundle summary --output json | jq -r '.resources.dashboards.
1818
echo "$DASHBOARD_ID:DASHBOARD_ID" >> ACC_REPLS
1919

2020
trace $CLI lakeview get $DASHBOARD_ID | jq '{lifecycle_state, parent_path, path, serialized_dashboard: (.serialized_dashboard | fromjson | {pages: (.pages | map({name, displayName, pageType}))})}'
21+
22+
# Verify that there is no drift right after deploy
23+
$CLI bundle plan > out.plan.$DATABRICKS_BUNDLE_ENGINE.txt

acceptance/bundle/resources/dashboards/simple/test.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
Badness = "direct: drift after deploy"
12
Local = true
23
Cloud = true
34
RequiresWarehouse = true

0 commit comments

Comments
 (0)