How to silence unwanted warnings?

Before submitting a topic, please confirm the following

I have searched for similar issues before creating this topic.
I have verified that my repository is using the Codecov GitHub app, if using GitHub
I have validated my codecov.yaml configuration file.
I have filled out the below sections to the best of my ability.


Bokeh server is an application that runs other Python scripts. As part of our testing we generate deliberately mal-formed Python files to maintain behaviors under error situations. Codecov is noticing these files and generating many spurious unwanted warnings in our CI logs:

/usr/share/miniconda3/envs/bk-test/lib/python3.11/site-packages/coverage/ CoverageWarning: Couldn't parse '/home/runner/work/bokeh/bokeh/build/tmp/': No source for code: '/home/runner/work/bokeh/bokeh/build/tmp/'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")

I am looking for a way to silence these. I had tried using ignore (see below) but apparently that is not the correct approach.


Forward ports from 3.0.2 · bokeh/bokeh@e69ed94 · GitHub

Codecov Output

Please provide the full output of running the uploader on your CI/CD. This will typically have the Codecov logo as ASCII.

[2022-11-17T02:36:58.118Z] ['verbose'] Start of uploader: 1668652618118...
[2022-11-17T02:36:58.119Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.3.2
[2022-11-17T02:36:58.126Z] ['info'] => Project root located at: /home/runner/work/bokeh/bokeh
[2022-11-17T02:36:58.130Z] ['info'] -> No token specified or token is empty
[2022-11-17T02:36:58.130Z] ['verbose'] Start of network processing...
[2022-11-17T02:36:58.130Z] ['verbose'] Searching for files in /home/runner/work/bokeh/bokeh
[2022-11-17T02:36:58.141Z] ['verbose'] coveragepy is not installed
[2022-11-17T02:36:58.142Z] ['info'] Searching for coverage files...
[2022-11-17T02:36:58.335Z] ['info'] Warning: Some files located via search were excluded from upload.
[2022-11-17T02:36:58.335Z] ['info'] If Codecov did not locate your files, please review
[2022-11-17T02:36:58.335Z] ['verbose'] Preparing to clean the following coverage paths: coverage.xml
[2022-11-17T02:36:58.336Z] ['info'] => Found 1 possible coverage files:
[2022-11-17T02:36:58.336Z] ['verbose'] End of network processing
[2022-11-17T02:36:58.336Z] ['info'] Processing /home/runner/work/bokeh/bokeh/coverage.xml...
[2022-11-17T02:36:58.356Z] ['info'] Detected GitHub Actions as the CI provider.
[2022-11-17T02:36:58.356Z] ['verbose'] -> Using the following env variables:
[2022-11-17T02:36:58.356Z] ['verbose']      GITHUB_ACTION: __codecov_codecov-action
[2022-11-17T02:36:58.356Z] ['verbose']      GITHUB_HEAD_REF: bv/forward-ports-3.0.2
[2022-11-17T02:36:58.356Z] ['verbose']      GITHUB_REF: refs/pull/12621/merge
[2022-11-17T02:36:58.356Z] ['verbose']      GITHUB_REPOSITORY: bokeh/bokeh
[2022-11-17T02:36:58.356Z] ['verbose']      GITHUB_RUN_ID: 3484788160
[2022-11-17T02:36:58.356Z] ['verbose']      GITHUB_SERVER_URL:
[2022-11-17T02:36:58.356Z] ['verbose']      GITHUB_SHA: 5bf66980fad3a09cf41d14cc87f7f28b71af088e
[2022-11-17T02:36:58.356Z] ['verbose']      GITHUB_WORKFLOW: Bokeh-CI
[2022-11-17T02:36:58.357Z] ['verbose'] Using the following upload parameters:
[2022-11-17T02:36:58.357Z] ['verbose'] branch
[2022-11-17T02:36:58.357Z] ['verbose'] build
[2022-11-17T02:36:58.357Z] ['verbose'] buildURL
[2022-11-17T02:36:58.357Z] ['verbose'] commit
[2022-11-17T02:36:58.357Z] ['verbose'] job
[2022-11-17T02:36:58.357Z] ['verbose'] pr
[2022-11-17T02:36:58.357Z] ['verbose'] service
[2022-11-17T02:36:58.357Z] ['verbose'] slug
[2022-11-17T02:36:58.357Z] ['verbose'] name
[2022-11-17T02:36:58.357Z] ['verbose'] tag
[2022-11-17T02:36:58.357Z] ['verbose'] flags
[2022-11-17T02:36:58.357Z] ['verbose'] parent
[2022-11-17T02:36:58.358Z] ['info'] Pinging Codecov:*******&branch=bv%2Fforward-ports-3.0.2&build=3484788160&
[2022-11-17T02:36:58.358Z] ['verbose'] Passed token was 0 characters long
[2022-11-17T02:36:58.358Z] ['verbose']
        Content-Type: 'text/plain'
        Content-Encoding: 'gzip'
        X-Reduced-Redundancy: 'false'
[2022-11-17T02:36:58.937Z] ['info']
[2022-11-17T02:36:58.937Z] ['verbose'] Returned upload url:
[2022-11-17T02:36:58.937Z] ['info'] Uploading...
[2022-11-17T02:36:59.133Z] ['info'] {"status":"success","resultURL":""}
[2022-11-17T02:36:59.133Z] ['verbose'] End of uploader: 1015 milliseconds

Expected Results

I tried to slience these warnings by adding ignore to our codecov.yml, per these instructions. Following the paths in the warnings, I added the pattern "**/build/tmp/tmp*.py". The resulting value in the site was

- (?s:.*/build/tmp/tmp[^\/]+\.py.*)\Z

I expected (hoped) that ignoring the file would also result in suppressing any warnings about the ignored files.

Actual Results

After adding the ignore block, the warning messages still persist in CI logs.

Additional Information

Is there a different mechanism to silence or quiet specific warnings? I did not turn up anything.

@bryevdv this is not a Codecov issue, the errors come from running pytest --cov=bokeh --cov-report=xml --color=yes tests/unit which occur before you upload coverage reports to Codecov. I would check the pytest or pytest-cov docs.

Yes it was :man_facepalming: (thank you!)

1 Like