bundle: route config sync edits to the block that defines them - #6117
Closed
ilyakuz-db wants to merge 1 commit into
Closed
bundle: route config sync edits to the block that defines them#6117ilyakuz-db wants to merge 1 commit into
ilyakuz-db wants to merge 1 commit into
Conversation
Contributor
Approval status: pending
|
Collaborator
Integration test reportCommit: 3aaaf93
8 interesting tests: 4 RECOVERED, 4 SKIP
Top 3 slowest tests (at least 2 minutes):
|
ilyakuz-db
force-pushed
the
configsync/acc-split-list-baseline
branch
from
July 31, 2026 13:33
c6a5c96 to
711e1c7
Compare
ilyakuz-db
force-pushed
the
configsync/block-provenance
branch
from
July 31, 2026 13:33
12b54e7 to
ac0c041
Compare
ilyakuz-db
force-pushed
the
configsync/acc-split-list-baseline
branch
from
July 31, 2026 13:41
711e1c7 to
00635ac
Compare
ilyakuz-db
force-pushed
the
configsync/block-provenance
branch
from
July 31, 2026 13:41
ac0c041 to
388627d
Compare
ilyakuz-db
force-pushed
the
configsync/acc-split-list-baseline
branch
from
July 31, 2026 17:55
00635ac to
0d5de02
Compare
ilyakuz-db
force-pushed
the
configsync/block-provenance
branch
from
July 31, 2026 17:55
388627d to
0dec516
Compare
ilyakuz-db
force-pushed
the
configsync/acc-split-list-baseline
branch
from
July 31, 2026 19:16
0d5de02 to
3854cff
Compare
ilyakuz-db
force-pushed
the
configsync/block-provenance
branch
2 times, most recently
from
August 2, 2026 12:21
f957e06 to
7075667
Compare
ilyakuz-db
force-pushed
the
configsync/acc-split-list-baseline
branch
from
August 2, 2026 14:01
3854cff to
17c2439
Compare
ilyakuz-db
force-pushed
the
configsync/block-provenance
branch
from
August 2, 2026 14:01
7075667 to
8454025
Compare
ilyakuz-db
force-pushed
the
configsync/acc-split-list-baseline
branch
from
August 2, 2026 14:46
17c2439 to
269d3f2
Compare
ilyakuz-db
force-pushed
the
configsync/block-provenance
branch
2 times, most recently
from
August 2, 2026 18:53
f6b4d04 to
7387cfe
Compare
This was referenced Aug 2, 2026
ilyakuz-db
force-pushed
the
configsync/block-provenance
branch
from
August 2, 2026 19:58
7387cfe to
f8e1487
Compare
ilyakuz-db
changed the base branch from
configsync/acc-split-list-baseline
to
main
August 2, 2026 19:59
Co-authored-by: Isaac
ilyakuz-db
force-pushed
the
configsync/block-provenance
branch
from
August 2, 2026 21:52
f8e1487 to
3aaaf93
Compare
Contributor
Author
|
Consolidated into #6138 — the stack is merged into a single PR with the same final tree. |
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.
Stack
Each PR is based on the one above it and carries the acceptance tests for its own behaviour.
Problem
A resource's list field — a job's
tasksorjob_clusters, a pipeline'sclusters— can be defined in more than one physical YAML region: a top-levelresources.<type>.<name>.<list>block and atargets.<target>.resources…<list>override, either of which may live in its own included file. Loading merges those regions into one list, and keyed lists are also sorted by key, but on disk they stay separate regions that have to be edited independently.A remote change is expressed against the merged view, so
resolveSelectorsfound the element in the merged list andyamlFileIndexconverted the merged index to a physical one by counting elements that shareLocation().Fileand have a smallerLine. That has no notion of block: a top-level block and a target override in the same file are indistinguishable.FieldCandidatescompounded it by guessing — it emitted[path, "targets.<t>."+path], andpatch.gotried the top-level pointer first and fell back only on error, so a top-level block that happened to have an element at that index silently accepted the patch.config-remote-syncruns unattended: nobody reads its output or exit code, and it re-runs periodically. So a silently wrong write is the worst outcome — worse than leaving a change for the next run.Changes
New
bundle/configsync/blockindex.gorecovers the physical blocks and builds adyn.Location -> blockmapping.resolveSelectorsnow records the sequence elements a change path traverses, and each merged index is rewritten into the index inside the chosen block.yamlFileIndexis deleted.Selecting a target folds its overrides into the resources tree and drops the
targetssubtree, so the two regions are no longer distinguishable in the loaded configuration. They are recovered by parsing the contributing files again — the file list comes from the locations already on the merged tree, and each file is parsed directly withconfig.LoadFromBytes. Parsing the files rather than reloading through the mutator pipeline matters: the pipeline resolves includes, reports throughlogdiag, and executes the bundle'spreinitscript, none of which belongs to reading back a source location.preinitruns once per sync, as it did before this PR.How a destination gets picked:
max_retriesandtimeout_secondson the same task can go to different blocks;Locations()[0], which is the definition that won the merge and therefore the value that was deployed. Writing any other copy would leave the effective value unchanged;Index bookkeeping (
indicesToReplaceMap,indexOperations) is now scoped per block, so a removal in one block no longer shifts indices in another.Scope
This PR routes every change to one destination, which is the whole story for a field edit. Two cases need more than one destination and are the follow-ups in the stack above. Until #6135 lands, removing an element defined in several blocks is left unapplied: safe, but it never converges.
Tests
Four new directories under
acceptance/bundle/config-remote-sync/split/, sharing onetest.toml. Unlike the existing directories here they omitCloud = true, so they run against the in-process test server under both deployment engines and therefore execute in normal CI.Each fails on the parent commit and passes here:
keyed_edit— a task defined only in the target block, and a top-level task whose merged position differs from its position in the block. Before: the first appends a keyless- timeout_seconds: 111to the top-level block, and the next sync reportstasks[task_key='']: removefor the element it just created.keyed_twoblock— a task defined in both blocks: one field per block, one field set in both, plus a brand-new field. Before: the both-blocks field was written to the top-level copy while the target's value stayed in effect, so the edit silently did nothing.multifile— one target's override spread across two included files. Before: the edit went to the top-leveldatabricks.yml.positional— pipeline clusters, which diff by position rather than by key. Before: a field edit on the target-block cluster failed withparent path ... does not exist.All 21 pre-existing directories are byte-for-byte unchanged, including
job_multiple_tasks(edit/add/remove/rename on a single-block job — the evidence that the common path is unaffected) andmultiple_files(renames withdepends_onreferences across included files).