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

Add multiple field support to change detect #2101

Merged
merged 1 commit into from
Nov 21, 2018
Merged

Conversation

nathanielc
Copy link
Contributor

@nathanielc nathanielc commented Nov 21, 2018

This change also updates to Go 1.11 and runs go fmt ./...

  • Rebased/mergable
  • Tests pass
  • CHANGELOG.md updated

@nathanielc nathanielc requested a review from desa November 21, 2018 16:45
@nathanielc nathanielc force-pushed the nc-change-detect branch 3 times, most recently from a2b2ec1 to 684ed75 Compare November 21, 2018 17:10
Copy link
Contributor

@desa desa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Just one question about the error log in the case where a field isn't found on the data.

for _, field := range n.d.Fields {
value, ok := curr[field]
if !ok {
n.diag.Error("Invalid field in change detect",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think that this might be a bit noisy? I'm imagining a case where you want to change detect on field_a or field_b, but 90% of the contains data that is written is for only field_a. Wont this create a log for every point that comes through (provided that there is no change detected each time?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. All nodes now have the .quiet option to tell them to not log anything. So I think it if fine to leave as the default then in that special case the user can explicitly quite the specific changeDetect node.

@nathanielc nathanielc merged commit ec22ea9 into master Nov 21, 2018
nathanielc added a commit that referenced this pull request Nov 21, 2018
Add multiple field support to change detect
@nathanielc nathanielc deleted the nc-change-detect branch November 21, 2018 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants