Replace ambiguous 'table' terminology with user-friendly 'mapping'
language in coalesce warning messages. Users reported confusion about
what 'table' means in warnings like:
'destination for X is a table. Ignoring non-table value'
The term 'mapping' aligns with YAML terminology and makes the errors
more actionable for chart authors.
Fixes#11118
Signed-off-by: jeff <jfjrh2014@gmail.com>
// It's not clear if this condition can actually ever trigger.
printf("key %s is table. Skipping",key)
printf("key %s is a mapping. Skipping",key)
}else{
// TODO: Do we need to do any additional checking on the value?
dg[key]=val
@ -245,7 +245,7 @@ func coalesceValues(printf printFn, c chart.Charter, v map[string]any, prefix st
// If the original value is nil, there is nothing to coalesce, so we don't print
// the warning
ifval!=nil{
printf("warning: skipped value for %s.%s: Not a table.",subPrefix,key)
printf("warning: skipped value for %s.%s: destination is a mapping, but the provided value is not. Use a YAML map (key:value pairs) for this key.",subPrefix,key)
}
}else{
// If the key is a child chart, coalesce tables with Merge set to true
assert.Contains(t,warnings,"warning: skipped value for level1.level2.level3.boat: Not a table.")
assert.Contains(t,warnings,"warning: destination for level1.level2.level3.spear.tip is a table. Ignoring non-table value (true)")
assert.Contains(t,warnings,"warning: cannot overwrite table with non table for level1.level2.level3.spear.sail (map[cotton:true])")
assert.Contains(t,warnings,"warning: skipped value for level1.level2.level3.boat: destination is a mapping, but the provided value is not. Use a YAML map (key:value pairs) for this key.")
assert.Contains(t,warnings,"warning: destination for level1.level2.level3.spear.tip is a mapping. Ignoring non-mapping value (true)")
assert.Contains(t,warnings,"warning: cannot overwrite mapping with non-mapping value for level1.level2.level3.spear.sail (map[cotton:true])")