alchemistry / alchemlyb

the simple alchemistry library
https://alchemlyb.readthedocs.io
BSD 3-Clause "New" or "Revised" License
191 stars 49 forks source link

frequent codecov upload failures #262

Closed orbeckst closed 1 year ago

orbeckst commented 1 year ago

We're seeing an increase in workflow failures due to codecov upload failing.

Example output

For example in https://github.com/alchemistry/alchemlyb/actions/runs/3371150315/jobs/5592982039

==> linux OS detected
https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (20f9c9d78483fce977b6cc39e231a734a23bcd36f4d536bb7355222fb88d02bc  codecov)
==> Running version latest
==> Running version v0.3.2
/home/runner/work/_actions/codecov/codecov-action/v2/dist/codecov -n codecov-ubuntu-latest-py3.10 -Q github-action-2.1.0 -Z -f ./coverage.xml
[2022-11-01T16:46:21.204Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.3.2
[2022-11-01T16:46:21.216Z] ['info'] => Project root located at: /home/runner/work/alchemlyb/alchemlyb
[2022-11-01T16:46:21.217Z] ['info'] -> No token specified or token is empty
[2022-11-01T16:46:21.226Z] ['info'] Searching for coverage files...
[2022-11-01T16:46:21.313Z] ['info'] => Found 1 possible coverage files:
  ./coverage.xml
[2022-11-01T16:46:21.313Z] ['info'] Processing ./coverage.xml...
[2022-11-01T16:46:21.319Z] ['info'] Detected GitHub Actions as the CI provider.
[2022-11-01T16:46:21.321Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-2.1.0-uploader-0.3.2&token=*******&branch=master&build=3371150315&build_url=https%3A%2F%2Fgithub.com%2Falchemistry%2Falchemlyb%2Factions%2Fruns%2F3371150315&commit=02357b21399a5d5de6cebc3bdbee23dd69c91d44&job=CI&pr=&service=github-actions&slug=alchemistry%2Falchemlyb&name=codecov-ubuntu-latest-py3.10&tag=&flags=&parent=
[2022-11-01T16:46:21.728Z] ['error'] There was an error running the uploader: Error uploading to [https://codecov.io:](https://codecov.io/) Error: There was an error fetching the storage URL during POST: 404 - {'detail': ErrorDetail(string='Unable to locate build via Github Actions API. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}
Error: Codecov: Failed to properly upload: The process '/home/runner/work/_actions/codecov/codecov-action/v2/dist/codecov' failed with exit code 255

Next steps

orbeckst commented 1 year ago

Example where the majority of jobs failed: https://github.com/alchemistry/alchemlyb/actions/runs/3371150315

orbeckst commented 1 year ago

The problem is mentioned in https://github.com/codecov/codecov-action/issues/595 but the only conclusion there is "transient".

orbeckst commented 1 year ago

I added a CODECOV_TOKEN to the repo secrets. The docs say it's not necessary when uploading through GH actions but let's try.

orbeckst commented 1 year ago

See also https://github.com/codecov/feedback/issues/126 (active issue).

orbeckst commented 1 year ago

Note that the solution with the token secret will likely prevent codecov to run on forks, as discussed in the issue mentioned above.