[Metricbeat] Migrate Ceph cluster_status to use ReporterV2 interface#10993
Conversation
17f7761 to
8f2df2b
Compare
There was a problem hiding this comment.
TestData needed to be skip. After migrating this code to use ReporterV2 interface, it seems that something is not working the same way and causes the test to fail 100% times in line #36 https://github.com/elastic/beats/pull/10993/files#diff-2b632f9f0d99e92969b3e092937d03dcR36
There was a problem hiding this comment.
Umm, what I am going to say can affect all these PRs 😬 but in modules migrated previously TestData was basically only these lines:
config := getConfig()
f := mbtest.NewReportingMetricSetV2(t, config)
err := mbtest.WriteEventsReporterV2(f, t, ".")
if err != nil {
t.Fatal("write", err)
}
The advantage is that nothing is really done (apart of instantiating the metricset) if no -data flag is provided. Also WriteEventsReporterV2 already does the check for errors and non empty events, so the lines failing here wouldn't be necessary.
I'd say to go back to this version without calling ReportingFetchV2 here.
There was a problem hiding this comment.
Good catch. @sayden Is there a reason we need the additional lines?
There was a problem hiding this comment.
I thought they were mandatory. This entire block was copy pasted from other modules that are already merged (outside of the scope of the migration). So my guess now is that they aren't necessary at all
There was a problem hiding this comment.
I don't mind about changing all opened PR's anyways. It just that it was written like this even in the "tutorial" that the community is using to help in the migration
There was a problem hiding this comment.
We can remove the ones that are giving problems or making us skip tests, and the rest we can remove later.
I am also removing the ones that are provoking merge conflicts in #7957
197f290 to
d10b530
Compare
|
Error in Windows Filebeat seems unrelated. Merging. |
Refer to #10774 for more info