diff --git a/acceptance/bundle/deployment/bind/dashboard/output.txt b/acceptance/bundle/deployment/bind/dashboard/output.txt index 3926b8f1f9..172b4dccb3 100644 --- a/acceptance/bundle/deployment/bind/dashboard/output.txt +++ b/acceptance/bundle/deployment/bind/dashboard/output.txt @@ -1,7 +1,7 @@ ->>> [CLI] bundle deployment bind dashboard1 [DASHBOARD_ID] --auto-approve +>>> [CLI] bundle deployment bind dashboard1 [DASHBOARD1_ID] --auto-approve Updating deployment state... -Successfully bound dashboard with an id '[DASHBOARD_ID]' +Successfully bound dashboard with an id '[DASHBOARD1_ID]' Run 'bundle deploy' to deploy changes to your workspace >>> [CLI] bundle deploy @@ -10,7 +10,7 @@ Deploying resources... Updating deployment state... Deployment complete! ->>> [CLI] lakeview get [DASHBOARD_ID] +>>> [CLI] lakeview get [DASHBOARD1_ID] { "display_name": "test dashboard [UUID]", "lifecycle_state": "ACTIVE", @@ -36,7 +36,7 @@ All files and directories at the following location will be deleted: /Workspace/ Deleting files... Destroy complete! ->>> [CLI] lakeview get [DASHBOARD_ID] +>>> [CLI] lakeview get [DASHBOARD1_ID] { "display_name": "test dashboard [UUID]", "lifecycle_state": "ACTIVE", diff --git a/acceptance/bundle/deployment/bind/dashboard/recreation/output.txt b/acceptance/bundle/deployment/bind/dashboard/recreation/output.txt index f6ec933add..2446717b98 100644 --- a/acceptance/bundle/deployment/bind/dashboard/recreation/output.txt +++ b/acceptance/bundle/deployment/bind/dashboard/recreation/output.txt @@ -1,7 +1,7 @@ ->>> [CLI] bundle deployment bind dashboard1 [DASHBOARD_ID] --auto-approve +>>> [CLI] bundle deployment bind dashboard1 [DASHBOARD1_ID] --auto-approve Updating deployment state... -Successfully bound dashboard with an id '[DASHBOARD_ID]' +Successfully bound dashboard with an id '[DASHBOARD1_ID]' Run 'bundle deploy' to deploy changes to your workspace >>> errcode [CLI] bundle deploy @@ -24,7 +24,7 @@ Deploying resources... Updating deployment state... Deployment complete! ->>> [CLI] lakeview get [DASHBOARD_ID] +>>> [CLI] lakeview get [DASHBOARD1_ID] { "display_name": "test dashboard [UUID]", "lifecycle_state": "ACTIVE" diff --git a/acceptance/bundle/deployment/bind/dashboard/recreation/script b/acceptance/bundle/deployment/bind/dashboard/recreation/script index 8fc4825323..4e71df1cfe 100644 --- a/acceptance/bundle/deployment/bind/dashboard/recreation/script +++ b/acceptance/bundle/deployment/bind/dashboard/recreation/script @@ -18,6 +18,7 @@ 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 diff --git a/acceptance/bundle/deployment/bind/dashboard/script b/acceptance/bundle/deployment/bind/dashboard/script index ac15fdb1fd..5786325827 100644 --- a/acceptance/bundle/deployment/bind/dashboard/script +++ b/acceptance/bundle/deployment/bind/dashboard/script @@ -18,6 +18,7 @@ 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' diff --git a/acceptance/bundle/deployment/bind/dashboard/test.toml b/acceptance/bundle/deployment/bind/dashboard/test.toml index d9167c2183..2a6db5720d 100644 --- a/acceptance/bundle/deployment/bind/dashboard/test.toml +++ b/acceptance/bundle/deployment/bind/dashboard/test.toml @@ -6,10 +6,6 @@ Ignore = [ "databricks.yml", ] -[[Repls]] -Old = "[0-9a-f]{32}" -New = "[DASHBOARD_ID]" - [[Server]] Pattern = "POST /api/2.0/lakeview/dashboards" Response.Body = ''' diff --git a/acceptance/bundle/generate/dashboard-inplace/output.txt b/acceptance/bundle/generate/dashboard-inplace/output.txt index ca173508e3..bd80c98a05 100644 --- a/acceptance/bundle/generate/dashboard-inplace/output.txt +++ b/acceptance/bundle/generate/dashboard-inplace/output.txt @@ -10,10 +10,10 @@ Updating deployment state... Deployment complete! === update the dashboard ->>> [CLI] lakeview update [DASHBOARD_ID] --serialized-dashboard {"a":"b"} +>>> [CLI] lakeview update [TEST_DASHBOARD_ID] --serialized-dashboard {"a":"b"} { "create_time":"[TIMESTAMP]", - "dashboard_id":"[DASHBOARD_ID]", + "dashboard_id":"[TEST_DASHBOARD_ID]", "display_name":"test dashboard", "etag":"[NUMID]", "lifecycle_state":"ACTIVE", diff --git a/acceptance/bundle/generate/dashboard-inplace/script b/acceptance/bundle/generate/dashboard-inplace/script index f11a56da3c..9f4738e627 100644 --- a/acceptance/bundle/generate/dashboard-inplace/script +++ b/acceptance/bundle/generate/dashboard-inplace/script @@ -2,6 +2,7 @@ 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" diff --git a/acceptance/bundle/generate/dashboard-inplace/test.toml b/acceptance/bundle/generate/dashboard-inplace/test.toml deleted file mode 100644 index d5511c1556..0000000000 --- a/acceptance/bundle/generate/dashboard-inplace/test.toml +++ /dev/null @@ -1,8 +0,0 @@ -[[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 diff --git a/acceptance/bundle/generate/dashboard/script b/acceptance/bundle/generate/dashboard/script index a982ef547d..3f242d19c6 100644 --- a/acceptance/bundle/generate/dashboard/script +++ b/acceptance/bundle/generate/dashboard/script @@ -1,8 +1,10 @@ -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 diff --git a/acceptance/bundle/generate/dashboard/test.toml b/acceptance/bundle/generate/dashboard/test.toml index 2d2380d647..9cf9b33eca 100644 --- a/acceptance/bundle/generate/dashboard/test.toml +++ b/acceptance/bundle/generate/dashboard/test.toml @@ -1,10 +1,3 @@ [[Repls]] Old = '\\\\' New = '/' - -[[Repls]] -Old = "[0-9a-f]{32}" -New = "[DASHBOARD_ID]" - -[Env] -MSYS_NO_PATHCONV = "1"