Skip to content

[Metricbeat] Migrate Kubernetes state_deployment Metricset to use ReporterV2 interface#10961

Merged
sayden merged 9 commits intoelastic:masterfrom
sayden:migration/mb/reporterv2/kubernetes/state_deployment
Apr 3, 2019
Merged

[Metricbeat] Migrate Kubernetes state_deployment Metricset to use ReporterV2 interface#10961
sayden merged 9 commits intoelastic:masterfrom
sayden:migration/mb/reporterv2/kubernetes/state_deployment

Conversation

@sayden
Copy link
Copy Markdown
Contributor

@sayden sayden commented Feb 27, 2019

Refer to #10774 for more info

@sayden sayden added Metricbeat Metricbeat Team:Integrations Label for the Integrations team labels Feb 27, 2019
@sayden sayden self-assigned this Feb 27, 2019
@sayden sayden requested a review from a team as a code owner February 27, 2019 13:23
@sayden
Copy link
Copy Markdown
Contributor Author

sayden commented Mar 1, 2019

@sayden sayden added the review label Mar 1, 2019
Copy link
Copy Markdown
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check if final events are being correctly namespaced, having an update data.json will help.

@jsoriano jsoriano changed the title [Metricbeat] Migrate Kubernetes container Metricset to use ReporterV2 interface [Metricbeat] Migrate Kubernetes state_deployment Metricset to use ReporterV2 interface Mar 1, 2019
@sayden sayden added in progress Pull request is currently in progress. and removed review labels Mar 8, 2019
@sayden sayden force-pushed the migration/mb/reporterv2/kubernetes/state_deployment branch from f4834cf to 5b34853 Compare March 13, 2019 10:36
@sayden sayden requested a review from a team as a code owner March 13, 2019 10:44
@sayden
Copy link
Copy Markdown
Contributor Author

sayden commented Mar 13, 2019

jenkins, test this

@sayden
Copy link
Copy Markdown
Contributor Author

sayden commented Mar 13, 2019

@ruflin I'm missing something in this PR to generate the expected file with the new testing framework 😭

Nevermind: I placed test data in the wrong folder 😄

@sayden
Copy link
Copy Markdown
Contributor Author

sayden commented Mar 13, 2019

Error is related. Checking

@sayden sayden force-pushed the migration/mb/reporterv2/kubernetes/state_deployment branch from 12c0f36 to 485d0a6 Compare April 1, 2019 19:59
continue
}
t.Fatalf("key missing: %s", k)
t.Fatalf("check if fields are documented error: key missing '%s'", k)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ruflin I added this because the original message did not show very clearly what was failing and it took me a while to figure out (until I checked the error line in fact). I hope this is ok :)

Copy link
Copy Markdown
Contributor

@ruflin ruflin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@exekias Could you also have a look if the events still look as expected. Please ping me if you need an update on the new test framework and what we changed.

"replicas.unavailable": 0,
"replicas.updated": 1,
},
"jenkins@wise-lynx-jenkins": {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also had to add this two "expected" events that were missing when running tests. I don't understand how they weren't failing before 🤔

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fields exist in the test file so I assume it's correct 🤞

@sayden sayden added review and removed in progress Pull request is currently in progress. labels Apr 2, 2019
@sayden sayden requested a review from exekias April 2, 2019 14:14
@sayden
Copy link
Copy Markdown
Contributor Author

sayden commented Apr 2, 2019

I have added @exekias to review. Forgive me @exekias ! 😄 I think you have more knowledge about this module than any of us and this PR has been the "inspiration" to push the rest of the metricsets.

@exekias
Copy link
Copy Markdown
Contributor

exekias commented Apr 2, 2019

this may need a changelog entry?

@exekias
Copy link
Copy Markdown
Contributor

exekias commented Apr 2, 2019

I have added @exekias to review. Forgive me @exekias ! I think you have more knowledge about this module than any of us and this PR has been the "inspiration" to push the rest of the metricsets.

great work on bringing the module to the V2 API!

name, err := event.GetValue("name")
metricsetFields := event.MetricSetFields
name, err := metricsetFields.GetValue("name")
if err == nil {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just curious, do we need to deal with when err != nil here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was originally like this so I prefer to leave it

Copy link
Copy Markdown
Contributor

@ruflin ruflin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@exekias I don't think we need a changelog as it does not have any affect on the user.

"replicas.unavailable": 0,
"replicas.updated": 1,
},
"jenkins@wise-lynx-jenkins": {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fields exist in the test file so I assume it's correct 🤞

@sayden sayden merged commit 8de672e into elastic:master Apr 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Metricbeat Metricbeat review Team:Integrations Label for the Integrations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants