Open navidshaikh opened 4 years ago
Create a kafka source without sink and try describing it, it fails with runtime error as the nil check for Sink is missing:
Create kafka source
kn source kafka create mykafkasrc --servers my-cluster-kafka-bootstrap.kafka.svc:9092 --topics test-topic --consumergroup test-consumer-group
Describe it
kn source kafka describe mykafkasrc Name: mykafkasrc Namespace: default Age: 3h BootstrapServers: my-cluster-kafka-bootstrap.kafka.svc:9092 Topics: test-topic ConsumerGroup: test-consumer-group
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x134ad18]
goroutine 1 [running]: knative.dev/client-contrib/plugins/source-kafka/pkg/factories.writeSink(0x184c360, 0xc00042dc50, 0x0)
[...]
Error: exit status 2 Run 'kn --help' for usage
## Suggested fix: Check for nil value here https://github.com/knative/client-contrib/blob/49864fb4817d265b15564a4d43cd80bbd364db55/plugins/source-kafka/pkg/factories/rune_factory.go#L189
/assign
Create a kafka source without sink and try describing it, it fails with runtime error as the nil check for Sink is missing:
Steps to reproduce:
Create kafka source
Describe it
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x134ad18]
goroutine 1 [running]: knative.dev/client-contrib/plugins/source-kafka/pkg/factories.writeSink(0x184c360, 0xc00042dc50, 0x0)
[...]
Error: exit status 2 Run 'kn --help' for usage