Skip to content

[Metricbeat] Migrate Ceph cluster_status to use ReporterV2 interface#10993

Merged
sayden merged 8 commits intoelastic:masterfrom
sayden:migration/mb/reporterv2/ceph/cluster_status
Mar 7, 2019
Merged

[Metricbeat] Migrate Ceph cluster_status to use ReporterV2 interface#10993
sayden merged 8 commits intoelastic:masterfrom
sayden:migration/mb/reporterv2/ceph/cluster_status

Conversation

@sayden
Copy link
Copy Markdown
Contributor

@sayden sayden commented Feb 28, 2019

Refer to #10774 for more info

@sayden sayden added Metricbeat Metricbeat Team:Integrations Label for the Integrations team labels Feb 28, 2019
@sayden sayden self-assigned this Feb 28, 2019
@sayden sayden requested a review from a team as a code owner February 28, 2019 15:18
@sayden sayden force-pushed the migration/mb/reporterv2/ceph/cluster_status branch from 17f7761 to 8f2df2b Compare March 1, 2019 14:40
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.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

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.

Good catch. @sayden Is there a reason we need the additional lines?

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 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

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 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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

@sayden sayden force-pushed the migration/mb/reporterv2/ceph/cluster_status branch from 197f290 to d10b530 Compare March 6, 2019 14:58
@sayden
Copy link
Copy Markdown
Contributor Author

sayden commented Mar 7, 2019

Error in Windows Filebeat seems unrelated. Merging.

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

Labels

Metricbeat Metricbeat Team:Integrations Label for the Integrations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants