Skip to content

config-remote-sync: block-aware YAML indexing for tasks/clusters split across top-level and target blocks#5981

Draft
ilyakuz-db wants to merge 1 commit into
mainfrom
configsync-fix-type34-resources-parent
Draft

config-remote-sync: block-aware YAML indexing for tasks/clusters split across top-level and target blocks#5981
ilyakuz-db wants to merge 1 commit into
mainfrom
configsync-fix-type34-resources-parent

Conversation

@ilyakuz-db

@ilyakuz-db ilyakuz-db commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Changes

bundle config-remote-sync writes visual-authoring edits back to bundle YAML. When a job's tasks (or job_clusters, or a pipeline's clusters) are split across a top-level resources.* block and a targets.<t>.resources.* override block, the CLI merges them into one in-memory sequence — but each block is still patched independently in the YAML. The old code used the flat merged-sequence index, so edits landed on the wrong task/element, or on the wrong block, and sometimes hard-failed with parent path ... does not exist.

This makes indexing block-aware:

  • Convert the merged-sequence index to the element's block-local index, and only emit the targets.<t>.-prefixed candidate for elements that came from a target block.
  • Apply the same logic to positional (numeric) change paths, not just keyed ones — pipeline clusters diff by position because they register no key function.
  • Scope the add/remove index bookkeeping per block, so an op in one block no longer shifts indices in the other (this previously caused a wrong task in the target block to be silently deleted).

Why

config-remote-sync is used by in-workspace visual authoring. Editing a resource whose sequence is split between a top-level block and a target override is a common layout, and it either wrote to the wrong element or failed the whole sync.

Tests

Added acceptance tests covering every split-block case (job tasks, job clusters, pipeline clusters, multiple jobs, non-zero indices, cross-block removes and renames), run on both engines. The bug-exposing ones fail before the fix and pass after; the full config-remote-sync suite stays green.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: ce7c5f1

Run: 30025465447

Env 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 4 4 322 1069 5:53
💚​ aws windows 4 4 324 1067 5:04
💚​ azure linux 4 4 322 1068 6:16
💚​ azure windows 4 4 324 1066 4:34
💚​ gcp linux 1 5 321 1070 5:14
💚​ gcp windows 1 5 323 1068 4:33
8 interesting tests: 4 RECOVERED, 4 SKIP
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
💚​ 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
3:39 aws windows TestAccept
3:19 gcp windows TestAccept
3:14 azure windows TestAccept

@ilyakuz-db
ilyakuz-db force-pushed the configsync-fix-type34-resources-parent branch from 1ee0e47 to ce7c5f1 Compare July 23, 2026 16:30
@ilyakuz-db ilyakuz-db changed the title [DABs] config-remote-sync: handle replace/remove against a missing YAML parent or key config-remote-sync: block-aware YAML indexing for tasks/clusters split across top-level and target blocks Jul 23, 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