Skip to content

acc: preserve serialized_dashboard formatting in testserver#5652

Open
pietern wants to merge 7 commits into
mainfrom
local-dashboards-generate-inplace
Open

acc: preserve serialized_dashboard formatting in testserver#5652
pietern wants to merge 7 commits into
mainfrom
local-dashboards-generate-inplace

Conversation

@pietern

@pietern pietern commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

The fake now returns serialized_dashboard verbatim 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_inplace run locally.

This pull request and its description were written by Isaac.

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
@pietern pietern temporarily deployed to test-trigger-is June 18, 2026 15:12 — with GitHub Actions Inactive
@pietern pietern temporarily deployed to test-trigger-is June 18, 2026 15:12 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Approval status: pending

/acceptance/bundle/ - needs approval

Files: acceptance/bundle/resources/dashboards/generate_inplace/out.test.toml, acceptance/bundle/resources/dashboards/generate_inplace/test.toml
Suggested: @denik
Also eligible: @shreyas-goenka, @andrewnester, @anton-107, @janniklasrose, @lennartkats-db

General files (require maintainer)

Files: libs/testserver/dashboards.go
Based on git history:

  • @denik -- recent work in libs/testserver/, acceptance/bundle/resources/dashboards/generate_inplace/

Any maintainer (@andrewnester, @anton-107, @denik, @shreyas-goenka, @simonfaltum, @renaudhartert-db) can approve all areas.
See OWNERS for ownership rules.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: f0b7071

Run: 27819137068

Env 🟨​KNOWN 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🟨​ aws linux 7 13 262 1012 6:29
🟨​ aws windows 7 2 13 262 1010 10:46
💚​ aws-ucws linux 7 13 358 926 6:09
💚​ aws-ucws windows 7 13 360 924 7:26
💚​ azure linux 1 15 265 1010 4:50
💚​ azure windows 1 15 267 1008 6:12
💚​ azure-ucws linux 1 15 363 922 6:27
💚​ azure-ucws windows 1 15 365 920 7:28
💚​ gcp linux 1 15 261 1013 5:36
💚​ gcp windows 1 15 263 1011 7:02
22 interesting tests: 13 SKIP, 7 KNOWN, 2 flaky
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
🟨​ TestAccept 🟨​K 🟨​K 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/permissions 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🔄​ TestAccept/bundle/resources/permissions/dashboards/create ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🙈​s 🙈​s
🔄​ TestAccept/bundle/resources/permissions/dashboards/create/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
🙈​ TestAccept/bundle/resources/postgres_branches/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/replace_existing 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/update_protected 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/without_branch_id 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_endpoints/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_projects/update_display_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/synced_database_tables/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
Top 21 slowest tests (at least 2 minutes):
duration env testname
4:49 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:16 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:59 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:41 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:35 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:11 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:02 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:58 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:52 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:50 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:47 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:43 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:41 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:41 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:36 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:35 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:35 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:35 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:24 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:22 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:02 gcp windows TestAccept

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
@pietern pietern temporarily deployed to test-trigger-is June 18, 2026 16:50 — with GitHub Actions Inactive
@pietern pietern temporarily deployed to test-trigger-is June 18, 2026 16:50 — with GitHub Actions Inactive
pietern added 2 commits June 19, 2026 11:23
The lakeview testserver fake preserves the caller's serialized_dashboard
verbatim when no mutation is needed, but dropped cloud's trailing-newline
behavior. Cloud terminates the stored dashboard with a single newline even
when it otherwise preserves formatting, so an out-of-band update sending "{}"
comes back as "{}\n". Re-add the newline in the verbatim branch and update
the detect-change golden to match.

Co-authored-by: Isaac
@pietern pietern temporarily deployed to test-trigger-is June 19, 2026 09:41 — with GitHub Actions Inactive
@pietern pietern temporarily deployed to test-trigger-is June 19, 2026 09:41 — with GitHub Actions Inactive
Compute the dashboard body once (verbatim when unmutated, re-marshaled
otherwise) and apply cloud's trailing-newline rule in a single place
instead of two.

Co-authored-by: Isaac
@pietern pietern temporarily deployed to test-trigger-is June 19, 2026 09:42 — with GitHub Actions Inactive
@pietern pietern temporarily deployed to test-trigger-is June 19, 2026 09:42 — with GitHub Actions Inactive
The lakeview update in this test sends serialized_dashboard "{"a":"b"}",
which cloud stores with a trailing newline like every other dashboard.
Regenerate the golden to match the testserver's now-faithful behavior.

Co-authored-by: Isaac
@pietern pietern temporarily deployed to test-trigger-is June 19, 2026 09:46 — with GitHub Actions Inactive
@pietern pietern temporarily deployed to test-trigger-is June 19, 2026 09:46 — with GitHub Actions Inactive
@pietern pietern temporarily deployed to test-trigger-is June 19, 2026 10:03 — with GitHub Actions Inactive
@pietern pietern temporarily deployed to test-trigger-is June 19, 2026 10:03 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants