[Metricbeat] Migrate Kubernetes state_deployment Metricset to use ReporterV2 interface#10961
Conversation
|
Error in filebeat seems unrelated https://beats-ci.elastic.co/job/elastic+beats+pull-request+multijob-windows/5387/console |
jsoriano
left a comment
There was a problem hiding this comment.
Please check if final events are being correctly namespaced, having an update data.json will help.
metricbeat/module/kubernetes/state_deployment/state_deployment_test.go
Outdated
Show resolved
Hide resolved
f4834cf to
5b34853
Compare
|
jenkins, test this |
|
Nevermind: I placed test data in the wrong folder 😄 |
|
Error is related. Checking |
metricbeat/module/kubernetes/state_deployment/state_deployment.go
Outdated
Show resolved
Hide resolved
12c0f36 to
485d0a6
Compare
| continue | ||
| } | ||
| t.Fatalf("key missing: %s", k) | ||
| t.Fatalf("check if fields are documented error: key missing '%s'", k) |
There was a problem hiding this comment.
@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 :)
| "replicas.unavailable": 0, | ||
| "replicas.updated": 1, | ||
| }, | ||
| "jenkins@wise-lynx-jenkins": { |
There was a problem hiding this comment.
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 🤔
There was a problem hiding this comment.
The fields exist in the test file so I assume it's correct 🤞
|
this may need a changelog entry? |
| name, err := event.GetValue("name") | ||
| metricsetFields := event.MetricSetFields | ||
| name, err := metricsetFields.GetValue("name") | ||
| if err == nil { |
There was a problem hiding this comment.
just curious, do we need to deal with when err != nil here?
There was a problem hiding this comment.
It was originally like this so I prefer to leave it
| "replicas.unavailable": 0, | ||
| "replicas.updated": 1, | ||
| }, | ||
| "jenkins@wise-lynx-jenkins": { |
There was a problem hiding this comment.
The fields exist in the test file so I assume it's correct 🤞
Refer to #10774 for more info