-
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
ytt silently skips yaml merge key #336
Comments
See tektoncd/pipeline#3794 as well. |
Hi @zhouhaibing089, I see that the version of ytt that you are using is v0.30.0. If you take a peek at the v0.31.0 release notes, you should see in that version we now support the merge operator.
then running
Let me know if this helps, and please feel free to reach out/respond if you have any further questions. |
Hey @zhouhaibing089, did @gcheadle-vmware's comment above help? |
Thanks @gcheadle-vmware. Without the modifications: $ ytt-new -f ./foo.yaml [10:50:16]
ytt: Error:
- __ytt_tpl2_start_node: expected key 'name' to not be specified again (unless 'yaml/map-key-override' annotation is added)
in <toplevel>
foo.yaml:25 | name: v1beta1 In my opinion, |
i would agree with @zhouhaibing089 for the case of plain yaml files. we recently, on develop branch, added feature to interpret certain yml files as regular yaml files so for those files i would imagine we should also relax duplicate key check. wdyt @jtigger? |
Yes: #324
A given YAML input is:
It's during that second step that With #324, files like the subject of this issue would not be evaluated as templates p.s. when generating output, |
This exact issue was also identified in #310. To keep things clear, let's close this issue as a duplicate. @zhouhaibing089 if you believe this is an error, please let us know. Thank you for reporting this, @zhouhaibing089. |
What steps did you take:
merge key is described here, however ytt silently ignores those special syntax.
What happened:
I have a yaml like below
foo.yaml
:You can see
&version
and!!merge <<: *version
. Then I runytt -f foo.yaml
, and no error reported, but the result YAML is incorrect:What did you expect:
I'd expect those merge key tags are preserved or expanded like below:
Anything else you would like to add:
None.
Environment:
ytt --version
): ytt version 0.30.0/etc/os-release
): osxThe text was updated successfully, but these errors were encountered: