kpt: kpt fn run corrupts long lines with trailing comment
kpt v0.27.0
To reproduce execute:
kpt fn run --image gcr.io/kpt-functions/no-op <<EOF
apiVersion: v1
kind: ConfigMap
metadata:
name: test
data:
somekey: '012345678901234567890123456789012345678901234567890123456789012345678901234' # x
EOF
The output will be
apiVersion: v1
kind: ConfigMap
metadata:
name: test
annotations:
config.kubernetes.io/path: 'configmap_test.yaml'
data:
somekey: >-
012345678901234567890123456789012345678901234567890123456789012345678901234# x
As you can see the white space before the comment has now become part of the value. If the value is one character shorter the output is not corrupted.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (12 by maintainers)
@yhrn We just had a new release v0.31.0. This issue is addressed in that.
Hey @yhrn , thanks for clarifying here. I unset the lineWidth limitation for the workaround now so functions keep arbitrarily long lines.
@prachirp @yhrn I tested it with kpt v0.30.1 and a go function image example. This issue doesn’t occur. It only happens with typescript sdks. So we will work on fixing that(io.ts).
cc @frankfarzan