kpt icon indicating copy to clipboard operation
kpt copied to clipboard

kpt substitutions not working for empty string value

Open milowe opened this issue 5 years ago • 1 comments

Expected behavior

Substitution picking up and using empty string value

Actual behavior

kpt cfg set fails with message that body must be of type string: "null" (This worked in version 0.37.1)

Information

kpt version 0.38.0

Steps to reproduce the behavior

This snippet would reproduce the error

    io.k8s.cli.setters.foo:
      type: string
      x-k8s-cli:
        setter:
          name: foo
          value: ""

    io.k8s.cli.substitutions.bar:
      x-k8s-cli:
        substitution:
          name: bar
          pattern: something.FOO
          values:
          - marker: FOO
            ref: '#/definitions/io.k8s.cli.setters.foo'

milowe avatar Mar 04 '21 13:03 milowe

Verified this is solved in 0.38.1

milowe avatar Mar 04 '21 14:03 milowe