You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by Iñigo Goiri <el...@gmail.com> on 2022/11/23 19:29:58 UTC

Code coverage report on github PRs

Now that we are using mostly GitHub PRs for the reviews and we have decent
integration for the builds etc there, I was wondering about code coverage
and reporting.
Is code coverage setup at all?
Does this come from the INFRA team?
What would it take to enable it otherwise?

Re: Code coverage report on github PRs

Posted by Wilfred Spiegelenburg <wi...@apache.org>.
Ayush,

For YuniKorn we have codecov working. We did have to make some minor
changes to get that done.
It is all github action driven [1]. The action is approved for Apache repos.

The first thing is that we asked INFRA to get the codecov app added to our
repos [2].
Beside that to get codecov working for our go code it was pretty straight
forward. In the build for the repositories we generate code coverage data
using the standard go tool and write it to a file. I am not sure how to
generate the test reports from the java, but codecov has some examples for
that.

The codecov action picks up the file, uploads it and gets it processed. To
see the PR code coverage changes we run this for PRs and commit to our
master branch [3]. Codecov automatically generates the reports based on
those two points.

Wilfred

[1] https://github.com/codecov/codecov-action
[2] https://issues.apache.org/jira/browse/INFRA-20641
[3]
https://github.com/apache/yunikorn-core/blob/master/.github/workflows/main.yml


On Fri, 25 Nov 2022 at 00:44, Ayush Saxena <ay...@gmail.com> wrote:

> I tried to explore a bit more about codecov and tried to set that up in my
> local fork by allowing access and adding the Github Action in the yaml
> file(& lots of follow up fixes), I think it needs the tests as well to be
> executed as part of the github workflow, which we don't do, or there is
> some catch which I missed, need to further explore.
>
> Reading the doc[1], if not via github action it requires some token(Step:
> 2), I quickly went through the archives and found a ticket regarding the
> same by Spark folks in the past[2], guess they couldn't get that sorted.
>
> Need to explore a bit more, or get pointers from folks who have more
> experience around this.
>
> -Ayush
>
> [1] https://docs.codecov.com/docs
> [2] https://issues.apache.org/jira/browse/INFRA-12640
>
> On Thu, 24 Nov 2022 at 02:07, Wei-Chiu Chuang <we...@cloudera.com>
> wrote:
>
> > I believe most of them can be added by us using GitHub Workflow. There's
> a
> > marketplace for these tools and most of them are free for open source
> > projects.
> >
> > On Wed, Nov 23, 2022 at 11:43 AM Ayush Saxena <ay...@gmail.com>
> wrote:
> >
> >> A simple Infra ticket I suppose should get it done for us, eg.
> >> https://issues.apache.org/jira/browse/INFRA-23561
> >>
> >> -Ayush
> >>
> >> On Thu, 24 Nov 2022 at 01:00, Iñigo Goiri <el...@gmail.com> wrote:
> >>
> >> > Now that we are using mostly GitHub PRs for the reviews and we have
> >> decent
> >> > integration for the builds etc there, I was wondering about code
> >> coverage
> >> > and reporting.
> >> > Is code coverage setup at all?
> >> > Does this come from the INFRA team?
> >> > What would it take to enable it otherwise?
> >> >
> >>
> >
>

Re: Code coverage report on github PRs

Posted by Wilfred Spiegelenburg <wi...@apache.org>.
Ayush,

For YuniKorn we have codecov working. We did have to make some minor
changes to get that done.
It is all github action driven [1]. The action is approved for Apache repos.

The first thing is that we asked INFRA to get the codecov app added to our
repos [2].
Beside that to get codecov working for our go code it was pretty straight
forward. In the build for the repositories we generate code coverage data
using the standard go tool and write it to a file. I am not sure how to
generate the test reports from the java, but codecov has some examples for
that.

The codecov action picks up the file, uploads it and gets it processed. To
see the PR code coverage changes we run this for PRs and commit to our
master branch [3]. Codecov automatically generates the reports based on
those two points.

Wilfred

[1] https://github.com/codecov/codecov-action
[2] https://issues.apache.org/jira/browse/INFRA-20641
[3]
https://github.com/apache/yunikorn-core/blob/master/.github/workflows/main.yml


On Fri, 25 Nov 2022 at 00:44, Ayush Saxena <ay...@gmail.com> wrote:

> I tried to explore a bit more about codecov and tried to set that up in my
> local fork by allowing access and adding the Github Action in the yaml
> file(& lots of follow up fixes), I think it needs the tests as well to be
> executed as part of the github workflow, which we don't do, or there is
> some catch which I missed, need to further explore.
>
> Reading the doc[1], if not via github action it requires some token(Step:
> 2), I quickly went through the archives and found a ticket regarding the
> same by Spark folks in the past[2], guess they couldn't get that sorted.
>
> Need to explore a bit more, or get pointers from folks who have more
> experience around this.
>
> -Ayush
>
> [1] https://docs.codecov.com/docs
> [2] https://issues.apache.org/jira/browse/INFRA-12640
>
> On Thu, 24 Nov 2022 at 02:07, Wei-Chiu Chuang <we...@cloudera.com>
> wrote:
>
> > I believe most of them can be added by us using GitHub Workflow. There's
> a
> > marketplace for these tools and most of them are free for open source
> > projects.
> >
> > On Wed, Nov 23, 2022 at 11:43 AM Ayush Saxena <ay...@gmail.com>
> wrote:
> >
> >> A simple Infra ticket I suppose should get it done for us, eg.
> >> https://issues.apache.org/jira/browse/INFRA-23561
> >>
> >> -Ayush
> >>
> >> On Thu, 24 Nov 2022 at 01:00, Iñigo Goiri <el...@gmail.com> wrote:
> >>
> >> > Now that we are using mostly GitHub PRs for the reviews and we have
> >> decent
> >> > integration for the builds etc there, I was wondering about code
> >> coverage
> >> > and reporting.
> >> > Is code coverage setup at all?
> >> > Does this come from the INFRA team?
> >> > What would it take to enable it otherwise?
> >> >
> >>
> >
>

Re: Code coverage report on github PRs

Posted by Ayush Saxena <ay...@gmail.com>.
I tried to explore a bit more about codecov and tried to set that up in my
local fork by allowing access and adding the Github Action in the yaml
file(& lots of follow up fixes), I think it needs the tests as well to be
executed as part of the github workflow, which we don't do, or there is
some catch which I missed, need to further explore.

Reading the doc[1], if not via github action it requires some token(Step:
2), I quickly went through the archives and found a ticket regarding the
same by Spark folks in the past[2], guess they couldn't get that sorted.

Need to explore a bit more, or get pointers from folks who have more
experience around this.

-Ayush

[1] https://docs.codecov.com/docs
[2] https://issues.apache.org/jira/browse/INFRA-12640

On Thu, 24 Nov 2022 at 02:07, Wei-Chiu Chuang <we...@cloudera.com> wrote:

> I believe most of them can be added by us using GitHub Workflow. There's a
> marketplace for these tools and most of them are free for open source
> projects.
>
> On Wed, Nov 23, 2022 at 11:43 AM Ayush Saxena <ay...@gmail.com> wrote:
>
>> A simple Infra ticket I suppose should get it done for us, eg.
>> https://issues.apache.org/jira/browse/INFRA-23561
>>
>> -Ayush
>>
>> On Thu, 24 Nov 2022 at 01:00, Iñigo Goiri <el...@gmail.com> wrote:
>>
>> > Now that we are using mostly GitHub PRs for the reviews and we have
>> decent
>> > integration for the builds etc there, I was wondering about code
>> coverage
>> > and reporting.
>> > Is code coverage setup at all?
>> > Does this come from the INFRA team?
>> > What would it take to enable it otherwise?
>> >
>>
>

Re: Code coverage report on github PRs

Posted by Ayush Saxena <ay...@gmail.com>.
I tried to explore a bit more about codecov and tried to set that up in my
local fork by allowing access and adding the Github Action in the yaml
file(& lots of follow up fixes), I think it needs the tests as well to be
executed as part of the github workflow, which we don't do, or there is
some catch which I missed, need to further explore.

Reading the doc[1], if not via github action it requires some token(Step:
2), I quickly went through the archives and found a ticket regarding the
same by Spark folks in the past[2], guess they couldn't get that sorted.

Need to explore a bit more, or get pointers from folks who have more
experience around this.

-Ayush

[1] https://docs.codecov.com/docs
[2] https://issues.apache.org/jira/browse/INFRA-12640

On Thu, 24 Nov 2022 at 02:07, Wei-Chiu Chuang <we...@cloudera.com> wrote:

> I believe most of them can be added by us using GitHub Workflow. There's a
> marketplace for these tools and most of them are free for open source
> projects.
>
> On Wed, Nov 23, 2022 at 11:43 AM Ayush Saxena <ay...@gmail.com> wrote:
>
>> A simple Infra ticket I suppose should get it done for us, eg.
>> https://issues.apache.org/jira/browse/INFRA-23561
>>
>> -Ayush
>>
>> On Thu, 24 Nov 2022 at 01:00, Iñigo Goiri <el...@gmail.com> wrote:
>>
>> > Now that we are using mostly GitHub PRs for the reviews and we have
>> decent
>> > integration for the builds etc there, I was wondering about code
>> coverage
>> > and reporting.
>> > Is code coverage setup at all?
>> > Does this come from the INFRA team?
>> > What would it take to enable it otherwise?
>> >
>>
>

Re: Code coverage report on github PRs

Posted by Wei-Chiu Chuang <we...@cloudera.com.INVALID>.
I believe most of them can be added by us using GitHub Workflow. There's a
marketplace for these tools and most of them are free for open source
projects.

On Wed, Nov 23, 2022 at 11:43 AM Ayush Saxena <ay...@gmail.com> wrote:

> A simple Infra ticket I suppose should get it done for us, eg.
> https://issues.apache.org/jira/browse/INFRA-23561
>
> -Ayush
>
> On Thu, 24 Nov 2022 at 01:00, Iñigo Goiri <el...@gmail.com> wrote:
>
> > Now that we are using mostly GitHub PRs for the reviews and we have
> decent
> > integration for the builds etc there, I was wondering about code coverage
> > and reporting.
> > Is code coverage setup at all?
> > Does this come from the INFRA team?
> > What would it take to enable it otherwise?
> >
>

Re: Code coverage report on github PRs

Posted by Wei-Chiu Chuang <we...@cloudera.com.INVALID>.
I believe most of them can be added by us using GitHub Workflow. There's a
marketplace for these tools and most of them are free for open source
projects.

On Wed, Nov 23, 2022 at 11:43 AM Ayush Saxena <ay...@gmail.com> wrote:

> A simple Infra ticket I suppose should get it done for us, eg.
> https://issues.apache.org/jira/browse/INFRA-23561
>
> -Ayush
>
> On Thu, 24 Nov 2022 at 01:00, Iñigo Goiri <el...@gmail.com> wrote:
>
> > Now that we are using mostly GitHub PRs for the reviews and we have
> decent
> > integration for the builds etc there, I was wondering about code coverage
> > and reporting.
> > Is code coverage setup at all?
> > Does this come from the INFRA team?
> > What would it take to enable it otherwise?
> >
>

Re: Code coverage report on github PRs

Posted by Ayush Saxena <ay...@gmail.com>.
A simple Infra ticket I suppose should get it done for us, eg.
https://issues.apache.org/jira/browse/INFRA-23561

-Ayush

On Thu, 24 Nov 2022 at 01:00, Iñigo Goiri <el...@gmail.com> wrote:

> Now that we are using mostly GitHub PRs for the reviews and we have decent
> integration for the builds etc there, I was wondering about code coverage
> and reporting.
> Is code coverage setup at all?
> Does this come from the INFRA team?
> What would it take to enable it otherwise?
>

Re: Code coverage report on github PRs

Posted by Ayush Saxena <ay...@gmail.com>.
A simple Infra ticket I suppose should get it done for us, eg.
https://issues.apache.org/jira/browse/INFRA-23561

-Ayush

On Thu, 24 Nov 2022 at 01:00, Iñigo Goiri <el...@gmail.com> wrote:

> Now that we are using mostly GitHub PRs for the reviews and we have decent
> integration for the builds etc there, I was wondering about code coverage
> and reporting.
> Is code coverage setup at all?
> Does this come from the INFRA team?
> What would it take to enable it otherwise?
>