-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Metricbeat][Kubernetes] Remove repeated KSM metrics files #34617
[Metricbeat][Kubernetes] Remove repeated KSM metrics files #34617
Conversation
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
I'm a bit confused why we test this changes with
I also tried to make these tests to break with this change:
but without success. @constanca-m could you double check how we should verify these changes in this PR? I guess you need sth like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested the changes locally with go test -v ./...
(under a metricset directory) and works as expected.
Before merging could you document the details about the docs.plain
and ksm.v2.7.0.plain
files similarly with what you explain the PR description?
I tried to look for an appropriate file for that, but I couldn't find any yesterday. I will check today again and commit that change before merging. |
You are right, that's not the right command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the docs!
* Remove repeated test files.
What does this PR do?
state_*
metricset foldertestdata
.kubernetes/_meta/test
so they have a prefix that can be used withtestdata
.testdata
.Why is it important?
Updating kube state metrics files would require changing it in every
state_*
metricset. With one general folder, this will no longer be necessary.Description
Every
state_*
metricset required the KSM files to be insidetestdata
if running the testing functionTestDataFiles
. Changing theconfig.yml
file of each of these metricsets to set thepath
to one read folder:We no longer need to have multiple repeated files. Since the folder
kubernetes/_meta/test
had previous files in use, these files were renamed to include the extension.plain
. This is important as it allows us to use these files for two different testing functions:TestMetricSet
andTestDataFiles
(which requires a suffix,plain
).A new file was added to the
kubernetes/_meta/test
:docs.plain
. This file has the same content asksm.v2.7.0.plain
. It needs to be inside the folder, so thedata.json
file inside eachstate_*
metricset gets created (as of now, this file is generated from one that needs to have the namedocs.plain
).ksm.v2.7.0.plain
still exists, so we know the metrics of that KSM version.docs.plain
should therefore be updated to be compatible with a version we support.Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
state_*_test
file.Related issues