GoogleCloudPlatform / GoogleCloudPlatform/k8s-stackdriver
Event is sent to SD even though newEvent.Count != oldEvent.Count+1
Open
- Dominant language
- Go
- Stars
- 409
- Forks
- 236
- Avg merge
- 2h 34m
- Merged PRs (30d)
- 9
Description
https://github.com/GoogleCloudPlatform/k8s-stackdriver/blob/c94c033cdd1854df3213fa9526e5e30dcf5c9470/event-exporter/sinks/stackdriver/sink.go#L101-L114
I'm trying to better understand the behavior when the watcher sends an `UPDATE` event.
As per my understanding of the comment, if the `newEvent.Count` is greater than 1 when compared to `oldEvent.Count` we *don't* want to send a `logEntry` to Stackdriver. However, the `if` block doesn't have a `return` statement to break out.
It looks like we are sending the `logEntry`/`newEvent` regardless of the count.
Is this the expected behavior?
Contributor guide
Assessment
This issue has not been assessed yet.