Closed integrii closed 6 years ago
I explicitly take issue with this line on factory.go
line 44:
func (this *SinkFactory) Build(uri flags.Uri) (core.DataSink, error) {
In go, its best to return concrete types. Accept interfaces, but return concrete types. Because a interface was returned here, it became hard to return "nothing" in the case of an error. Because of that, the developer chose to return a nil
. Because a nil was returned, the code blew up somewhere.
Looking at the codebase now, it looks like this case is handled. I am assuming this was fixed in master but is not in the image for Heapster 1.5.2...
Description
It looks like when heapster went to startup, it was unable to setup a graphite sink, which resulted in an NPE.
I humbly suggest a quick review of this code in the stack trace to ensure that NPEs do not happen and errors are gracefully handled.
Output of
heapster --version
: