Skip to content

Commit 1174639

Browse files
committed
fix: Remove incorrect yaml.LiteralStyle from helm values write-back
This commit fixes a regression introduced between v0.14.0 and v0.17.0 where helm values files would be emptied or corrupted when using git write-back with helmvalues: target. The issue was caused by setting `Style: yaml.LiteralStyle` on the root MappingNode when initializing an empty helm values structure. The LiteralStyle is intended for scalar string values with block style (|), not for mapping nodes. This caused the YAML encoder to produce incorrect or empty output when marshaling the structure back to YAML. This regression affected users with multi-source applications using separate image-name and image-tag annotations with helmvalues write-back, resulting in their values files being deleted on update. Fixes: Regression between v0.14.0 and v0.17.0 Testing: All existing tests pass with this change
1 parent 39a37bf commit 1174639

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

pkg/argocd/update.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,6 @@ func marshalParamsOverride(app *v1alpha1.Application, originalData []byte) ([]by
498498
Kind: yaml.MappingNode,
499499
Tag: "!!map",
500500
Content: []*yaml.Node{},
501-
Style: yaml.LiteralStyle,
502501
},
503502
},
504503
}

0 commit comments

Comments
 (0)