diff --git a/acceptance/bundle/summary/show-full-config/databricks.yml b/acceptance/bundle/summary/show-full-config/databricks.yml index 2158f90476..08ac0519c7 100644 --- a/acceptance/bundle/summary/show-full-config/databricks.yml +++ b/acceptance/bundle/summary/show-full-config/databricks.yml @@ -3,6 +3,7 @@ bundle: include: - targets/*.yml + - resources/*.yml variables: mode: diff --git a/acceptance/bundle/summary/show-full-config/output.txt b/acceptance/bundle/summary/show-full-config/output.txt index c75fca854b..faaff8b9c2 100644 --- a/acceptance/bundle/summary/show-full-config/output.txt +++ b/acceptance/bundle/summary/show-full-config/output.txt @@ -1,6 +1,88 @@ >>> [CLI] bundle summary --show-full-config { + "__locations": { + "files": [ + "databricks.yml", + "resources/my_dashboard.dashboard.yml", + "targets/default.yml", + "targets/not_default.yml", + "targets/variable_default.yml", + "targets/variable_mode.yml" + ], + "locations": { + "bundle": [ + [ + 0, + 2, + 3 + ] + ], + "include": [ + [ + 0, + 5, + 3 + ] + ], + "resources": [ + [ + 1, + 2, + 3 + ] + ], + "resources.dashboards": [ + [ + 1, + 3, + 5 + ] + ], + "resources.dashboards.my_dashboard": [ + [ + 1, + 4, + 7 + ] + ], + "targets": [ + [ + 0, + 15, + 3 + ], + [ + 2, + 2, + 3 + ], + [ + 3, + 2, + 3 + ], + [ + 4, + 2, + 3 + ], + [ + 5, + 2, + 3 + ] + ], + "variables": [ + [ + 0, + 9, + 3 + ] + ] + }, + "version": 1 + }, "bundle": { "name": "test-bundle" }, @@ -8,8 +90,18 @@ "targets/default.yml", "targets/not_default.yml", "targets/variable_default.yml", - "targets/variable_mode.yml" + "targets/variable_mode.yml", + "resources/my_dashboard.dashboard.yml" ], + "resources": { + "dashboards": { + "my_dashboard": { + "display_name": "My Dashboard", + "file_path": "../src/my_dashboard.lvdash.json", + "warehouse_id": "[NUMID]abcdef" + } + } + }, "targets": { "also_default": { "default": true, diff --git a/acceptance/bundle/summary/show-full-config/resources/my_dashboard.dashboard.yml b/acceptance/bundle/summary/show-full-config/resources/my_dashboard.dashboard.yml new file mode 100644 index 0000000000..07ff8d8f75 --- /dev/null +++ b/acceptance/bundle/summary/show-full-config/resources/my_dashboard.dashboard.yml @@ -0,0 +1,6 @@ +resources: + dashboards: + my_dashboard: + display_name: My Dashboard + file_path: ../src/my_dashboard.lvdash.json + warehouse_id: 1234567890abcdef diff --git a/acceptance/bundle/summary/show-full-config/src/my_dashboard.lvdash.json b/acceptance/bundle/summary/show-full-config/src/my_dashboard.lvdash.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/acceptance/bundle/summary/show-full-config/src/my_dashboard.lvdash.json @@ -0,0 +1 @@ +{} diff --git a/cmd/bundle/summary.go b/cmd/bundle/summary.go index 63b6e0529c..62a7c529a0 100644 --- a/cmd/bundle/summary.go +++ b/cmd/bundle/summary.go @@ -81,6 +81,12 @@ func showFullConfig(ctx context.Context, cmd *cobra.Command) error { return nil } + // Include location information in the output + bundle.ApplyContext(ctx, b, mutator.PopulateLocations()) + if logdiag.HasError(ctx) { + return nil + } + err := renderJsonOutput(cmd, b) if err != nil { return err