acc: preserve serialized_dashboard formatting in testserver#5652
Open
pietern wants to merge 2 commits into
Open
acc: preserve serialized_dashboard formatting in testserver#5652pietern wants to merge 2 commits into
pietern wants to merge 2 commits into
Conversation
The lakeview testserver fake round-tripped serialized_dashboard through json.Unmarshal/Marshal, collapsing whitespace and reordering keys. The real backend stores and returns the serialized dashboard verbatim, modulo the documented pageType injection and dataset catalog/schema overrides. Preserve the caller's original formatting when no mutation is needed, and use indented marshaling otherwise to match cloud's pretty-printing. This lets the dashboards/generate_inplace acceptance test run locally; flip its Local flag and re-baseline serialized_dashboard formatting across the dashboard test family. Co-authored-by: Isaac
Contributor
Approval status: pending
|
Collaborator
Integration test reportCommit: f88ea67
20 interesting tests: 13 SKIP, 7 KNOWN
Top 20 slowest tests (at least 2 minutes):
|
The previous commit pretty-printed the serialized dashboard whenever it was mutated (pageType/dataset injection), which re-baselined goldens in local-only tests (bundle/migrate/dashboards, bundle/generate/dashboard-inplace) for a formatting cloud is never checked against. Keep the mutation path compact (its original behavior) and only return the dashboard verbatim when nothing is mutated. This narrows the change to the verbatim case and regenerates the one remaining missed golden (bundle/generate/dashboard-inplace). Co-authored-by: Isaac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The fake now returns
serialized_dashboardverbatim when it isn't mutated, instead of always re-marshaling it (which collapsed whitespace and reordered keys); the mutation path (pageType/dataset injection) keeps its original compact output.This lets
dashboards/generate_inplacerun locally and regenerates the verbatim-path goldens across the dashboard tests.This pull request and its description were written by Isaac.