Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for missing update diff for first update event #345

Merged
merged 1 commit into from
Sep 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pkg/utils/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,13 @@ type diffReporter struct {
func (d diffReporter) exec(x, y interface{}) (string, bool) {
vx, err := parseJsonpath(x, d.field)
if err != nil {
// Happens when the fields were not set by the time event was issued, do not return in that case
log.Debugf("Failed to find value from jsonpath: %s, object: %+v. Error: %v", d.field, x, err)
return "", false
}

vy, err := parseJsonpath(y, d.field)
if err != nil {
log.Debugf("Failed to find value from jsonpath: %s, object: %+v, Error: %v", d.field, y, err)
return "", false
}

// treat <none> and false as same fields
Expand Down