-
Notifications
You must be signed in to change notification settings - Fork 139
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
Schema not applied correctly in library when using library.with_data_values(). #563
Comments
@GrahamDumpleton noted:
Absolutely.
Yes: you case would be solved with #418. This won't be possible to do this with In the meantime, you've detailed a workaround (🙏🏻 ). @gcheadle-vmware noted a interesting variant that works for cases where you don't have authorship of the library and you're okay with leaking the name of the internal library:
ref: https://carvel.dev/ytt/docs/latest/ytt-data-values/#configuring-data-values-via-command-line-flags |
We have (yet another) very compelling use-case for implementing #418 — this is, in effect, a request for that feature. Within this flow, there is a bug — and I've pulled that aside in this issue: #566. @GrahamDumpleton, I believe you've got a workaround (or two), and we've got a more systemic solution. Is there anything beyond those two items you think we can do here to help? |
So what I understand is that you are saying my workaround to make it work is actually the bug and when that bug is fixed I will not be able to do what I want unless you separately implement #418. |
Yes. And that we'll ensure that we don't fix the bug until we provide the systemic solution. 👍🏻 And that we'll be doing both ASAP. |
What steps did you take and what happened:
Run:
This results in the error:
With the files created from the test, if you were instead to run:
In other words, directly process the files which are in the library, it works fine and produces:
Note that there is no
#@data/values
file in the library.Now run a second test where the only difference is that we add a
#@data/values
file to the library, but where it is only marked as such and has no actual values set:This time the test works and we get same output as when had processed the files in the library directly.
So in order for
library.with_data_values()
to work, you need to have a#@data/values
file present.Be warned though, that the data values file cannot actually have any values set in it, or you get an error again as seen with test:
Which again generates the error:
What did you expect:
Expect the following:
#@data/values
annotated file to get it to work.#@data/values
file sets values it should not error and the values passed tolibrary.with_data_values()
should me merged just like if--data-values-file
was used on the command line and it was overriding a data values file included with a set of YAML files where a library wasn't involved.Environment:
Vote on this request
This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.
👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"
We are also happy to receive and review Pull Requests if you want to help working on this issue.
The text was updated successfully, but these errors were encountered: