Skip to content

Fix config-remote-sync writing dashboard etag into YAML#5589

Open
ilyakuz-db wants to merge 1 commit into
mainfrom
configsync-skip-dashboard-etag
Open

Fix config-remote-sync writing dashboard etag into YAML#5589
ilyakuz-db wants to merge 1 commit into
mainfrom
configsync-skip-dashboard-etag

Conversation

@ilyakuz-db

Copy link
Copy Markdown
Contributor

Changes

bundle config-remote-sync no longer writes the dashboard etag field into bundle configuration when the remote etag drifts (e.g. someone opened or edited the dashboard draft in the workspace UI).

Added resources.dashboards.*.etag to the configsync skip table. This is an intentionally minimal fix; a follow-up PR migrates the whole table to the resource lifecycle metadata in resources.yml.

Why

etag is output-only and never present in configuration. The deploy plan re-promotes etag drift to Update via ResourceDashboard.OverrideChangeDesc (required for deploy's modified-remotely detection), so configsync cannot rely on the plan's Skip action and must exclude the field explicitly. Without this, config-remote-sync --save hardcodes a stale etag into the dashboard YAML; the config then fails validation ("Etags must not be set in bundle configuration"), breaking subsequent deploys and even bundle destroy, and leaves CI/state/remote permanently inconsistent.

Tests

New acceptance test acceptance/bundle/config-remote-sync/dashboard_etag (local + cloud, both engines): deploys a dashboard, simulates an out-of-band modification via lakeview update (bumps the remote etag), and asserts config-remote-sync reports no changes and --save leaves the YAML untouched. Before the fix the test reproduces the leak (etag: add reported and written to databricks.yml). Also a unit test pinning the skip rule.

Verified on a real workspace via the cloud acceptance run for bundle/config-remote-sync.

@github-actions

Copy link
Copy Markdown
Contributor

Approval status: pending

/acceptance/bundle/ - needs approval

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

/bundle/ - needs approval

Files: bundle/configsync/defaults.go, bundle/configsync/diff_test.go
Suggested: @janniklasrose
Also eligible: @denik, @pietern, @andrewnester, @shreyas-goenka, @anton-107, @lennartkats-db

General files (require maintainer)

Files: NEXT_CHANGELOG.md
Based on git history:

  • @simonfaltum -- recent work in ./

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

The deploy plan promotes dashboard etag drift to an Update action via
ResourceDashboard.OverrideChangeDesc so that out-of-band modifications
are detected during deploy. config-remote-sync consumed that plan entry
and, since etag is never present in config, classified it as an add,
writing the output-only etag field into the user's databricks.yml with
--save. The resulting config then fails validation (etags must not be
set in bundle configuration).

Skip the etag field explicitly in configsync's server-side defaults and
add an acceptance test that bumps the remote etag out of band and
verifies config-remote-sync reports no changes and --save leaves the
config untouched.
@ilyakuz-db ilyakuz-db force-pushed the configsync-skip-dashboard-etag branch from c9295ba to 74fe136 Compare June 12, 2026 20:27
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.

1 participant