Coverage for a specific file is shown line-by-line in commit view but not in Overview page

Description

I want to see the line-by-line coverage for the one covered file in <repo-root>/tests and it shows up exactly as expected when I’m looking at a specific commit (I love the UI by the way, great job). However when I try to view the same file from the Overview page it just says “No file found to compare.”.

So Codecov is clearly finding the file correctly since it works in the commit view but isn’t displaying it properly on the Overview page

Commit SHAs

511dc67ead98cfb6f8918c85057cc1c987effd30

Repository

https://github.com/bcaddy/hydro-sandbox/tree/testing-prototype

CI/CD or Build URL

Uploader

GitHub Actions

Codecov Output

One example of a set of three parallel jobs

Run codecov/codecov-action@v2
  with:
    files: ./tests/coverage_all.info
    flags: No-ifdefs
    name: codecov-upload
    fail_ci_if_error: true
    verbose: true
==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (3094f05b76925427642be5d4bbde7fba202c82aab2b7d31fd32620d735b3be47  codecov)
/home/runner/work/_actions/codecov/codecov-action/v2/dist/codecov -n codecov-upload -Q github-action-2.0.2 -Z -f ./tests/coverage_all.info -F No-ifdefs -v
[2021-08-19T14:50:50.033Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.1.0
[2021-08-19T14:50:50.040Z] ['info'] => Project root located at: /home/runner/work/hydro-sandbox/hydro-sandbox
[2021-08-19T14:50:50.042Z] ['info'] -> No token specified or token is empty
[2021-08-19T14:50:50.042Z] ['verbose'] Start of network processing...
[2021-08-19T14:50:50.042Z] ['verbose'] Searching for files in /home/runner/work/hydro-sandbox/hydro-sandbox
[2021-08-19T14:50:50.061Z] ['info'] Searching for coverage files...
[2021-08-19T14:50:50.071Z] ['info'] => Found 1 possible coverage files:
  ./tests/coverage_all.info
[2021-08-19T14:50:50.071Z] ['verbose'] End of network processing
[2021-08-19T14:50:50.071Z] ['info'] Processing ./tests/coverage_all.info...
[2021-08-19T14:50:50.076Z] ['info'] Detected GitHub Actions as the CI provider.
[2021-08-19T14:50:50.076Z] ['verbose'] -> Using the following env variables:
[2021-08-19T14:50:50.076Z] ['verbose']      GITHUB_ACTION: __codecov_codecov-action
[2021-08-19T14:50:50.076Z] ['verbose']      GITHUB_HEAD_REF: 
[2021-08-19T14:50:50.076Z] ['verbose']      GITHUB_REF: refs/heads/testing-prototype
[2021-08-19T14:50:50.076Z] ['verbose']      GITHUB_REPOSITORY: bcaddy/hydro-sandbox
[2021-08-19T14:50:50.076Z] ['verbose']      GITHUB_RUN_ID: 1147405526
[2021-08-19T14:50:50.076Z] ['verbose']      GITHUB_SERVER_URL: https://github.com
[2021-08-19T14:50:50.076Z] ['verbose']      GITHUB_SHA: 511dc67ead98cfb6f8918c85057cc1c987effd30
[2021-08-19T14:50:50.076Z] ['verbose']      GITHUB_WORKFLOW: Build
[2021-08-19T14:50:50.077Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-2.0.2-uploader-0.1.0&token=*******&branch=testing-prototype&build=1147405526&build_url=https%3A%2F%2Fgithub.com%2Fbcaddy%2Fhydro-sandbox%2Factions%2Fruns%2F1147405526&commit=511dc67ead98cfb6f8918c85057cc1c987effd30&job=Build&pr=&service=github-actions&slug=bcaddy/hydro-sandbox&name=codecov-upload&tag=&flags=No-ifdefs&parent=
[2021-08-19T14:50:50.077Z] ['verbose'] Passed token was 0 characters long
[2021-08-19T14:50:50.077Z] ['verbose'] https://codecov.io/upload/v4?package=github-action-2.0.2-uploader-0.1.0&branch=testing-prototype&build=1147405526&build_url=https%3A%2F%2Fgithub.com%2Fbcaddy%2Fhydro-sandbox%2Factions%2Fruns%2F1147405526&commit=511dc67ead98cfb6f8918c85057cc1c987effd30&job=Build&pr=&service=github-actions&slug=bcaddy/hydro-sandbox&name=codecov-upload&tag=&flags=No-ifdefs&parent=
        Content-Type: 'text/plain'
        Content-Encoding: 'gzip'
        X-Reduced-Redundancy: 'false'
[2021-08-19T14:50:50.494Z] ['verbose'] Returned upload url: https://codecov.io/github/bcaddy/hydro-sandbox/commit/511dc67ead98cfb6f8918c85057cc1c987effd30
https://storage.googleapis.com/codecov/v4/raw/2021-08-19/392418648B71D089219DEB14ACA555CF/511dc67ead98cfb6f8918c85057cc1c987effd30/fce3f71d-6608-43b6-bb19-418c49f5aacd.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EKKHVKCKHW7KBCGM7IHR55T63V2PAVJWLVFNITJHDU5G6R5IRN3LMWJA%2F20210819%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20210819T145050Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=5a6b9feef063fc67139e3dd0e7ecb37e8bb35ade0f0b5bed4966b98f4793d3ab
[2021-08-19T14:50:50.494Z] ['verbose'] https://storage.googleapis.com/codecov/v4/raw/2021-08-19/392418648B71D089219DEB14ACA555CF/511dc67ead98cfb6f8918c85057cc1c987effd30/fce3f71d-6608-43b6-bb19-418c49f5aacd.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EKKHVKCKHW7KBCGM7IHR55T63V2PAVJWLVFNITJHDU5G6R5IRN3LMWJA%2F20210819%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20210819T145050Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=5a6b9feef063fc67139e3dd0e7ecb37e8bb35ade0f0b5bed4966b98f4793d3ab
        Content-Type: 'text/plain'
        Content-Encoding: 'gzip'
[2021-08-19T14:50:50.494Z] ['info'] Uploading...
[2021-08-19T14:50:50.677Z] ['info'] {"status":"success","resultURL":"https://codecov.io/github/bcaddy/hydro-sandbox/commit/511dc67ead98cfb6f8918c85057cc1c987effd30"}

Expected Results

I expect the file to show up with line by line coverage in the Overview mode as well

Actual Results

The file is only available in the commit specific view

Additional Information

Path fixing of any kind seems to have no effect. Having said that I don’t really understand the path fixing documentation so that might still be the problem.

This appears to be a bug that occurs only when there is a single covered file within a directory. I added some more covered files to <repo-root>/tests and now everything, including the original file, is showing as expected. Having this work around makes fixing this not critical for me but it would be nice to have it fixed.

@bcaddy I think you had happened to hit an issue that we were hitting this morning with rate-limiting. Were you logged in when viewing this page?

@tom, I was logged in when encountering this issue. I also encountered the same issue last night around 4:30pm EST but I thought it was related to path fixing.

@tom, I reset my repo to only have one covered file in <repo-root>/tests and the issue came right back. I tried it on my main browser that I’m logged into Codecov on (Safari) and the issue is as I described earlier. On my second browser (Vivaldi) which is not logged into Codecov I can’t see the line-by-line coverage on any file in any view. Trying to open a specific file gives me this error

@bcaddy we made some changes to our frontend here, would you see if that has fixed your issue?

1 Like

@tom, unfortunately it did not

@bcaddy would you be able to point me to a URL for this?

@tom, I just checked and the UI has changed to show directories even when there’s a single file in that directory. With that change the issue has gone away. Maybe the earlier change fixed it and it just wasn’t cached properly for me?

Thanks for you help, I’ll close this ticket now

1 Like