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 content pack extractor validation #2697

Merged
merged 3 commits into from Aug 16, 2016
Merged

Fix content pack extractor validation #2697

merged 3 commits into from Aug 16, 2016

Conversation

@edmundoa
Copy link
Member

@edmundoa edmundoa commented Aug 16, 2016

As described in #2663, applying content packs with a Grok or JSON extractors fail in the current master, as their target_field is empty but it is required in the code creating the extractors.

This PR fixes the validation of those extractors, and also adds a couple of cosmetic changes around it: corrects a typo in the logged error when the content pack could not be applied, and shows an error in the web interface if the content pack provided by the user could not be imported (i.e. is not valid JSON).

Fixes #2663.

edmundoa added 3 commits Aug 16, 2016
Grok and JSON extractors may create several fields, so the
`target_field` will be empty in those extractors.
When there is an error importing the content pack the user provided,
display an error message with some information about it. It also serves
as a way of getting feedback of the import operation.
@edmundoa edmundoa added this to the 2.1.0 milestone Aug 16, 2016
@joschi joschi self-assigned this Aug 16, 2016
@joschi joschi added the bug label Aug 16, 2016
@joschi
Copy link
Contributor

@joschi joschi commented Aug 16, 2016

LGTM. 👍

@joschi joschi merged commit de97f78 into master Aug 16, 2016
4 checks passed
4 checks passed
@garybot2
ci-server-integration Jenkins build graylog2-server-integration-pr 1281 has succeeded
Details
@garybot2
ci-web-linter Jenkins build graylog-pr-linter-check 764 has succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@joschi joschi deleted the issue-2663 branch Aug 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants