Files
kustomize/docs/bugs.md
2019-12-01 07:24:56 -08:00

1.5 KiB

Filing bugs

File issues as desired, but if you've found a problem with how kustomize build works, consider the following to improve response time.

A good report specifies

  • the output of kustomize version,
  • the input (the content of kustomization.yaml and any files it refers to),
  • the expected YAML output.

A great report is a bug reproduction test

kustomize has a simple test harness in the krusty package for specifying a kustomization's input and the expected output.

Copy one of those tests, e.g. this reusable custom transformer test, to a new test file (with a new foo_test.go name).

Insert the inputs you want to use, and run it like you'd run the reusable custom transformer test:

(cd api; go test -run TestReusableCustomTransformers ./krusty)

The output will demonstrate the bug or missing feature.

Record this output in the test file in a call to AssertActualEqualsExpected, per all the other tests in the krusty package. This makes the test pass, albeit with output demonstrating behavior you presumably want to change.

Send the new test in a PR, along with commentary (in the test) on what you'd prefer to see.

The person who fixes the bug then has a clear bug reproduction and a test to modify when the bug is fixed.

Any bug fix first requires a test demonstrating the bug (so we have permanent regression coverage), so if the bug reporter does this, it saves time and avoids misunderstandings.