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
kbld does not fully respect Block Chomping Indicator in manifest #178
Comments
I can confirm that this seems to be a regression that was introduced between |
Looks like this might be an issue with EDIT:
|
@mkurde Thank you for reporting this bug and @dsiebel thank you for digging into this. I was able to replicate this with the provided information. We did have quite a few dependency bumps in the 0.31.0 release which likely led to this regression. I'll mark this as We'd be open to a PR if either of you would like to dig into this, just let us know if you run into any issues/questions. |
im not sure i fully groked the issue. result is a valid yaml, though line folded (as example shows below ytt for example using a yaml library reads that yaml). is there particular yaml parser that does not understand that line folding? example:
|
hi @cppforlife, after some more work on our charts we discovered that the mentioned problem is not affecting kubernetes. The IDE still complains due to the wrapped line but kubernetes allow to apply the manifests. We can close the issue here. If that wrapping will become a problem in the future, I will reopen the issue. |
To add some additional notes:
|
What steps did you take:
kbld is the last step after rendering all my manifests in my deploy automation. Therefor, also manifests which do not have docker images are going through this process. I am working on Prometheus Alerting manifests and here is an example:
and the result after kbld:
The result is the same when the expression is in one line like
What happened:
Next to changes like order and indentation (which is still valid yaml) you see the
expr:
line. kbld converts the Block Chomping Indicator>-
into:
and formats the expression into one line except the last chars== 5
which are wrapped into the next line. This breaks yaml.As you can see, the description with the Block Chomping Indicator
|
is rendered perfectly fine. I can not use|
since it keeps the line breaks.Source: Stackoverflow
What did you expect:
I expect to get valid yaml out of kbld when I use any Block Chomping Indicator like
>-
. Either the given syntax is preserved or the expression is not wrapped and:
is returned.I won't be bother if the result is a still valid yaml since the original version with the
>-
syntax is purely used to improve the readability.Anything else you would like to add:
n/a
Environment:
kbld --version
):brew install vmware-tanzu/carvel/kbld
/etc/os-release
): macOSVote 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: