Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make validation errors easier to fix
Problem: the warnings don't give enough details about which values are problematic, only the name of the leaf key. This is all the more annoying when you have a chart depending on other charts. ``` mainchart | +- subchart1 +- subchart2 +- subchart3 ``` Here are some warnings I get before the change: ``` coalesce.go:199: warning: destination for credentials is a table. Ignoring non-table value coalesce.go:160: warning: skipped value for resources: Not a table. coalesce.go:160: warning: skipped value for googleSheetsServiceAccount: Not a table. coalesce.go:199: warning: destination for googleSheetsServiceAccount is a table. Ignoring non-table value coalesce.go:199: warning: destination for resources is a table. Ignoring non-table value [] coalesce.go:199: warning: destination for credentials is a table. Ignoring non-table value coalesce.go:199: warning: destination for credentials is a table. Ignoring non-table value coalesce.go:160: warning: skipped value for resources: Not a table. coalesce.go:160: warning: skipped value for googleSheetsServiceAccount: Not a table. ``` with fix: ``` coalesce.go:162: warning: skipped value for subchart1.resources: Not a table. coalesce.go:162: warning: skipped value for subchart2.googleSheetsServiceAccount: Not a table. coalesce.go:211: warning: destination for subchart3.aws.credentials is a table. Ignoring non-table value () coalesce.go:211: warning: destination for mainchart.subchart3.aws.credentials is a table. Ignoring non-table value () coalesce.go:211: warning: destination for mainchart.subchart2.googleSheetsServiceAccount is a table. Ignoring non-table value () coalesce.go:211: warning: destination for mainchart.subchart1.resources is a table. Ignoring non-table value ([]) coalesce.go:162: warning: skipped value for subchart1.resources: Not a table. coalesce.go:162: warning: skipped value for subchart2.googleSheetsServiceAccount: Not a table. coalesce.go:211: warning: destination for subchart3.aws.credentials is a table. Ignoring non-table value () ``` Signed-off-by: Damien Nozay <damiennozay+github@gmail.com> add tests Signed-off-by: Damien Nozay <damiennozay+github@gmail.com> (cherry picked from commit 65ec3d6)
- Loading branch information