elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.77k stars 8.17k forks source link

[Fleet] Code coverage in pull request #137119

Open nchaulet opened 2 years ago

nchaulet commented 2 years ago

Description

There is a lot of code not covered by tests in Fleet (especially some public code where we want to add some unit tests), and having some code coverage metrics in our pull request will really help making progress their and avoid to remove some code coverage too.

@elastic/kibana-operations Do you think this is something that is doable? if it's help we are really interested in getting jest unit test coverage and looking at our jest config it seems it's already collected

elasticmachine commented 2 years ago

Pinging @elastic/fleet (Team:Fleet)

spalger commented 2 years ago

We've done some investigation of existing code coverage solutions and explored how they would work in PRs, but found that all of them would fail to work for us in one way or another. Jest unit test coverage is pretty easy to calculate locally, before and after a PR, but doing it in a way that applies to all PRs and has the appropriate baselines for all commits is even trickier. @brianseeders can probably speak to the things we've tried better than I, but he's out this week.

nchaulet commented 2 years ago

Yes I can imagine it's a pretty hard problem, maybe it's a dumb question but did we investigated to have something like custom reporting based on the Team label maybe?

rowlandgeoff commented 1 year ago

Hi @jen-huang & @nchaulet, on the Engineering Productivity Quality Frameworks team we're working on getting a SonarQube instance up. Meta ticket - https://github.com/elastic/cloud/issues/101634 Our estimate for when it'll be up & ready for usage is mid-November.

We've got this item on the roadmap for when Sonar is ready:

Assist Ingest org to use our instance for some elastic-agent* repos. Contacts are Julien Lind and Josh Dover.

Does that cover what you were looking for here?

cc @rhass

amitkanfer commented 1 year ago

https://github.com/elastic/cloud/issues/101634 Our estimate for when it'll be up & ready for usage is mid-November.

Hi @rowlandgeoff , would love to see if there's an update on this work. Thank you!

rowlandgeoff commented 1 year ago

elastic/cloud#101634 Our estimate for when it'll be up & ready for usage is mid-November.

Hi @rowlandgeoff , would love to see if there's an update on this work. Thank you!

@amitkanfer Thanks for asking. We had to shift our focus temporarily due to some k8s/serverless priorities, which put us behind the original schedule for Sonar. Sonar is almost ready to go, I'd estimate it'll be available mid-January.

rhass commented 1 year ago

Is this issue related to https://github.com/elastic/ingest-dev/issues/1502 at all? Or should we consider these separate requests?