Skip to content

Commit 797e55a

Browse files
authored
acc: Replace DASHBOARD_ID regex with replace_ids.py (#4240)
Use #4238 to get more specific output.
1 parent ca66e13 commit 797e55a

File tree

10 files changed

+15
-29
lines changed

10 files changed

+15
-29
lines changed

acceptance/bundle/deployment/bind/dashboard/output.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
>>> [CLI] bundle deployment bind dashboard1 [DASHBOARD_ID] --auto-approve
2+
>>> [CLI] bundle deployment bind dashboard1 [DASHBOARD1_ID] --auto-approve
33
Updating deployment state...
4-
Successfully bound dashboard with an id '[DASHBOARD_ID]'
4+
Successfully bound dashboard with an id '[DASHBOARD1_ID]'
55
Run 'bundle deploy' to deploy changes to your workspace
66

77
>>> [CLI] bundle deploy
@@ -10,7 +10,7 @@ Deploying resources...
1010
Updating deployment state...
1111
Deployment complete!
1212

13-
>>> [CLI] lakeview get [DASHBOARD_ID]
13+
>>> [CLI] lakeview get [DASHBOARD1_ID]
1414
{
1515
"display_name": "test dashboard [UUID]",
1616
"lifecycle_state": "ACTIVE",
@@ -36,7 +36,7 @@ All files and directories at the following location will be deleted: /Workspace/
3636
Deleting files...
3737
Destroy complete!
3838

39-
>>> [CLI] lakeview get [DASHBOARD_ID]
39+
>>> [CLI] lakeview get [DASHBOARD1_ID]
4040
{
4141
"display_name": "test dashboard [UUID]",
4242
"lifecycle_state": "ACTIVE",

acceptance/bundle/deployment/bind/dashboard/recreation/output.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
>>> [CLI] bundle deployment bind dashboard1 [DASHBOARD_ID] --auto-approve
2+
>>> [CLI] bundle deployment bind dashboard1 [DASHBOARD1_ID] --auto-approve
33
Updating deployment state...
4-
Successfully bound dashboard with an id '[DASHBOARD_ID]'
4+
Successfully bound dashboard with an id '[DASHBOARD1_ID]'
55
Run 'bundle deploy' to deploy changes to your workspace
66

77
>>> errcode [CLI] bundle deploy
@@ -24,7 +24,7 @@ Deploying resources...
2424
Updating deployment state...
2525
Deployment complete!
2626

27-
>>> [CLI] lakeview get [DASHBOARD_ID]
27+
>>> [CLI] lakeview get [DASHBOARD1_ID]
2828
{
2929
"display_name": "test dashboard [UUID]",
3030
"lifecycle_state": "ACTIVE"

acceptance/bundle/deployment/bind/dashboard/recreation/script

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ trap cleanupRemoveDashboard EXIT
1818
trace $CLI bundle deployment bind dashboard1 "${DASHBOARD_ID}" --auto-approve
1919

2020
trace errcode $CLI bundle deploy
21+
replace_ids.py
2122

2223
trace $CLI bundle deployment unbind dashboard1
2324

acceptance/bundle/deployment/bind/dashboard/script

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ trap cleanupRemoveDashboard EXIT
1818
trace $CLI bundle deployment bind dashboard1 "${DASHBOARD_ID}" --auto-approve
1919

2020
trace $CLI bundle deploy
21+
replace_ids.py
2122

2223
trace $CLI lakeview get "${DASHBOARD_ID}" | jq '{display_name, lifecycle_state, path, parent_path, serialized_dashboard} | .serialized_dashboard |= fromjson'
2324

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ Ignore = [
66
"databricks.yml",
77
]
88

9-
[[Repls]]
10-
Old = "[0-9a-f]{32}"
11-
New = "[DASHBOARD_ID]"
12-
139
[[Server]]
1410
Pattern = "POST /api/2.0/lakeview/dashboards"
1511
Response.Body = '''

acceptance/bundle/generate/dashboard-inplace/output.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ Updating deployment state...
1010
Deployment complete!
1111

1212
=== update the dashboard
13-
>>> [CLI] lakeview update [DASHBOARD_ID] --serialized-dashboard {"a":"b"}
13+
>>> [CLI] lakeview update [TEST_DASHBOARD_ID] --serialized-dashboard {"a":"b"}
1414
{
1515
"create_time":"[TIMESTAMP]",
16-
"dashboard_id":"[DASHBOARD_ID]",
16+
"dashboard_id":"[TEST_DASHBOARD_ID]",
1717
"display_name":"test dashboard",
1818
"etag":"[NUMID]",
1919
"lifecycle_state":"ACTIVE",

acceptance/bundle/generate/dashboard-inplace/script

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ trace cat dash.lvdash.json
22

33
title "deploy initial dashboard"
44
trace $CLI bundle deploy
5+
replace_ids.py
56
dashboard_id=$($CLI bundle summary --output json | jq -r '.resources.dashboards.test_dashboard.id')
67

78
title "update the dashboard"

acceptance/bundle/generate/dashboard-inplace/test.toml

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
trace $CLI workspace mkdirs /Workspace/test-$UNIQUE_NAME
1+
trace $CLI workspace mkdirs //Workspace/test-$UNIQUE_NAME
22

33
# create a dashboard to import
44
envsubst < dashboard.json.tmpl > dashboard.json
55
dashboard_id=$($CLI lakeview create --json @dashboard.json | jq -r '.dashboard_id')
66
rm dashboard.json
77

8+
add_repl.py $dashboard_id DASHBOARD_ID
9+
810
trace $CLI bundle generate dashboard --existing-id $dashboard_id --dashboard-dir out/dashboard --resource-dir out/resource
Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
11
[[Repls]]
22
Old = '\\\\'
33
New = '/'
4-
5-
[[Repls]]
6-
Old = "[0-9a-f]{32}"
7-
New = "[DASHBOARD_ID]"
8-
9-
[Env]
10-
MSYS_NO_PATHCONV = "1"

0 commit comments

Comments
 (0)