Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GHA/Codecov: "Unchanged files with check annotations (Beta)" is noisy #10824

Closed
amotl opened this issue Nov 26, 2020 · 8 comments
Closed

GHA/Codecov: "Unchanged files with check annotations (Beta)" is noisy #10824

amotl opened this issue Nov 26, 2020 · 8 comments
Labels
information triage An issue that needs to be triaged by a maintainer

Comments

@amotl
Copy link
Member

amotl commented Nov 26, 2020

Hi there,

as we always try to improve on flakyness on the bits related to the test harness whatsoever, I believe it might make sense to add this here - even if we might want to close it right away because it is not a real issue but just about noise.

Introduction

With minor patchsets like #10821 and #10823 being brought in, we are sometimes observing Codecov warnings which report changes in coverage even when no code changes were made.

@amotl asked:

Just curious why they only recently popped up here?

@mfussenegger stated:

No idea why it is sometimes popping up and sometimes not.

Observations

The noise we are actually looking at looks like this.

Check warning on line 170 in app/src/main/java/org/elasticsearch/bootstrap/BootstrapProxy.java
@codecov codecov / codecov/patch

app/src/main/java/org/elasticsearch/bootstrap/BootstrapProxy.java#L170

Added line #L170 was not covered by tests

image

Research

So, while the official documentation says:

and also gives some advice on how to investigate unexpected coverage changes:

I have been able to collect some pointers where others are actually reporting nondeterministic behavior in this space, for both Codecov and GHA:

Maybe this helps ourselves or others for either confirming or even getting hold of this issue.

With kind regards,
Andreas.

@amotl amotl added triage An issue that needs to be triaged by a maintainer information labels Nov 26, 2020
@amotl amotl changed the title GHA/Codecov: Unchanged files with check annotations (Beta) is noisy GHA/Codecov: "Unchanged files with check annotations (Beta)" is noisy Nov 26, 2020
@amotl
Copy link
Member Author

amotl commented Nov 27, 2020

Others reported that those issues about reports from Codecov that lines are being added while they are actually not, might come from the fact that the upload of the coverage report to codecov.io has gone wrong or something. Indeed, when looking at [1] or [2], it says

Missing base report.
Unable to compare commits because the base of the pull request did not upload a coverage report.
Changes found in between b631d66...521faaf (pseudo...base) which prevent comparing this pull request.

image

[1] https://codecov.io/gh/crate/crate/pull/10821
[2] https://codecov.io/gh/crate/crate/pull/10823

@amotl
Copy link
Member Author

amotl commented Nov 27, 2020

While I don't know if I am on the right track on this, I tried to find similar observations by others and would like to report about it.

Easy fix?

If we are lucky, the problem might be easy to solve by manually uploading the latest commit on master once, like @hisabimbola described at commercetools/nodejs#179 (comment):

The simple fix I did was to manually push a report to the latest commit on master and PRs now [codecov has] a report to compare with.

The canonical documentation of this apparently is [1] and TEAMMATES/teammates#6791 as well as [2] are further references to it.

[1] https://docs.codecov.io/docs/error-reference
[2] https://twitter.com/codecov/status/835856171143684096

Hm?

Other reports about this are codecov/codecov-bash#134 as well as codecov/codecov-bash#137 and unfortunately, they are still open/unresolved. People at [3] and [4] apparently report about similar things.

[3] https://community.codecov.io/t/flag-n-to-set-the-base-report-does-not-work/973
[4] https://community.codecov.io/t/how-to-fix-missing-base-report-on-open-source-project/1559

@amotl
Copy link
Member Author

amotl commented Nov 27, 2020

FWIW, I also took a look back in time. At [1] everything seems to be still all right. However, from there things apparently start to deteriorate gradually and starting from [2], all pull requests processed by Codecov show the "Missing base report" flag more often than not.

While I don't want to blame anything before knowing more details, I wonder if Mergify might be involved to these hiccups in any way? However, I haven't been able to find any traces of people talking about this.

[1] https://app.codecov.io/gh/crate/crate/pulls?page=137&state=merged&order=-pullid
[2] https://app.codecov.io/gh/crate/crate/pulls?page=98&state=merged&order=-pullid

@amotl
Copy link
Member Author

amotl commented Nov 30, 2020

@mfussenegger and me believe that

part of the problem is that we partly do a rebase merge (either via GitHub UI or mergify). Then the hash that gets committed to master changes and Jenkins doesn't run on master for commits but only on PR. That is the reason why the codecov report for the commits in master is missing.

A likely solution would be to set up push on master as a trigger for tests on Jenkins which uploads the reports.

@amotl amotl mentioned this issue Feb 3, 2021
5 tasks
@amotl amotl closed this as completed Feb 9, 2021
@amotl
Copy link
Member Author

amotl commented Feb 9, 2021

Apparently, https://github.com/crate/jenkins-dsl/pull/879 does not specify any triggers. I am now running the job [1] manually and will reopen this.

[1] https://jenkins.crate.io/job/CrateDB/job/crate_on_master

@amotl amotl reopened this Feb 9, 2021
@amotl
Copy link
Member Author

amotl commented Feb 26, 2021

Hi again,

at crate-pdo, we recently had similar issues where the Scrutinizer service was not able to grok code coverage reports properly because the source checkout job step did not account for enough "depth" of the repository.

We have been able to mitigate it by adjusting the GitHub Actions "checkout" recipe through crate/crate-pdo@1c1693d92.

- name: Acquire sources
  uses: actions/checkout@v2
  with:
    fetch-depth: 2

With kind regards,
Andreas.

@amotl
Copy link
Member Author

amotl commented Feb 26, 2021

At [1], we can see that the "Missing base report" badge is still present on pull request checks more often than not.

image

[1] https://app.codecov.io/gh/crate/crate/pulls

@mfussenegger
Copy link
Member

This hasn't been that much of an issue lately. Closing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
information triage An issue that needs to be triaged by a maintainer
Projects
None yet
Development

No branches or pull requests

2 participants