Skip to content

Commit 8a8c084

Browse files
committed
small fix: fix test fixture and add a clarifying comment to the mutator
1 parent f6a27a7 commit 8a8c084

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

acceptance/bundle/deploy/dashboard/test.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Response.Body = '''
2828
"dashboard_id":"1234567890abcdef1234567890abcdef",
2929
"display_name": "test dashboard 6260d50f-e8ff-4905-8f28-812345678903",
3030
"lifecycle_state": "ACTIVE",
31-
"path": "/Users/[USERNAME]/test bundle-deploy-dashboard [UUID].lvdash.json",
31+
"path": "/Users/[USERNAME]/test bundle-deploy-dashboard 6260d50f-e8ff-4905-8f28-812345678903.lvdash.json",
3232
"parent_path": "/Users/tester@databricks.com",
3333
"serialized_dashboard": "{\"pages\":[{\"name\":\"02724bf2\",\"displayName\":\"Dashboard test bundle-deploy-dashboard\"}]}"
3434
}

bundle/config/mutator/resourcemutator/configure_dashboards_serialized_dashboard.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func (c configureDashboardSerializedDashboard) Apply(_ context.Context, b *bundl
3838
return dyn.MapByPattern(v, pattern, func(p dyn.Path, v dyn.Value) (dyn.Value, error) {
3939
// Include "serialized_dashboard" field if "file_path" is set.
4040
// Note: the Terraform resource supports "file_path" natively, but we read the contents of the dashboard here
41-
// to cover the use case of deployments from the workspace
41+
// to be able to read file contents in Databricks Workspace (reading a dashboard file via file system fails there)
4242
path, ok := v.Get(filePathFieldName).AsString()
4343
if !ok {
4444
return v, nil

0 commit comments

Comments
 (0)