[DABs] config-remote-sync: handle replace/remove against a missing YAML parent or key#5981
Draft
ilyakuz-db wants to merge 4 commits into
Draft
[DABs] config-remote-sync: handle replace/remove against a missing YAML parent or key#5981ilyakuz-db wants to merge 4 commits into
ilyakuz-db wants to merge 4 commits into
Conversation
Collaborator
Integration test reportCommit: 8d8c8ad
8 interesting tests: 4 SKIP, 3 KNOWN, 1 RECOVERED
Top 1 slowest tests (at least 2 minutes):
|
…x block-aware (revert patch.go fallback)
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-syncfailed to write a remote change back to YAML when the field's key or parent path was absent from the target file, withop replace ...: parent path /resources does not existorkey run_if does not exist and can not be replaced. The missing-parent creation retry only ran foraddops, so areplaceorremoveagainst an absent path hard-failed.Now, when a
replacecan't find its target on any candidate path, it retries as anadd(landing in the candidate whose parent exists, and creating a missing parent when needed); aremovewhose 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
applyChangecovering the missing-/resourcesparent, missing-key, remove-no-op, and target-block-placement cases. Reverting the fix reproduces the exact production error strings. The fullconfig-remote-syncacceptance suite passes unchanged.