Skip to content

bundle: remove split config sync elements from every block - #6135

Closed
ilyakuz-db wants to merge 1 commit into
configsync/block-provenancefrom
configsync/block-scoped-removal
Closed

bundle: remove split config sync elements from every block#6135
ilyakuz-db wants to merge 1 commit into
configsync/block-provenancefrom
configsync/block-scoped-removal

Conversation

@ilyakuz-db

@ilyakuz-db ilyakuz-db commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Stack

PR What it does
1 #6117 Route each change to the one block that defines it
2 this PR Removing an element defined in several blocks deletes it from each
3 #6134 A key change is written as a key rewrite in every defining block

Each PR is based on the one above it and carries the acceptance tests for its own behaviour.

Changes

Removes a keyed list element that is defined in more than one YAML block from every block that defines it.

The parent PR routes each change to a single block, which is right for a field edit but cannot express this removal: a job task declared both at the top level and in a targets.<target> override has a part in each, and the merged element only disappears once both are gone. That case was therefore left unapplied. routeElement now returns one destination per defining block, and ApplyChangesToYAML already groups changes by file, so the patch layer is unchanged.

# "both" is defined in each block; remote deletes the task
 resources: {jobs: {j: {tasks:
-  - task_key: both
-      max_retries: 2
   - task_key: keep}}}                 # survives
 targets: {dev: {resources: {jobs: {j:
-      tasks:
-        - task_key: both
-            timeout_seconds: 30
+      tasks: []

Each destination gets its own copy of the change, because the ReplaceAdd reclassification for a field absent from the source rewrites the operation, and one block's rewrite must not leak into the next.

Why

Leaving the change unapplied was safe but never converged: the element stays in configuration after the user deleted it remotely, so every later sync re-reports the same removal. Deleting only the top-level half — the behaviour before the parent PR — was worse, since it orphaned the override half.

Tests

Two new directories, both failing on the parent commit and passing here:

  • split/keyed_remove — removes one task per block in one run (exactly those two go, beta survives), then removes the task defined in both blocks: task_key: both goes from 2 to 0 and the top-level keep task is untouched.
  • split/isolation — a structural change to a split element alongside an unrelated scalar edit on another resource, in the same run. The unrelated edit is applied regardless, so one harder change never stops the rest.

Review with git diff -w. The real change is +39/−14 in resolve.go; the rest of the raw line count is re-indentation from wrapping the existing body in a per-destination loop.

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Approval status: pending

/acceptance/bundle/ - needs approval

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

/bundle/ - needs approval

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

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

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 490a0da

Run: 30768921827

Env 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🔄​ aws linux 2 4 4 320 1072 4:28
💚​ aws windows 4 4 324 1070 6:19
💚​ azure linux 4 4 322 1071 4:25
💚​ azure windows 4 4 324 1069 6:31
💚​ gcp linux 1 5 321 1073 4:11
💚​ gcp windows 1 5 323 1071 6:23
10 interesting tests: 4 RECOVERED, 4 SKIP, 2 flaky
Test Name aws linux aws windows azure linux azure windows gcp linux gcp windows
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🔄​ TestFsCpDirToDirFileNotOverwritten 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p
🔄​ TestFsCpDirToDirFileNotOverwritten/uc-volumes_to_uc-volumes 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p
💚​ TestFetchRepositoryInfoAPI_FromRepo 💚​R 💚​R 💚​R 💚​R 🙈​S 🙈​S
💚​ TestFetchRepositoryInfoAPI_FromRepo/root 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/subdir 💚​R 💚​R 💚​R 💚​R
Top 3 slowest tests (at least 2 minutes):
duration env testname
5:21 gcp windows TestAccept
5:15 aws windows TestAccept
4:24 azure windows TestAccept

@ilyakuz-db
ilyakuz-db force-pushed the configsync/block-provenance branch from 7075667 to 8454025 Compare August 2, 2026 14:01
@ilyakuz-db
ilyakuz-db force-pushed the configsync/block-scoped-removal branch from 88ba6e6 to 2aca20d Compare August 2, 2026 14:01
@ilyakuz-db
ilyakuz-db force-pushed the configsync/block-provenance branch from 8454025 to f6b4d04 Compare August 2, 2026 14:46
@ilyakuz-db
ilyakuz-db force-pushed the configsync/block-scoped-removal branch from 2aca20d to af80453 Compare August 2, 2026 14:46
@ilyakuz-db
ilyakuz-db force-pushed the configsync/block-provenance branch from f6b4d04 to 7387cfe Compare August 2, 2026 18:53
@ilyakuz-db
ilyakuz-db force-pushed the configsync/block-scoped-removal branch 2 times, most recently from c7d2043 to add864c Compare August 2, 2026 19:15
@ilyakuz-db
ilyakuz-db force-pushed the configsync/block-provenance branch from 7387cfe to f8e1487 Compare August 2, 2026 19:58
@ilyakuz-db
ilyakuz-db force-pushed the configsync/block-scoped-removal branch from add864c to f1fc0e3 Compare August 2, 2026 19:58
@ilyakuz-db
ilyakuz-db force-pushed the configsync/block-provenance branch from f8e1487 to 3aaaf93 Compare August 2, 2026 21:52
@ilyakuz-db
ilyakuz-db force-pushed the configsync/block-scoped-removal branch from f1fc0e3 to 490a0da Compare August 2, 2026 21:52
@ilyakuz-db

Copy link
Copy Markdown
Contributor Author

Consolidated into #6138 — the stack is merged into a single PR with the same final tree.

@ilyakuz-db ilyakuz-db closed this Aug 3, 2026
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