Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions acceptance/bundle/deployment/bind/dashboard/output.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

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

>>> [CLI] bundle deploy
Expand All @@ -10,7 +10,7 @@ Deploying resources...
Updating deployment state...
Deployment complete!

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

>>> [CLI] lakeview get [DASHBOARD1_ID]
>>> [CLI] lakeview get [DASHBOARD_ID]
{
"display_name": "test dashboard [UUID]",
"lifecycle_state": "ACTIVE",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

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

>>> errcode [CLI] bundle deploy
Expand All @@ -24,7 +24,7 @@ Deploying resources...
Updating deployment state...
Deployment complete!

>>> [CLI] lakeview get [DASHBOARD1_ID]
>>> [CLI] lakeview get [DASHBOARD_ID]
{
"display_name": "test dashboard [UUID]",
"lifecycle_state": "ACTIVE"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ trap cleanupRemoveDashboard EXIT
trace $CLI bundle deployment bind dashboard1 "${DASHBOARD_ID}" --auto-approve

trace errcode $CLI bundle deploy
replace_ids.py

trace $CLI bundle deployment unbind dashboard1

Expand Down
1 change: 0 additions & 1 deletion acceptance/bundle/deployment/bind/dashboard/script
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ trap cleanupRemoveDashboard EXIT
trace $CLI bundle deployment bind dashboard1 "${DASHBOARD_ID}" --auto-approve

trace $CLI bundle deploy
replace_ids.py

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

Expand Down
4 changes: 4 additions & 0 deletions acceptance/bundle/deployment/bind/dashboard/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Ignore = [
"databricks.yml",
]

[[Repls]]
Old = "[0-9a-f]{32}"
New = "[DASHBOARD_ID]"

[[Server]]
Pattern = "POST /api/2.0/lakeview/dashboards"
Response.Body = '''
Expand Down
4 changes: 2 additions & 2 deletions acceptance/bundle/generate/dashboard-inplace/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ Updating deployment state...
Deployment complete!

=== update the dashboard
>>> [CLI] lakeview update [TEST_DASHBOARD_ID] --serialized-dashboard {"a":"b"}
>>> [CLI] lakeview update [DASHBOARD_ID] --serialized-dashboard {"a":"b"}
{
"create_time":"[TIMESTAMP]",
"dashboard_id":"[TEST_DASHBOARD_ID]",
"dashboard_id":"[DASHBOARD_ID]",
"display_name":"test dashboard",
"etag":"[NUMID]",
"lifecycle_state":"ACTIVE",
Expand Down
1 change: 0 additions & 1 deletion acceptance/bundle/generate/dashboard-inplace/script
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ trace cat dash.lvdash.json

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

title "update the dashboard"
Expand Down
8 changes: 8 additions & 0 deletions acceptance/bundle/generate/dashboard-inplace/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[[Repls]]
Old = "[0-9a-f]{32}"
New = "[DASHBOARD_ID]"

[[Repls]]
Old = '2\d\d\d-\d\d-\d\d(T| )\d\d:\d\d:\d\d(\.\d+(Z|\+\d\d:\d\d)?)?Z'
New = "[TIMESTAMP]"
Order = 9
4 changes: 1 addition & 3 deletions acceptance/bundle/generate/dashboard/script
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
trace $CLI workspace mkdirs //Workspace/test-$UNIQUE_NAME
trace $CLI workspace mkdirs /Workspace/test-$UNIQUE_NAME

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

add_repl.py $dashboard_id DASHBOARD_ID

trace $CLI bundle generate dashboard --existing-id $dashboard_id --dashboard-dir out/dashboard --resource-dir out/resource
7 changes: 7 additions & 0 deletions acceptance/bundle/generate/dashboard/test.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
[[Repls]]
Old = '\\\\'
New = '/'

[[Repls]]
Old = "[0-9a-f]{32}"
New = "[DASHBOARD_ID]"

[Env]
MSYS_NO_PATHCONV = "1"