GoogleCloudPlatform / GoogleCloudPlatform/k8s-stackdriver

Event is sent to SD even though newEvent.Count != oldEvent.Count+1

Open
#208 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.