-
Notifications
You must be signed in to change notification settings - Fork 76
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
Long strings are marshalled to invalid YAML; incorrect line breaks inserted #68
Comments
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
There are plans to fork go-yaml which should allow this to be fixed in the newly forked repo. Kustomize has a similar issue open. |
v2 of go-yaml already exposes the option to change this behaviour. In fact, it was temporarily the default in v2.3 of that library, but the change was reverted at the request of the Kubernetes project in v2.4: go-yaml/yaml#670. This repo deliberately opted not to set it by default: #62 (comment). Consumers who want the behaviour change should call |
Thanks for the background @KnVerey So in @tomasaschan's original example above, it sounds like this would be a way to avoid wrapping:
It's sort of unfortunate how go-yaml implemented that option globally, as there doesn't appear to be a way to unset it or check its value even. At least |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
/remove-lifecycle rotten |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
When serializing an object that contains a very long string in its value, the resulting YAML has line breaks seemingly at random. This seems to be a bug in
gopkg.in/yaml.v2
that is fixed ingopkg.in/yaml.v3
, but discussions in #18 and #61 seem to imply that migrating is nontrivial.To reproduce, put the following in a file
repro_test.go
:then run
go mod init; go mod tidy; go test ./...
to see the v2 and k8s tests fail, but not v3:The text was updated successfully, but these errors were encountered: