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

Reporting coverage broke for dependabot #258

Closed
MoSattler opened this issue Mar 24, 2021 · 4 comments
Closed

Reporting coverage broke for dependabot #258

MoSattler opened this issue Mar 24, 2021 · 4 comments

Comments

@MoSattler
Copy link

MoSattler commented Mar 24, 2021

For some reason from the 16.03. onwards, reporting coverage broke for me when dependabot is opening pull requests.

The error message is

{'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')}
logs
Run codecov/codecov-action@v1
29
/bin/bash codecov.sh -n  -F web, server -Q github-action -Z -C XYZ
30

31
  _____          _
32
 / ____|        | |
33
| |     ___   __| | ___  ___ _____   __
34
| |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
35
| |___| (_) | (_| |  __/ (_| (_) \ V /
36
 \_____\___/ \__,_|\___|\___\___/ \_/
37
                              Bash-20210309-2b87ace
38

39

40
==> git version 2.31.0 found
41
==> curl 7.58.0 (x86_64-pc-linux-gnu) libcurl/7.58.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
42
Release-Date: 2018-01-24
43
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp 
44
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL 
45
==> GitHub Actions detected.
46
    Env vars used:
47
      -> GITHUB_ACTIONS:    true
48
      -> GITHUB_HEAD_REF:   dependabot/npm_and_yarn/accounter/web/babel-plugin-relay-11.0.0
49
      -> GITHUB_REF:        refs/pull/675/merge
50
      -> GITHUB_REPOSITORY: getaccounter/accounter
51
      -> GITHUB_RUN_ID:     682742527
52
      -> GITHUB_SHA:        2315666f0a4944b66e1d968f6c8baa10b0ba5849
53
      -> GITHUB_WORKFLOW:   CI
54
    project root: .
55
    Yaml found at: codecov.yml
56
==> Running gcov in . (disable via -X gcov)
57
==> Python coveragepy not found
58
==> Searching for coverage reports in:
59
    + .
60
    -> Found 7 reports
61
==> Detecting git/mercurial file structure
62
==> Reading reports
63
    + ./accounter/server/coverage.xml bytes=75532
64
    + ./accounter/web/coverage/lcov.info bytes=161315
65
    + ./accounter/web/coverage/coverage-final.json bytes=580005
66
    + ./accounter/web/coverage/clover.xml bytes=322597
67
    + ./accounter/connector/coverage/lcov.info bytes=10179
68
    + ./accounter/connector/coverage/coverage-final.json bytes=63335
69
    + ./accounter/connector/coverage/clover.xml bytes=30594
70
==> Appending adjustments
71
    https://docs.codecov.io/docs/fixing-reports
72
    -> No adjustments found
73
==> Gzipping contents
74
        100K	/tmp/codecov.0RcAVD.gz
75
==> Uploading reports
76
    url: https://codecov.io
77
    query: branch=dependabot%2Fnpm_and_yarn%2Faccounter%2Fweb%2Fbabel-plugin-relay-11.0.0&commit=b9e10c6ad7e2f54018b1070f57bb73d83d9c631e&build=682742527&build_url=http%3A%2F%2Fgithub.com%2Fgetaccounter%2Faccounter%2Factions%2Fruns%2F682742527&name=&tag=&slug=getaccounter%2Faccounter&service=github-actions&flags=web,server&pr=675&job=CI&cmd_args=n,F,Q,Z,C
78
->  Pinging Codecov
79
https://codecov.io/upload/v4?package=github-action-20210309-2b87ace&token=secret&branch=dependabot%2Fnpm_and_yarn%2Faccounter%2Fweb%2Fbabel-plugin-relay-11.0.0&commit=b9e10c6ad7e2f54018b1070f57bb73d83d9c631e&build=682742527&build_url=http%3A%2F%2Fgithub.com%2Fgetaccounter%2Faccounter%2Factions%2Fruns%2F682742527&name=&tag=&slug=getaccounter%2Faccounter&service=github-actions&flags=web,server&pr=675&job=CI&cmd_args=n,F,Q,Z,C
80
{'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')}
81
404
82
==> Uploading to Codecov
83
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
84
                                 Dload  Upload   Total   Spent    Left  Speed
85

86
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
87
100 98976  100   171  100 98805    780   440k --:--:-- --:--:-- --:--:--  443k
88
    {'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')}
89
Error: Codecov failed with the following error: The process '/bin/bash' failed with exit code 1

action config

- name: report coverage
  uses: codecov/codecov-action@v1
  with:
    token: ${{ secrets.CODECOV_TOKEN }}
    flags: web, server
    fail_ci_if_error: true

codecov.yml

coverage:
 status:
   project:
     default:
       target: auto
     server:
       target: auto
       flags:
         - server
     web:
       target: auto
       flags:
         - web
comment:
 layout: "reach, diff, flags, files"
 behavior: default
 require_changes: false
 require_base: yes
 require_head: yes
 branches: null
flags:
 server:
   paths:
     - server/
   carryforward: false
 web:
   paths:
     - web/
   carryforward: false
@MoSattler MoSattler changed the title 1.3 breaking coverage reporting Reporting coverage broke Mar 24, 2021
@MoSattler MoSattler changed the title Reporting coverage broke Reporting coverage broke for dependabot Mar 24, 2021
@MoSattler
Copy link
Author

I just realised that there is a general problem with dependabot and secrets, hence it's not a codecov actions bug.

@vinayakkulkarni
Copy link

Any workarounds / solutions to this?

sighingnow added a commit to alibaba/GraphScope that referenced this issue Jun 8, 2021
See also: codecov/codecov-action#258 and codecov/codecov-action#43.

Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
@dword-design
Copy link

Regenerating the token seems to fix the issue. Also for public repos.
See https://stackoverflow.com/questions/67861379/codecov-fails-in-github-actions

@LucaMarconato
Copy link

I had the same problem when using act, I describe my solution in this thread #557.

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

4 participants