Skip to content

Reproduce stale-published-content dashboard bug as acceptance test#5597

Open
denik wants to merge 13 commits into
mainfrom
denik/dashboard-published-bug
Open

Reproduce stale-published-content dashboard bug as acceptance test#5597
denik wants to merge 13 commits into
mainfrom
denik/dashboard-published-bug

Conversation

@denik

@denik denik commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Adds an acceptance test for the bug where a dashboard rename succeeds (PATCH) but the subsequent publish fails, leaving the user unable to recover by simply re-running deploy.

What the test shows:

  1. First deploy: dashboard created and published as "my dashboard"
  2. Second deploy (fault injected on POST /published): PATCH renames the draft to "my dashboard renamed" and bumps the remote etag, but publish fails. SaveState is only called on success, so state retains the pre-PATCH etag.
  3. Third deploy: detects state.etag ≠ remote.etag and errors with "dashboard has been modified remotely" — no API writes are attempted, so the stale published version ("my dashboard") is never updated.

Also includes:

  • testserver: bump dashboard etag on every PATCH (previously only bumped when SerializedDashboard changed), matching actual cloud behavior
  • Dashboard acceptance tests: replace generic ETAG regex replacements in test.toml with per-test add_repl.py calls so etag value changes are visible in diffs

denik added 5 commits June 14, 2026 08:32
Co-authored-by: Denis Bilenko <denis.bilenko@databricks.com>
… calls

Co-authored-by: Denis Bilenko <denis.bilenko@databricks.com>
Previously the fake workspace only bumped the etag when SerializedDashboard
changed. Cloud bumps it on every write. Update the test server and regenerate
the stale-content acceptance test output accordingly.

Co-authored-by: Isaac
SaveState is only called on success; the failing second deploy leaves state
with the pre-PATCH etag. The third deploy detects the etag mismatch and
errors with "modified remotely" instead of silently skipping publish.
Wrap the third deploy in errcode so the subsequent get/get-published calls
run and show the draft renamed while the published version is still stale.

Co-authored-by: Isaac
@github-actions

github-actions Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Approval status: pending

/acceptance/bundle/ - needs approval

22 files changed
Suggested: @shreyas-goenka
Also eligible: @pietern, @janniklasrose, @andrewnester, @anton-107, @lennartkats-db

/bundle/ - needs approval

Files: bundle/direct/dresources/all_test.go
Suggested: @shreyas-goenka
Also eligible: @pietern, @janniklasrose, @andrewnester, @anton-107, @lennartkats-db

General files (require maintainer)

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

  • @shreyas-goenka -- recent work in bundle/direct/dresources/, libs/testserver/, acceptance/bundle/resources/dashboards/simple/

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

@denik denik temporarily deployed to test-trigger-is June 14, 2026 16:02 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 14, 2026 16:02 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 14, 2026 16:12 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 14, 2026 16:12 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 14, 2026 16:14 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 14, 2026 16:14 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 14, 2026 16:18 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 14, 2026 16:18 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 14, 2026 16:21 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 14, 2026 16:21 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 14, 2026 16:31 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 14, 2026 16:31 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 14, 2026 16:37 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 14, 2026 16:37 — with GitHub Actions Inactive
@eng-dev-ecosystem-bot

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

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 39aa4fc

Run: 27514373116

Env 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 7 15 264 978 6:27
💚​ aws windows 7 15 266 976 11:13
💚​ aws-ucws linux 7 15 360 892 7:21
💚​ aws-ucws windows 7 15 362 890 12:29
💚​ azure linux 1 17 267 976 6:30
💚​ azure windows 1 17 269 974 11:04
💚​ azure-ucws linux 1 17 365 888 7:10
💚​ azure-ucws windows 1 17 367 886 12:48
💚​ gcp linux 1 17 263 979 7:32
💚​ gcp windows 1 17 265 977 11:46
22 interesting tests: 15 SKIP, 7 RECOVERED
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 💚​R 💚​R 💚​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/jobs/destroy_without_mgmtperms/with_permissions 💚​R 💚​R 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions 💚​R 💚​R 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 💚​R 💚​R 💚​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_endpoints/recreate 🙈​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/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/grants/select 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
Top 30 slowest tests (at least 2 minutes):
duration env testname
6:23 azure-ucws windows TestAccept
6:14 aws-ucws windows TestAccept
6:12 gcp windows TestAccept
6:11 aws windows TestAccept
5:59 azure windows TestAccept
4:25 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:06 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:57 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:33 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:27 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:23 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:17 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:16 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:14 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:06 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:00 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:00 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:56 aws linux TestAccept
2:55 azure linux TestAccept
2:52 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:51 gcp linux TestAccept
2:50 azure-ucws linux TestAccept
2:50 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:49 aws-ucws linux TestAccept
2:43 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:39 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:35 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:32 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:28 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:22 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct

…r DoUpdate

DoUpdate may mutate newState in place (e.g. etag) and server-generated fields
may change on every write. Update the test to compare DoUpdate's return value
against a fresh DoRead, and update remappedState to the post-update value so
the subsequent field checks stay consistent.

Co-authored-by: Isaac
@denik denik temporarily deployed to test-trigger-is June 14, 2026 20:02 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 14, 2026 20:02 — with GitHub Actions Inactive
Replace add_repl.py calls with direct echo in tests that run with
MSYS_NO_PATHCONV=1. When this env var is set, MSYS does not convert
Unix-style paths to Windows format before passing them to Python.exe,
causing the shebang invocation to fail with the wrong path. Direct
echo to ACC_REPLS avoids Python entirely and works on all platforms.

Co-authored-by: Denis Bilenko <denis.bilenko@databricks.com>
@denik denik temporarily deployed to test-trigger-is June 14, 2026 22:41 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 14, 2026 22:41 — 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