We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Operators can specify a string source value in the ReplacementTransformer rather than a path. For example:
ReplacementTransformer
replacements: - source: value: "http://[email protected]" target: objref: kind: Deployment name: source-controller fieldrefs: ["spec.template.spec.containers[name=manager].env[name=http_proxy].value%REPLACEMENT_HTTP_PROXY%"]
When this source value is an empty string, airshipctl panics:
replacements: - source: value: "" target: objref: kind: Deployment name: source-controller fieldrefs: ["spec.template.spec.containers[name=manager].env[name=http_proxy].value%REPLACEMENT_HTTP_PROXY%"]
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xbc799e] goroutine 1 [running]: opendev.org/airship/airshipctl/pkg/document/plugin/replacement.getValue(0xc000b62800, 0x98, 0x100, 0xc0003046c0, 0xd4a3a0, 0xc0004ab980, 0xd462e0) opendev.org/airship/airshipctl@/pkg/document/plugin/replacement/transformer.go:89 +0x4e opendev.org/airship/airshipctl/pkg/document/plugin/replacement.(*plugin).Filter(0xc0004ab980, 0xc000b62800, 0x98, 0x100, 0x0, 0x0, 0xd7f7b4, 0x32, 0x1556760) opendev.org/airship/airshipctl@/pkg/document/plugin/replacement/transformer.go:72 +0x9a main.main.func1(0xc0000ee5a0, 0x0) opendev.org/airship/airshipctl@/krm-functions/replacement-transformer/main.go:25 +0x7d sigs.k8s.io/kustomize/kyaml/fn/framework.execute(0xc0000ee5a0, 0xc000283b80, 0xc000224840, 0x15556f0, 0x0, 0x0, 0xc000297d08, 0xc000297d30) sigs.k8s.io/kustomize/[email protected]/fn/framework/framework.go:560 +0x128 sigs.k8s.io/kustomize/kyaml/fn/framework.Command.func1(0xc000224840, 0x15556f0, 0x0, 0x0, 0x0, 0x0) sigs.k8s.io/kustomize/[email protected]/fn/framework/framework.go:258 +0x8a github.com/spf13/cobra.(*Command).execute(0xc000224840, 0xc0000901b0, 0x0, 0x0, 0xc000224840, 0xc0000901b0) github.com/spf13/[email protected]/command.go:842 +0x460 github.com/spf13/cobra.(*Command).ExecuteC(0xc000224840, 0xc000283b80, 0xc000224840, 0xc00004e750) github.com/spf13/[email protected]/command.go:950 +0x349 github.com/spf13/cobra.(*Command).Execute(...) github.com/spf13/[email protected]/command.go:887 main.main() opendev.org/airship/airshipctl@/krm-functions/replacement-transformer/main.go:28 +0xed couldn't execute function: exit status 2
Steps To Reproduce Use an empty string as a source in a ReplacementTransformer.
Expected behavior Should be able to use an empty string as a replacement source without airshipctl panicking.
The text was updated successfully, but these errors were encountered:
assign to me
Sorry, something went wrong.
PS : https://review.opendev.org/c/airship/airshipctl/+/805085
5f9ddcc
gtsteffaniak
No branches or pull requests
Describe the bug
Operators can specify a string source value in the
ReplacementTransformer
rather than a path. For example:When this source value is an empty string, airshipctl panics:
Steps To Reproduce
Use an empty string as a source in a
ReplacementTransformer
.Expected behavior
Should be able to use an empty string as a replacement source without airshipctl panicking.
The text was updated successfully, but these errors were encountered: