Skip to content

Add acceptance test for inline serialized_dashboard - #6463

Open
Sankalp-Mittal wants to merge 14 commits into
mainfrom
sankalp-mittal/dashboards-serialized-inline
Open

Add acceptance test for inline serialized_dashboard#6463
Sankalp-Mittal wants to merge 14 commits into
mainfrom
sankalp-mittal/dashboards-serialized-inline

Conversation

@Sankalp-Mittal

Copy link
Copy Markdown
Collaborator

Adds an acceptance test proving that a dashboard whose serialized_dashboard is an inline YAML map (not a string) plans and deploys correctly, and records the create request. The inline map is sent to the API as a JSON string; both the direct and terraform engines produce identical output.

Follow-up from the #6105 discussion.

This pull request and its description were written by Isaac.

Prove that a dashboard whose serialized_dashboard is an inline YAML map
(not a string) plans and deploys correctly, and record that the map is
sent to the API as a JSON string. Both engines produce identical output.

Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Waiting for approval

Could not determine reviewers from git history.
Round-robin suggestion: @lennartkats-db

Eligible reviewers: @andrewnester, @anton-107, @denik, @janniklasrose, @lennartkats-db, @pietern, @shreyas-goenka

Suggestions based on git history. See OWNERS for ownership rules.

Sankalp-Mittal and others added 2 commits September 1, 2026 14:10
Deploy a dashboard whose serialized_dashboard is an inline YAML map, then
change a value inside the map and show the plan: the change is detected as
an update (not a recreate). Capture the update request the direct engine
sends, which serializes the inline map to a JSON string.

Co-authored-by: Isaac <no-reply@databricks.com>
Show the machine-readable plan (per engine) for the serialized_dashboard
change instead of recording the update request.

Co-authored-by: Isaac <no-reply@databricks.com>
Comment thread acceptance/bundle/resources/dashboards/serialized-inline/test.toml Outdated
Sankalp-Mittal and others added 3 commits September 1, 2026 18:34
The direct-engine destroy 404s on the injected stale GET and reports
"0 deleted" while terraform reports "1 deleted". That divergence is only
in the cleanup step, so route destroy output to a LOG file instead of
disabling the inherited stale-GET simulation.

Co-authored-by: Isaac <no-reply@databricks.com>
- Change the inline serialized_dashboard value with update_file.py, which
  asserts if the target text is missing instead of silently no-op-ing.
- Deploy the change and test the READPLAN matrix (in-memory vs saved plan);
  both send the same update request.
- Capture the direct-engine update request alongside the per-engine JSON plans.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Comment thread acceptance/bundle/resources/dashboards/change-serialized-inline/script Outdated
Comment thread acceptance/bundle/resources/dashboards/change-serialized-inline/script Outdated
Comment thread acceptance/bundle/resources/dashboards/change-serialized-inline/script Outdated
Comment thread acceptance/bundle/resources/dashboards/change-serialized-inline/script Outdated
Comment thread acceptance/bundle/resources/dashboards/serialized-inline/script Outdated
Comment thread acceptance/bundle/resources/dashboards/serialized-inline/script
Sankalp-Mittal and others added 8 commits September 1, 2026 19:56
- Use replace_ids.py instead of bundle summary + add_repl for the dashboard ID.
- Add the READPLAN matrix; the create request is identical in-memory and from
  a saved plan.

Co-authored-by: Isaac <no-reply@databricks.com>
Encode "update, not recreate" as an executable check instead of a prose comment.

Co-authored-by: Isaac <no-reply@databricks.com>
Drop the direct-only guard and record out.requests.$DATABRICKS_BUNDLE_ENGINE.txt
for both engines. This documents terraform's OUTPUT_ONLY-field echoing instead of
hiding it, following the repo's per-engine-file convention for divergent output.

Co-authored-by: Isaac <no-reply@databricks.com>
The direct plan dumped remote_state (etag, timestamps, and the API's
pretty-printed serialized_dashboard string), which a real workspace formats
differently than the local fake, breaking the cloud run. Project the golden to
just the resource action and the serialized_dashboard old/new diff; keep the
full plan in a tmp file for the READPLAN=1 deploy.

Co-authored-by: Isaac <no-reply@databricks.com>
The real Lakeview API pretty-prints serialized_dashboard and returns a
differently-shaped etag, which the recorded plan golden can't match on a real
workspace. Mark the test Cloud=false and drop the jq projection, dumping the
full plan again (stable against the local fake).

Co-authored-by: Isaac <no-reply@databricks.com>
The inherited MSYS_NO_PATHCONV=1 stops Git-Bash from converting a helper
script's own /c/... path when handing it to python3.exe, so replace_ids.py /
update_file.py / print_requests.py fail to open on Windows. These tests pass no
absolute paths to the CLI (print_requests.py uses the // form), so unset it.

Co-authored-by: Isaac <no-reply@databricks.com>
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