Uh oh!
There was an error while loading. Please reload this page.
Read dashboard definition from file_path via filer interface - #2738
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
c3573b7 to
bcba28dCompare28533c6 to
d40eabcCompare
shreyas-goenka
left a comment
There was a problem hiding this comment.
Approving to unblock. Just one question about why we needed to change the file translation.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
file_path via filer interface…ansformation pipeline, closer to terraform write
anton-107
commented
Apr 24, 2025
yes. this is needed for the filer to read the file correctly |
abdf67b to
e7e0b45Compare
denik
left a comment
There was a problem hiding this comment.
Did you manually test it in the workspace? (You can cross-build and upload binary there)
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
pietern
left a comment
There was a problem hiding this comment.
Can you confirm this change is a no-op for dashboards deployed with an earlier version of the CLI? Everything else LGTM.
anton-107
commented
Apr 29, 2025
Yes, tested for new dashboards in workspace - deployment works with this change in |
denik
commented
Apr 29, 2025
OK, thanks. I asked because I did not see it not mentioned in Tests section, but I see it's there now. |
anton-107
commented
Apr 29, 2025
Wrote this test:
the second run reported Deployment as complete and there were no signs of any changes that were required |
## Changes We started inlining the dashboard definition in #2738 by reading `file_path` and setting it in `serialized_dashboard`. This broke the `bundle generate` CUJ for updating an already imported dashboard when working with DABs. This PR fixes that by keeping the `file_path` around in the configuration tree as metadata and only dropping it when we generate the TF configuration. This PR also adds regression tests to ensure this keeps working in the future. ## Why Fixes#2998 (comment). ## Tests Acceptance tests.
…#3006) ## Why <!-- Why are these changes needed? Provide the context that the reviewer might be missing. For example, were there any decisions behind the change that are not reflected in the code itself? --> #2738 changed reading the dashboard contents before the dashboard path was normalized. This change fixes that defect, and also fixes use cases of reading dashboards contents inside a bundle, which defines sync root that is different from the bundle root ## Tests <!-- How have you tested the changes? --> Existing and new acceptance tests <!-- If your PR needs to be included in the release notes for next release, add a separate entry in NEXT_CHANGELOG.md as part of your PR. -->
## Changes <!-- Brief summary of your changes that is easy to understand --> 1. When dashboard resource contains a `file_path` field, that file is read and its contents are set to the `serialized_dashboard` field. This is done in a newly introduced `ConfigureDashboardSerializedDashboard` mutator 2. Old behavior of wrapping file_path into terraform's `file` directive is removed from `dashboardConverter` (unit tests for this are also removed) 3. `ConfigureWSFS` mutator call is moved to be executed before `PythonMutator` so that the latter has access to the Workspace File System client ## Why <!-- Why are these changes needed? Provide the context that the reviewer might be missing. For example, were there any decisions behind the change that are not reflected in the code itself? --> This change allows `bundle deploy` to correctly deploy dashboard resource when running in Databricks Workspace / Runtime. Deployment does not work currently, because reading a dashboard file via file system interface throws an error in the Workspace. ## Tests <!-- How have you tested the changes? --> - Added a new dashboard deployment acceptance test - Performed a manual test to deploy a dashboard from a workspace <!-- If your PR needs to be included in the release notes for next release, add a separate entry in NEXT_CHANGELOG.md as part of your PR. -->
## Changes We started inlining the dashboard definition in #2738 by reading `file_path` and setting it in `serialized_dashboard`. This broke the `bundle generate` CUJ for updating an already imported dashboard when working with DABs. This PR fixes that by keeping the `file_path` around in the configuration tree as metadata and only dropping it when we generate the TF configuration. This PR also adds regression tests to ensure this keeps working in the future. ## Why Fixes#2998 (comment). ## Tests Acceptance tests.
…#3006) ## Why <!-- Why are these changes needed? Provide the context that the reviewer might be missing. For example, were there any decisions behind the change that are not reflected in the code itself? --> #2738 changed reading the dashboard contents before the dashboard path was normalized. This change fixes that defect, and also fixes use cases of reading dashboards contents inside a bundle, which defines sync root that is different from the bundle root ## Tests <!-- How have you tested the changes? --> Existing and new acceptance tests <!-- If your PR needs to be included in the release notes for next release, add a separate entry in NEXT_CHANGELOG.md as part of your PR. -->
Changes
file_pathfield, that file is read and its contents are set to theserialized_dashboardfield. This is done in a newly introducedConfigureDashboardSerializedDashboardmutatorfiledirective is removed fromdashboardConverter(unit tests for this are also removed)ConfigureWSFSmutator call is moved to be executed beforePythonMutatorso that the latter has access to the Workspace File System clientWhy
This change allows
bundle deployto correctly deploy dashboard resource when running in Databricks Workspace / Runtime. Deployment does not work currently, because reading a dashboard file via file system interface throws an error in the Workspace.Tests