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

Use GrokPatternRegistry to reload saved grok patterns #5982

Merged
merged 2 commits into from Jul 8, 2019

Conversation

@kmerz
Copy link
Member

commented May 31, 2019

Description

Prior to this change, a edit on a grok pattern did not
reflect on the used pattern in GrokExtractors

This change uses the GrokPatternRegistry which is
contains all grok patterns and is connected to the
cluster event bus and reloads when a grok pattern is
edit.

One test needed to be moved since it was testing the
grok pattern service which is not used anymore in the
GrokExtractor directly. There for the test was moved
to the MongoDbGrokPatternServiceTest where it belongs.

Fixes #5833

How Has This Been Tested?

  • Create a GrokExtractor with a GrokPattern
  • Edit GrokPattern and send a message to the input
  • Check that change on GrokPattern reflects the extractors work

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@kmerz kmerz added this to the 3.1.0 milestone May 31, 2019

@kmerz kmerz requested a review from bernd May 31, 2019

@bernd bernd self-assigned this Jul 1, 2019

@bernd
Copy link
Member

left a comment

Can you please remove the unrelated vendor-module-ids.json and yarn.lock diffs from the PR?
Apart from that, it looks good! 👍

kmerz added 2 commits May 31, 2019
Use GrokPatternRegistry to reload saved grok patterns
Prior to this change, a edit on a grok pattern did not
reflect on the used pattern in GrokExtractors

This change uses the GrokPatternRegistry which is
contains all grok patterns and is connected to the
cluster event bus and reloads when a grok pattern is
edit.

One test needed to be moved since it was testing the
grok pattern service which is not used anymore in the
GrokExtractor directly. There for the test was moved
to the MongoDbGrokPatternServiceTest where it belongs.

Fixes #5833

@kmerz kmerz force-pushed the issue-5833 branch from 4a532a0 to c625cd1 Jul 5, 2019

@bernd
bernd approved these changes Jul 8, 2019
Copy link
Member

left a comment

LGTM 👍 Good work!

@bernd bernd merged commit fbc37ed into master Jul 8, 2019

4 checks passed

ci-web-linter Jenkins build graylog-pr-linter-check 3844 has succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
graylog-project/pr Jenkins build graylog-project-pr-snapshot 4556 has succeeded
Details
license/cla Contributor License Agreement is signed.
Details

@bernd bernd deleted the issue-5833 branch Jul 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.