Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Kyaml converts multiline scalars to single lines #4066

Closed
natasha41575 opened this issue Jul 14, 2021 · 2 comments · Fixed by #4069
Closed

Kyaml converts multiline scalars to single lines #4066

natasha41575 opened this issue Jul 14, 2021 · 2 comments · Fixed by #4069
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@natasha41575
Copy link
Contributor

A round trip in kyaml converts the following:

apiVersion: custom
kind: Custom
metadata:
  name: my-resource
spec:
  validation:
    openAPIV3Schema:
      description: CanonicalService is the Schema for the canonicalservices API
      properties:
        apiVersion:
          description: 'APIVersion defines the versioned schema of this representation
            of an object. Servers should convert recognized schemas to the latest
            internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
          type: string
        kind:
          description: 'Kind is a string value representing the REST resource this
            object represents. Servers may infer this from the endpoint the client
            submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
          type: string

into

apiVersion: custom
kind: Custom
metadata:
  name: my-resource
spec:
  validation:
    openAPIV3Schema:
      description: CanonicalService is the Schema for the canonicalservices API
      properties:
        apiVersion:
          description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
          type: string
        kind:
          description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
          type: string

This resource is a snippet taken from here. The line breaks in the description fields are lost.

If this is an issue with go-yaml, we should make the fix in our fork and also file an issue/PR to go-yaml upstream.

@natasha41575 natasha41575 added the kind/bug Categorizes issue or PR as related to a bug. label Jul 14, 2021
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jul 14, 2021
@natasha41575
Copy link
Contributor Author

cc @phanimarupaka

@natasha41575 natasha41575 self-assigned this Jul 14, 2021
@natasha41575 natasha41575 added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Jul 14, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jul 14, 2021
@natasha41575 natasha41575 reopened this Jul 14, 2021
@natasha41575
Copy link
Contributor Author

Filed go-yaml/yaml#765 upstream along with a PR go-yaml/yaml#766.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants