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

codecov fails in github actions #330

Closed
iapicca opened this issue Jun 6, 2021 · 30 comments
Closed

codecov fails in github actions #330

iapicca opened this issue Jun 6, 2021 · 30 comments
Assignees

Comments

@iapicca
Copy link

iapicca commented Jun 6, 2021

backgrond

  • my setup for codecov has worked well so far

    • you can regular updates with each pr commits here
    • I haven't change my repo settings
  • as I've inadvertently pushed a folder that I wasn't supposed to, then I merged a pr to remove said folder

  • here is my codecov.yml

issue

  • on the aforementioned last pr linked above the github action ci complained with the log below
  _____          _
 / ____|        | |
| |     ___   __| | ___  ___ _____   __
| |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| |  __/ (_| (_) \ V /
 \_____\___/ \__,_|\___|\___\___/ \_/
                              Bash-1.0.3


==> 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:   remove-speedtest
      -> GITHUB_REF:        refs/pull/136/merge
      -> GITHUB_REPOSITORY: iapicca/yak_packages
      -> GITHUB_RUN_ID:     {{I'll keep this for myself}}
      -> GITHUB_SHA:        {{I'll keep this for myself}}
      -> GITHUB_WORKFLOW:   CI
->  Issue detecting commit SHA. Please run actions/checkout with fetch-depth > 1 or set to 0
    project root: .
    Yaml found at: codecov.yml
==> Running gcov in . (disable via -X gcov)
==> Python coveragepy not found
==> Searching for coverage reports in:
    + .
    -> Found 7 reports
==> Detecting git/mercurial file structure
==> Reading reports
    + ./packages/yak_tween/coverage/lcov.info bytes=2228
    + ./packages/yak_utils/coverage.lcov bytes=687
    + ./packages/yak_test/coverage.lcov bytes=339
    + ./packages/stub/coverage.lcov bytes=678
    + ./packages/yak_runner/coverage.lcov bytes=6429
    + ./packages/yak_widgets/coverage/lcov.info bytes=1444
    + ./packages/yak_error_handler/coverage.lcov bytes=1017
==> Appending adjustments
    https://docs.codecov.io/docs/fixing-reports
    + Found adjustments
==> Gzipping contents
        8.0K	/tmp/codecov.yP3SSF.gz
==> Uploading reports
    url: https://codecov.io
    query: branch=remove-speedtest&commit={{I'll keep this for myself}}
    &build={{I'll keep this for myself}}&build_url=http%3A%2F%2Fgithub.com%2Fiapicca%2Fyak_packages%2Factions%2Fruns%2F911981303&name=&tag=&slug=iapicca%2Fyak_packages&service=github-actions&flags=&pr=136&job=CI&cmd_args=

->  Pinging Codecov
https://codecov.io/upload/v4?package=bash-1.0.3&token=secret&branch=remove-speedtest&commit={{I'll keep this for myself}}&build={{I'll keep this for myself}}&build_url=http%3A%2F%2Fgithub.com%2Fiapicca%2Fyak_packages%2Factions%2Fruns%2F911981303&name=&tag=&slug=iapicca%2Fyak_packages&service=github-actions&flags=&pr=136&job=CI&cmd_args=
{'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')}
404
==> Uploading to Codecov
  % 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  5026  100   171  100  4855   1000  28391 --:--:-- --:--:-- --:--:-- 29220
100  5026  100   171  100  4855   1000  28391 --:--:-- --:--:-- --:--:-- 29220
    {'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')}

  • the suggested fix is quite obscure to me
{'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')}

request

as I don't really want to run anything locally can someone help me to fix the issue
inside the CI

thank you

stackoverflow question

@bocklund
Copy link

bocklund commented Jun 7, 2021

+1

We are seeing this issue in pycalphad where sometimes the uploads are successful and other times they are not, with no changes in our configuration. We have broken out the upload step for our different platforms into a different job within the GitHub Action, so we can confirm that it's isolated here.

We use the GitHub token, so rotating tokens as suggested in the SO question doesn't really apply.

@slarse
Copy link
Contributor

slarse commented Jun 7, 2021

Uploads are failing sporadically across all of my public repositories (so no token should be required, but same error message). A couple of examples:

Started over the weekend.

@Matt-Yorkley
Copy link

Same here, started ~2 days ago. Uploading the report to Codecov in the Github action fails 50% of the time, and the response code also seems to be non-zero, even though we're not using the fail_ci_if_error option, so the tests are reported as failed even if they pass.

@aahnik
Copy link

aahnik commented Jun 7, 2021

Everything was fine before. Today I am experiencing this issue for my public repos. As far I know, public repos don't require a token.

One related side question.

My GitHub notifications are configured to notify me only when an action fails. I have configured codecov action to not fail ci on error of codecov.

fail_ci_if_error: false

So, my ci will not fail. but I still want to get notified when upload to codecov fails, or any codecov issue occurs inside the gh action run. Is that possible?

@rowanseymour
Copy link

Same here on our public repos (e.g. https://github.com/nyaruka/rapidpro/pull/3339/checks?check_run_id=2765067466). Haven't changed anything in the configurations. Really don't want to resort to fail_ci_if_error: false because it's important for us to know if reported coverage is correct.

@woop
Copy link

woop commented Jun 7, 2021

We're also getting failures over here: https://github.com/feast-dev/feast/actions/runs/915501111. No changes from our side.

Also, we can't use a token since we are accepting external contributions and secrets cannot be used for external PRs.

@freddyaboulton
Copy link

We have also seen the same thing in evalml:

https://github.com/alteryx/evalml/pull/2256/checks?check_run_id=2766309621
https://github.com/alteryx/evalml/actions/runs/915203323
https://github.com/alteryx/evalml/runs/2764848236?check_suite_focus=true

Is there a plan for a fix from codecov? Any help would be appreciated! This started happening for us sometime today.

ktalley-figure added a commit to FigureTechnologies/ats-smart-contract that referenced this issue Jun 7, 2021
TeoZosa added a commit to TeoZosa/cookiecutter-cruft-poetry-tox-pre-commit-ci-cd that referenced this issue Jun 8, 2021
To address recently flaky Codecov upload jobs failing CI.
- see: codecov/codecov-action/issues/330
TeoZosa added a commit to TeoZosa/structlog-sentry-logger that referenced this issue Jun 8, 2021
To address recently flaky Codecov upload jobs failing CI.
- see: codecov/codecov-action/issues/330
@thomasrockhu
Copy link
Contributor

thomasrockhu commented Jun 9, 2021

Hi all, I have deployed 1.5.2 which should fix the above issue. I will continue to keep this open at least for the next 24 hours unless there are other issues.

@dword-design
Copy link

Still the issue for me that regenerating the token fixes it shortly but then the problem reappears.

@xydesa
Copy link

xydesa commented Jun 9, 2021

v1.5.2 seems to have fixed my problem. Thank you!

@thomasrockhu
Copy link
Contributor

@dword-design you might have been at the tail end of some infrastructure changes we made to help with this issue. Are you still running into problems?

valfirst added a commit to vividus-framework/vividus that referenced this issue Jun 9, 2021
@dword-design
Copy link

@thomasrockhu Seems to be working now. Thanks for the quick fix!

@AenBleidd
Copy link

It fails again

@thomasrockhu
Copy link
Contributor

Hi @AenBleidd, can you open a ticket in our community boards? I believe the root cause of this particular issue is different and has been fixed. I would like to get some more information about what's causing the issue for you.

@thomasrockhu
Copy link
Contributor

Aside from that, I'm going to close this issue as it looks to be resolved. Thanks again, everyone.

TeoZosa added a commit to TeoZosa/cookiecutter-cruft-poetry-tox-pre-commit-ci-cd that referenced this issue Aug 18, 2021
teo-cicd-bot pushed a commit to TeoZosa/cookiecutter-cruft-poetry-tox-pre-commit-ci-cd-instance that referenced this issue Aug 18, 2021
TeoZosa added a commit to TeoZosa/structlog-sentry-logger that referenced this issue Sep 11, 2021
TeoZosa added a commit to TeoZosa/structlog-sentry-logger that referenced this issue Sep 11, 2021
TeoZosa added a commit to TeoZosa/structlog-sentry-logger that referenced this issue Sep 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests