[Metricbeat] Fix: mixed modules fail loading standard and light metricsets#15011
Merged
mtojek merged 6 commits intoelastic:masterfrom Dec 11, 2019
Merged
Conversation
jsoriano
reviewed
Dec 11, 2019
Member
jsoriano
left a comment
There was a problem hiding this comment.
Thanks for working on this! Just a suggestion on the modules info method renaming.
| MetricSets(module string) ([]string, error) | ||
| DefaultMetricSets(module string) ([]string, error) | ||
| MetricSets(r *Register, module string) ([]string, error) | ||
| DefaultMetricSets(r *Register, module string) ([]string, error) |
Member
There was a problem hiding this comment.
Many methods here start to need the main register, we may need to rethink this interface and the relation between module sources. But no need to address this in this PR.
Contributor
Author
There was a problem hiding this comment.
This is valid concern. I admit it took me a while to find the best solution for the moment (don't refactor half of the project). I'm afraid that it will be related with heavier refactoring.
jsoriano
approved these changes
Dec 11, 2019
mtojek
added a commit
to mtojek/beats
that referenced
this pull request
Dec 11, 2019
…csets (elastic#15011) * Prepare test case for mixed module * Ignore registered modules while loading light metricsets * Test case: fail on unregistered module * Fix: mage fmt * Fix: replace String with ...Info * Rename method to ModulesInfo() (cherry picked from commit 1769f67)
mtojek
added a commit
to mtojek/beats
that referenced
this pull request
Dec 11, 2019
…csets (elastic#15011) * Prepare test case for mixed module * Ignore registered modules while loading light metricsets * Test case: fail on unregistered module * Fix: mage fmt * Fix: replace String with ...Info * Rename method to ModulesInfo() (cherry picked from commit 1769f67)
This was referenced Dec 12, 2019
jsoriano
added a commit
that referenced
this pull request
Sep 18, 2020
On tests, loading any metricset from the AWS module is trying to load the billing metricset as light metricset, what fails. This shouldn't happen after #15011, but it is probably happening because on tests, not all metricsets are registered. billing metricset was refactored to a native implementation recently, in #20527. By now, remove billing from the list so tests can be executed.
jsoriano
added a commit
to jsoriano/beats
that referenced
this pull request
Sep 18, 2020
On tests, loading any metricset from the AWS module is trying to load the billing metricset as light metricset, what fails. This shouldn't happen after elastic#15011, but it is probably happening because on tests, not all metricsets are registered. billing metricset was refactored to a native implementation recently, in elastic#20527. By now, remove billing from the list so tests can be executed. (cherry picked from commit 43f9bbc)
jsoriano
added a commit
that referenced
this pull request
Sep 18, 2020
On tests, loading any metricset from the AWS module is trying to load the billing metricset as light metricset, what fails. This shouldn't happen after #15011, but it is probably happening because on tests, not all metricsets are registered. billing metricset was refactored to a native implementation recently, in #20527. By now, remove billing from the list so tests can be executed. (cherry picked from commit 43f9bbc)
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.
Issue: #14698
This PR adjusts current behavior of the metricbeat which fails initialization of mixed modules while loading standard and light metricsets.
Added two test cases.