Skip to content

Commit 5b4fb1a

Browse files
authored
Fix chart_schema.yaml import-values rule (#725)
The existing rule for validating dependency import-values worked well for either of these two cases: **1. Importing exports** ```yaml dependencies: - name: dep1 version: 0.14.1 repository: oci://myrepo import-values: - data ``` **2. Importing child values into the parent** ```yaml dependencies: - name: dep1 version: 0.14.1 repository: oci://myrepo import-values: - child: default.data parent: myimports ``` However, it failed on the following valid usecase: ```yaml dependencies: - name: dep1 version: 0.14.1 repository: oci://myrepo import-values: - data - child: default.data parent: myimports ``` Giving the following error: ``` dependencies.0.import-values.1: '{'parent': 'myimports', 'child': 'default.data'}' is not a str. dependencies.0.import-values.0 : 'data' is not a map ``` This is because the Yamale is validating on a list of strings *or* a list of `import-value`, where a list containing both is also valid. This commit changes the rule to allow both methods to be in the `import-values` list. Signed-off-by: Ben Lavery-Griffiths <ben@lavery-griffiths.com>
1 parent 5bde7c5 commit 5b4fb1a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

etc/chart_schema.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ dependency:
2929
condition: str(required=False)
3030
tags: list(str(), required=False)
3131
enabled: bool(required=False)
32-
import-values: any(list(str()), list(include('import-value')), required=False)
32+
import-values: list(any(str(), include('import-value')), required=False)
3333
alias: str(required=False)
3434
---
3535
import-value:

0 commit comments

Comments
 (0)