Fix config-remote-sync writing dashboard etag into YAML#5589
Open
ilyakuz-db wants to merge 1 commit into
Open
Conversation
Contributor
Approval status: pending
|
c9295ba to
74fe136
Compare
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.
74fe136 to
f4c45ef
Compare
Collaborator
Integration test reportCommit: f4c45ef
22 interesting tests: 15 SKIP, 7 KNOWN
Top 28 slowest tests (at least 2 minutes):
|
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
bundle config-remote-syncno longer writes the dashboardetagfield into bundle configuration when the remote etag drifts (e.g. someone opened or edited the dashboard draft in the workspace UI).Added
resources.dashboards.*.etagto the configsync skip table. This is an intentionally minimal fix; a follow-up PR migrates the whole table to the resource lifecycle metadata inresources.yml.Why
etagis output-only and never present in configuration. The deploy plan re-promotes etag drift toUpdateviaResourceDashboard.OverrideChangeDesc(required for deploy's modified-remotely detection), so configsync cannot rely on the plan'sSkipaction and must exclude the field explicitly. Without this,config-remote-sync --savehardcodes a stale etag into the dashboard YAML; the config then fails validation ("Etags must not be set in bundle configuration"), breaking subsequent deploys and evenbundle 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 vialakeview update(bumps the remote etag), and assertsconfig-remote-syncreports no changes and--saveleaves the YAML untouched. Before the fix the test reproduces the leak (etag: addreported and written todatabricks.yml). Also a unit test pinning the skip rule.Verified on a real workspace via the cloud acceptance run for
bundle/config-remote-sync.