Apparently invalid "Missing base report"

Hi. I realized that there are a lot of threads here about coverage not being processed properly and I read at least some of them, but wasn’t able to find a solution, so here we go.

Description

On our GitHub Repo a recent PR at some point had issues with reporting coverage. While coverage was handled correctly for this commit, it wasn’t for the next one in the same PR. When comparing the failing commit to the parent it tells me “Missing base report.” even though the parent did have a successfull coverage upload.

Afterwards none of the commits to the PR got coverage reports and I also wasn’t able to get them to work with new PRs based on the same branch/branches forked from it.

I had hoped that the problem would resolve after merging the PR, but now we have the same problem on master.

This is somewhat similar to the thread here, though the fix of upgrading the codecov package doesn’t apply has our CI always fetches the latest version from pypi.org.

I’d be happy for any advice or hints on what to look for. If I can’t get it to work again, I guess I’ll have to re-setup codecov as reported here, but ofc I’d like to avoid that.

Commit SHAs

Relevant commits on master:
Last successfull
First failing
Suspicious comparison to parent

Repository

CI/CD or Build URL

GitHub Actions with the codecov action, see here.

Codecov Output

Click to expand
Run codecov/codecov-action@v1
  with:
    env_vars: OS,PYTHON
    name: ubuntu-latest-3.6
    fail_ci_if_error: true
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.6.13/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.6.13/x64/lib
/usr/bin/bash codecov.sh -n ubuntu-latest-3.6 -F  -Q github-action -e OS,PYTHON -Z

  _____          _
 / ____|        | |
| |     ___   __| | ___  ___ _____   __
| |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| |  __/ (_| (_) \ V /
 \_____\___/ \__,_|\___|\___\___/ \_/
                              Bash-1.0.2


==> git version 2.31.1 found
==> curl 7.68.0 (x86_64-pc-linux-gnu) libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Release-Date: 2020-01-08
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS brotli GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets
==> GitHub Actions detected.
    Env vars used:
      -> GITHUB_ACTIONS:    true
      -> GITHUB_HEAD_REF:   
      -> GITHUB_REF:        refs/heads/master
      -> GITHUB_REPOSITORY: python-telegram-bot/python-telegram-bot
      -> GITHUB_RUN_ID:     911284899
      -> GITHUB_SHA:        fce7cc903c4085b50cd0ef7c5143682d285f1bee
      -> GITHUB_WORKFLOW:   GitHub Actions
    project root: .
    Yaml found at: codecov.yml
==> Running gcov in . (disable via -X gcov)
==> Python coveragepy exists disable via -X coveragepy
    -> Running coverage xml
==> Searching for coverage reports in:
    + .
    -> Found 1 reports
==> Detecting git/mercurial file structure
==> Appending build variables
    + OS
    + PYTHON
==> Reading reports
    + ./coverage.xml bytes=24020
==> Appending adjustments
    https://docs.codecov.io/docs/fixing-reports
    -> No adjustments found
==> Gzipping contents
        8.0K	/tmp/codecov.YF7Xhi.gz
==> Uploading reports
    url: https://codecov.io
    query: branch=master&commit=fce7cc903c4085b50cd0ef7c5143682d285f1bee&build=911284899&build_url=http%3A%2F%2Fgithub.com%2Fpython-telegram-bot%2Fpython-telegram-bot%2Factions%2Fruns%2F911284899&name=ubuntu-latest-3.6&tag=&slug=python-telegram-bot%2Fpython-telegram-bot&service=github-actions&flags=&pr=&job=GitHub%20Actions&cmd_args=n,F,Q,e,Z
->  Pinging Codecov
https://codecov.io/upload/v4?package=github-action-1.0.2&token=secret&branch=master&commit=fce7cc903c4085b50cd0ef7c5143682d285f1bee&build=911284899&build_url=http%3A%2F%2Fgithub.com%2Fpython-telegram-bot%2Fpython-telegram-bot%2Factions%2Fruns%2F911284899&name=ubuntu-latest-3.6&tag=&slug=python-telegram-bot%2Fpython-telegram-bot&service=github-actions&flags=&pr=&job=GitHub%20Actions&cmd_args=n,F,Q,e,Z
->  Uploading to
https://storage.googleapis.com/codecov/v4/raw/2021-06-06/…
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  4293    0     0  100  4293      0  24815 --:--:-- --:--:-- --:--:-- 24672
100  4293    0     0  100  4293      0  24815 --:--:-- --:--:-- --:--:-- 24672
    -> Reports have been successfully queued for processing at https://codecov.io/github/python-telegram-bot/python-telegram-bot/commit/fce7cc903c4085b50cd0ef7c5143682d285f1bee

After deleting & readding the project, uploading coverage still fails: Code coverage done right.
I’ve now directly contacted support …

I had another closer look at the commit that introduced the issue and it turns out that I added an exclude_line that apparently isn’t handled correctly. To exclude coverage for @overload signatures, I added ..., switching that to @overload does tha trick.

1 Like