This repository was archived by the owner on Mar 9, 2021. It is now read-only.
Description 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
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
writeSink (dw , kafkaSource .Spec .Sink )
Reactions are currently unavailable
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:
Suggested fix:
Check for nil value here
client-contrib/plugins/source-kafka/pkg/factories/rune_factory.go
Line 189 in 49864fb