-
Notifications
You must be signed in to change notification settings - Fork 7k
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>
- Loading branch information
Showing
2 changed files
with
108 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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