Skip to content

[DABs] config-remote-sync: handle replace/remove against a missing YAML parent or key#5981

Draft
ilyakuz-db wants to merge 4 commits into
mainfrom
configsync-fix-type34-resources-parent
Draft

[DABs] config-remote-sync: handle replace/remove against a missing YAML parent or key#5981
ilyakuz-db wants to merge 4 commits into
mainfrom
configsync-fix-type34-resources-parent

Conversation

@ilyakuz-db

Copy link
Copy Markdown
Contributor

Changes

bundle config-remote-sync failed to write a remote change back to YAML when the field's key or parent path was absent from the target file, with op replace ...: parent path /resources does not exist or key run_if does not exist and can not be replaced. The missing-parent creation retry only ran for add ops, so a replace or remove against an absent path hard-failed.

Now, when a replace can't find its target on any candidate path, it retries as an add (landing in the candidate whose parent exists, and creating a missing parent when needed); a remove whose target is already absent is a no-op.

Why

This case never worked since config-remote-sync shipped: edits to fields not yet present in the YAML (e.g. under a target override, or a task field like run_if) aborted the whole sync.

Tests

Table-driven unit test for applyChange covering the missing-/resources parent, missing-key, remove-no-op, and target-block-placement cases. Reverting the fix reproduces the exact production error strings. The full config-remote-sync acceptance suite passes unchanged.

@eng-dev-ecosystem-bot

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

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 8d8c8ad

Run: 29837041522

Env 🟨​KNOWN 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws-cli-is linux 4 4 314 1045 3:59
💚​ aws-cli-is windows 4 4 316 1043 3:39
💚​ azure-cli-is linux 4 4 314 1044 4:43
💚​ azure-cli-is windows 4 4 316 1042 4:24
🟨​ gcp-cli-is linux 3 1 4 313 1046 7:42
🟨​ gcp-cli-is windows 3 1 4 315 1044 6:55
8 interesting tests: 4 SKIP, 3 KNOWN, 1 RECOVERED
Test Name aws-cli-is linux aws-cli-is windows azure-cli-is linux azure-cli-is windows gcp-cli-is linux gcp-cli-is 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 🟨​K 🟨​K
🟨​ TestFetchRepositoryInfoAPI_FromRepo/root 💚​R 💚​R 💚​R 💚​R 🟨​K 🟨​K
🟨​ TestFetchRepositoryInfoAPI_FromRepo/subdir 💚​R 💚​R 💚​R 💚​R 🟨​K 🟨​K
Top 1 slowest tests (at least 2 minutes):
duration env testname
2:06 azure-cli-is windows TestAccept

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