Skip to content

Commit c5b7c02

Browse files
authored
Revert "acc: Replace DASHBOARD_ID regex with replace_ids.py" (#4249)
## Changes This reverts commit 797e55a (#4240). ## Why This change broke the primary test build.
1 parent f4f794c commit c5b7c02

File tree

10 files changed

+29
-15
lines changed

10 files changed

+29
-15
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 [DASHBOARD1_ID] --auto-approve
2+
>>> [CLI] bundle deployment bind dashboard1 [DASHBOARD_ID] --auto-approve
33
Updating deployment state...
4-
Successfully bound dashboard with an id '[DASHBOARD1_ID]'
4+
Successfully bound dashboard with an id '[DASHBOARD_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 [DASHBOARD1_ID]
13+
>>> [CLI] lakeview get [DASHBOARD_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 [DASHBOARD1_ID]
39+
>>> [CLI] lakeview get [DASHBOARD_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 [DASHBOARD1_ID] --auto-approve
2+
>>> [CLI] bundle deployment bind dashboard1 [DASHBOARD_ID] --auto-approve
33
Updating deployment state...
4-
Successfully bound dashboard with an id '[DASHBOARD1_ID]'
4+
Successfully bound dashboard with an id '[DASHBOARD_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 [DASHBOARD1_ID]
27+
>>> [CLI] lakeview get [DASHBOARD_ID]
2828
{
2929
"display_name": "test dashboard [UUID]",
3030
"lifecycle_state": "ACTIVE"

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ 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
2221

2322
trace $CLI bundle deployment unbind dashboard1
2423

acceptance/bundle/deployment/bind/dashboard/script

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

2020
trace $CLI bundle deploy
21-
replace_ids.py
2221

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

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

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

9+
[[Repls]]
10+
Old = "[0-9a-f]{32}"
11+
New = "[DASHBOARD_ID]"
12+
913
[[Server]]
1014
Pattern = "POST /api/2.0/lakeview/dashboards"
1115
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 [TEST_DASHBOARD_ID] --serialized-dashboard {"a":"b"}
13+
>>> [CLI] lakeview update [DASHBOARD_ID] --serialized-dashboard {"a":"b"}
1414
{
1515
"create_time":"[TIMESTAMP]",
16-
"dashboard_id":"[TEST_DASHBOARD_ID]",
16+
"dashboard_id":"[DASHBOARD_ID]",
1717
"display_name":"test dashboard",
1818
"etag":"[NUMID]",
1919
"lifecycle_state":"ACTIVE",

acceptance/bundle/generate/dashboard-inplace/script

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

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

87
title "update the dashboard"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[[Repls]]
2+
Old = "[0-9a-f]{32}"
3+
New = "[DASHBOARD_ID]"
4+
5+
[[Repls]]
6+
Old = '2\d\d\d-\d\d-\d\d(T| )\d\d:\d\d:\d\d(\.\d+(Z|\+\d\d:\d\d)?)?Z'
7+
New = "[TIMESTAMP]"
8+
Order = 9
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
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-
108
trace $CLI bundle generate dashboard --existing-id $dashboard_id --dashboard-dir out/dashboard --resource-dir out/resource
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
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)