-
Notifications
You must be signed in to change notification settings - Fork 136
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
duplicate key check in plain yamls #310
Comments
Hello @mhubig We do have another open issue with the same ask #299 but in your case, it is causing a panic because the file is marked as plain YAML and |
ytt does support merge. can be demonstrated by following that works successfully+correctly:
the underlying problem here is that ytt is strict about setting same key in a map twice (there is a flag to control that feature i think we need to think hard about what kind of functionality we want to have for this. for example, should we do something similar to what we are planning to do with unknown comments (disable that check for plain yaml files -- non ytt templates). |
For this issue, we would like to make a couple of improvements here:
As @cppforlife mentioned, we should think more about the functionality that we want for plain yaml vs ytt templates. |
FWIW, at least in this specific Tekton case, this was resolved for users on the source side: tektoncd/pipeline#3842 |
Idea:
Example: $ ytt -f plain.yml -f template.yml --file-mark 'plain.yml:options=implicit-map-key-overrides` |
Looking deeper, other YAML processing tools override keys, implicitly. In This is the approach we took in #550. That work is done and will be included in the next release. 👍🏻 |
ytt crashes when running against the current tekton release:
I think this is because of the strange merge syntax within the manifest:
Environment:
ytt --version
): 0.31.0/etc/os-release
): macOS Big Sur (11.2.1)The text was updated successfully, but these errors were encountered: