Cherry-pick #18797 to 7.7: Fix panic on metricbeat test modules#18853
Merged
jsoriano merged 3 commits intoelastic:7.7from Jun 4, 2020
Merged
Cherry-pick #18797 to 7.7: Fix panic on metricbeat test modules#18853jsoriano merged 3 commits intoelastic:7.7from
metricbeat test modules#18853jsoriano merged 3 commits intoelastic:7.7from
Conversation
Since metricbeat light modules support processors (elastic#15923), module initialization requires a publisher in the beat so modules can attach their processors. `metricbeat test modules` is not initializing as normal metricbeat commands, and it is not initializing any output or publisher pipeline, so metricbeat panics when trying to initialize modules with the new method. This change adds a dummy publisher for this case, and fixes also a condition that was adding a `nil` module option, causing additional panics. A test that reproduced the issues is also added. (cherry picked from commit 25b8bf1)
ca0f2ae to
37ace56
Compare
Contributor
|
Pinging @elastic/integrations (Team:Integrations) |
ChrsMark
approved these changes
Jun 1, 2020
Co-authored-by: Steffen Siering <steffen.siering@elastic.co>
Member
Author
|
Nil pipeline was not available in 7.7 branch, backporting it from #16715. |
ChrsMark
approved these changes
Jun 3, 2020
Member
Author
|
jenkins run the tests please |
leweafan
pushed a commit
to leweafan/beats
that referenced
this pull request
Apr 28, 2023
…es` (elastic#18853) Since metricbeat light modules support processors (elastic#15923), module initialization requires a publisher in the beat so modules can attach their processors. `metricbeat test modules` is not initializing as normal metricbeat commands, and it is not initializing any output or publisher pipeline, so metricbeat panics when trying to initialize modules with the new method. This change adds a dummy publisher for this case, and fixes also a condition that was adding a `nil` module option, causing additional panics. A test that reproduced the issues is also added. (cherry picked from commit 316793d) Add nil pipeline from elastic#16715, required for the fix. (cherry picked from commit 257fdfc) Co-authored-by: Steffen Siering <steffen.siering@elastic.co>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick of PR #18797 to 7.7 branch. Original message:
What does this PR do?
Why is it important?
metricbeat test modulesis not working with modules defined in the main configuration file.Checklist
I have made corresponding changes to the documentationCHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.How to test this PR locally
Related issues