-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type check private library data values #296
Comments
Notes on when schema warning/error happens: When the schema flag is enabled, and a schema is given in the root or in a private library, it is used as the base data values and type checked. |
Created this rough working diagram to map out how data values are processed https://miro.com/app/board/o9J_lRLsKNc=/ |
We split up this issue into three separate PRs
The current focus is to tackle the |
Reopening this since we are using this work to motivate the changes for #341 |
Currently the position of starlark structs does not exist. We will have to do some more thinking about what to do in this case. Update: we just report the position of a right side node so for Starlark structs that have no position, they just have no position reported. Lets tackle this work to add the position separately. |
ytt release v0.32.0 cut, closing this issue. |
As a Configuration Consumer using a private library
I want the set of data values supplied to the library to be subject to schema defined within the library.
so that when I misconfigure the library, I get specific, clear, and actionable feedback
Scenario 1: Declarative Schema-Conforming Data Value
Given ytt input that includes a private library
And that private library contains schema
And a data values document targeting the private library that conforms to schema
When I invoke
ytt
Then those data values are reflected in the evaluation of the private library
Scenario 2: Declarative Schema-Non-Conforming Data Value
Given ytt input that includes a private library
And that private library contains schema
And a data values document targeting the private library that does NOT conform to schema
When I invoke
ytt
Then I see a schema error message in the context of a library evaluation error
(all other files are identical from prior scenario)
Scenario 3: Programmatic Schema-Conforming Data Value
Given ytt input that includes a private library
And that private library contains schema
And a template in the root library supplies a data values document to the private library that conforms to the private library's schema
When I invoke
ytt
Then those data values are reflected in the evaluation of the private library
Scenario 4: Programmatic Schema-Non-Conforming Data Value
Given ytt input that includes a private library
And that private library contains schema
And a template in the root library supplies a data values document to the private library that does NOT conform to the private library's schema
When I invoke
ytt
Then I see a schema error message in the context of a library evaluation error
(all other files are identical from prior scenario)
Note: the above error output is inaccurate due to the
values.yml
reference which is non-existent. We think it wouldroot.yml
in this case but haven't verified, yet.The text was updated successfully, but these errors were encountered: