Fix dashboard tests for Lakeview API behavior change#4640
Merged
Conversation
The server-side Lakeview API changed behavior in two ways:
1. `lakeview update` now returns the full `serialized_dashboard` in its
response, even when the update only changed other fields (e.g.
`display_name`). Previously it returned "{}".
2. `lakeview update` now clears fields not included in the request
(e.g. `warehouse_id`). Previously unspecified fields were preserved.
Both changes are consistent with a move from partial update (merge) to
full replace semantics on the Lakeview API's mutable fields.
Update acceptance tests, testserver, and integration test to match.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
|
Commit: dfe4e88
29 interesting tests: 9 FAIL, 7 KNOWN, 7 SKIP, 5 flaky, 1 BUG
Top 36 slowest tests (at least 2 minutes):
|
andrewnester
approved these changes
Mar 3, 2026
The testserver's DashboardUpdate now clears warehouse_id when not provided in the update request, matching the new Lakeview API behavior. Update expected output accordingly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
anton-107
reviewed
Mar 3, 2026
| if updateReq.WarehouseId != "" { | ||
| dashboard.WarehouseId = updateReq.WarehouseId | ||
| } | ||
| dashboard.WarehouseId = updateReq.WarehouseId |
Contributor
There was a problem hiding this comment.
Update dashboard API is using the PATCH semantics (see https://docs.databricks.com/api/workspace/lakeview/update). If the field is missing from the request the previous values should be left intact.
The generate/dashboard-inplace was failing in the original commit because of this, but I could not find: which local test was failing prior to this change?
Contributor
Author
There was a problem hiding this comment.
It doesn't have an update_mask field to select which fields to update though.
This testserver change aligns the local test with the remote observed behavior.
Collaborator
|
Commit: 3ef5948
69 interesting tests: 36 FAIL, 16 RECOVERED, 8 KNOWN, 4 flaky, 2 BUG, 2 MISS, 1 SKIP
Top 50 slowest tests (at least 2 minutes):
|
simonfaltum
added a commit
that referenced
this pull request
Apr 23, 2026
## Why Integration test nightlies (`cli-isolated-pr.yml`) have been red on every main run since 2026-04-02, when `#4899` temporarily disabled the trigger. The trigger was re-enabled in `#5034` and all accumulated failures surfaced at once. Nothing in any in-flight feature PR is to blame; this PR just clears the backlog so nightly signal goes green again. Two independent regressions: 1. The host-metadata cache (`#5011`) regenerated goldens for tests that run locally, but could not touch `Cloud=true, Local=false` suites. `acceptance/selftest/record_cloud/{pipeline-crud,workspace-file-io}` still expected the pre-cache `/.well-known/databricks-config` calls. 2. Lakeview server behavior now varies by cloud on workspace import. AWS staging includes `serialized_dashboard` in the updated fields; GCP production no longer clears `warehouse_id`. The exact-match assertions in `TestDashboardAssumptions_WorkspaceImport` fail differently on each cloud. ## Changes **Before:** `record_cloud` goldens include redundant `/.well-known/databricks-config` GETs; dashboard test hard-codes exact updated/deleted fields. **Now:** goldens regenerated against e2-dogfood (only diff is removal of the cached requests); dashboard assertions use `assert.Subset` so they tolerate cross-cloud drift but still fail on anything outside the known-allowed set. - `acceptance/selftest/record_cloud/pipeline-crud/output.txt`, `acceptance/selftest/record_cloud/workspace-file-io/output.txt`: rerun with `-update` under `CLOUD_ENV=aws` against e2-dogfood. Both terraform and direct variants produce identical output. - `integration/assumptions/dashboard_assumptions_test.go`: `etag` and `update_time` must appear in updated fields; `serialized_dashboard` is allowed; `warehouse_id` is the only allowed deletion. Comment points to the observed cross-cloud split so the next reader knows why. Follows the pattern of the previous Lakeview-behavior-change fix in `#4640`. ## Test plan - [x] `make checks` clean - [x] `make lint` clean (0 issues) - [x] `go test ./acceptance -run 'TestAccept/selftest/record_cloud/{workspace-file-io,pipeline-crud}'` passes against e2-dogfood (both terraform and direct variants) - [x] `go test ./integration/assumptions -run TestDashboardAssumptions_WorkspaceImport` passes against e2-dogfood - [ ] cli-isolated-pr.yml integration run on this branch comes back green
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.
Changes
The server-side Lakeview API changed behavior in two ways:
lakeview updatenow returns the fullserialized_dashboardin its response, even when the update only changed other fields (e.g.display_name). Previously it returned "{}".lakeview updatenow clears fields not included in the request (e.g.warehouse_id). Previously unspecified fields were preserved.Both changes are consistent with a move from partial update (merge) to full replace semantics on the Lakeview API's mutable fields.
Tests
Update acceptance tests, testserver, and integration test to match.