fix strategy: Merge for YAMLs in Glob sub-dirs - #383
Open
jonasbadstuebner wants to merge 1 commit into
Open
jonasbadstuebner wants to merge 1 commit into
jonasbadstuebner wants to merge 1 commit into
Conversation
Author
|
If you have any input on my changes, let me know and I'll try to address it. Maybe there are edge cases I didn't think about. |
jonasbadstuebner
marked this pull request as draft
September 18, 2026 22:52
jonasbadstuebner
force-pushed
the
dev/382
branch
from
September 18, 2026 23:05
92e6b45 to
81f6921
Compare
jonasbadstuebner
marked this pull request as ready for review
September 18, 2026 23:07
| createFile(t, source2Dir, "config1.yaml", "env: prod") // This should overwrite the env | ||
| createFile(t, source2Dir, "config2.yaml", "replicas: 5") // This should add a new field in the root directory of the glob pattern | ||
| createFile(t, filepath.Join(source2Dir, "config"), "config3.yaml", "replicas: 10") // This should add a new field in a subdirectory matched by the glob pattern | ||
| createFile(t, filepath.Join(source2Dir, "config"), "config4.yaml", "content: hello-world") // This should add a new file |
Author
There was a problem hiding this comment.
I added this test because the first iteration of my PR had a bug where if the target file would not exist, it would still have tried to merge the source file into it which lead to an error.
I think one more test case won't hurt.
Signed-off-by: Jonas Badstübner <jonas@jb.software>
jonasbadstuebner
force-pushed
the
dev/382
branch
from
September 18, 2026 23:11
81f6921 to
092ddbe
Compare
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.
With this change, YAML files in sub-directories are merged as well.
Before only the YAML files in the root directory of the Glob pattern were merged, which made the test pass, but is not an intuitive behaviour.
fixes #382