Kong / go-database-reconciler

Apache License 2.0
5 stars 3 forks source link

Result channel sometimes includes bogus events #120

Open rainest opened 2 months ago

rainest commented 2 months ago

Testing in the course of writing https://github.com/Kong/kubernetes-ingress-controller/pull/6131 found that the result channel sometimes gets phantom events with no content whatsoever.

I'm not entirely sure where these are coming from, as I couldn't find anything in the code section that sends to them that didn't at least set a static event action type string, and wasn't able to find any other paths somehow sending empty structs into it by watching the buffer in a debugger.

https://github.com/Kong/go-database-reconciler/pull/119 fixes the issue I was seeing where no real results were being sent, but I was still seeing some empty ones come through also.

It was easy enough to just discard these in KIC#6131 as a workaround, and it's quite possible that's sufficient given that we have no other expected consumers of the event channel unless we get around to carving out the deck legacy logger in https://github.com/Kong/go-database-reconciler/issues/22.