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

CI pipeline failed with 'Codecov: Failed to properly upload' #1665

Closed
jjbustamante opened this issue Mar 7, 2023 · 0 comments · Fixed by #1666 or #1809
Closed

CI pipeline failed with 'Codecov: Failed to properly upload' #1665

jjbustamante opened this issue Mar 7, 2023 · 0 comments · Fixed by #1666 or #1809
Assignees
Labels
status/triage Issue or PR that requires contributor attention. type/chore Issue that requests non-user facing changes.

Comments

@jjbustamante
Copy link
Member

Description

From time to time the CI execution for any pull request fails with an error uploading the codecov report. for example:

The following log was taken from a dependency update PR.

_____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.3.5
[2023-03-07T12:29:54.094Z] ['info'] => Project root located at: /Users/runner/work/pack/pack
[2023-03-07T12:29:54.098Z] ['info'] -> No token specified or token is empty
[2023-03-07T12:29:54.098Z] ['verbose'] Start of network processing...
[2023-03-07T12:29:54.098Z] ['verbose'] Searching for files in /Users/runner/work/pack/pack
[2023-03-07T12:29:54.114Z] ['verbose'] coveragepy is not installed
[2023-03-07T12:29:54.114Z] ['info'] Searching for coverage files...
[2023-03-07T12:29:54.183Z] ['verbose'] Preparing to clean the following coverage paths: ./out/tests/coverage-unit.txt
[2023-03-07T12:29:54.183Z] ['info'] => Found 1 possible coverage files:
  ./out/tests/coverage-unit.txt
[2023-03-07T12:29:54.183Z] ['verbose'] End of network processing
[2023-03-07T12:29:54.183Z] ['info'] Processing ./out/tests/coverage-unit.txt...
[2023-03-07T12:29:54.208Z] ['info'] Detected GitHub Actions as the CI provider.
[2023-03-07T12:29:54.208Z] ['verbose'] -> Using the following env variables:
[2023-03-07T12:29:54.209Z] ['verbose']      GITHUB_ACTION: __codecov_codecov-action
[2023-03-07T12:29:54.209Z] ['verbose']      GITHUB_HEAD_REF: dependabot/go_modules/golang.org/x/crypto-0.7.0
[2023-03-07T12:29:54.209Z] ['verbose']      GITHUB_REF: refs/pull/1664/merge
[2023-03-07T12:29:54.209Z] ['verbose']      GITHUB_REPOSITORY: buildpacks/pack
[2023-03-07T12:29:54.209Z] ['verbose']      GITHUB_RUN_ID: 43487497[61](https://github.com/buildpacks/pack/actions/runs/4348749761/jobs/7608960963#step:12:62)
[2023-03-07T12:29:54.209Z] ['verbose']      GITHUB_SERVER_URL: https://github.com
[2023-03-07T12:29:54.209Z] ['verbose']      GITHUB_SHA: fd7303b5ef7cc6fa651cd9c78274a8546e48ecc3
[2023-03-07T12:29:54.209Z] ['verbose']      GITHUB_WORKFLOW: build
[2023-03-07T12:29:54.209Z] ['verbose'] Using the following upload parameters:
[2023-03-07T12:29:54.209Z] ['verbose'] branch
[2023-03-07T12:29:54.209Z] ['verbose'] build
[2023-03-07T12:29:54.209Z] ['verbose'] buildURL
[2023-03-07T12:29:54.209Z] ['verbose'] commit
[2023-03-07T12:29:54.209Z] ['verbose'] job
[2023-03-07T12:29:54.209Z] ['verbose'] pr
[2023-03-07T12:29:54.209Z] ['verbose'] service
[2023-03-07T12:29:54.209Z] ['verbose'] slug
[2023-03-07T12:29:54.209Z] ['verbose'] name
[2023-03-07T12:29:54.209Z] ['verbose'] tag
[2023-03-07T12:29:54.210Z] ['verbose'] flags
[2023-03-07T12:29:54.210Z] ['verbose'] parent
[2023-03-07T12:29:54.211Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-3.1.1-uploader-0.3.5&token=*******&branch=dependabot%2Fgo_modules%2Fgolang.org%2Fx%2Fcrypto-0.7.0&build=4348749761&build_url=https%3A%2F%2Fgithub.com%2Fbuildpacks%2Fpack%2Factions%2Fruns%2F4348749761&commit=174bd[64](https://github.com/buildpacks/pack/actions/runs/4348749761/jobs/7608960963#step:12:65)5500c84c7bffd7f194e20b45a68c767f9&job=build&pr=1[66](https://github.com/buildpacks/pack/actions/runs/4348749761/jobs/7608960963#step:12:67)4&service=github-actions&slug=buildpacks%2Fpack&name=&tag=&flags=unit%2Cos_macos&parent=
[2023-03-07T12:29:54.211Z] ['verbose'] Passed token was 0 characters long
[2023-03-07T12:29:54.211Z] ['verbose'] https://codecov.io/upload/v4?package=github-action-3.1.1-uploader-0.3.5&branch=dependabot%2Fgo_modules%2Fgolang.org%2Fx%2Fcrypto-0.7.0&build=4348749761&build_url=https%3A%2F%2Fgithub.com%2Fbuildpacks%2Fpack%2Factions%2Fruns%2F4348749761&commit=174bd645500c84c7bffd7f194e20b45a68c7[67](https://github.com/buildpacks/pack/actions/runs/4348749761/jobs/7608960963#step:12:68)f9&job=build&pr=1664&service=github-actions&slug=buildpacks%2Fpack&name=&tag=&flags=unit%2Cos_macos&parent=
        Content-Type: 'text/plain'
        Content-Encoding: 'gzip'
        X-Reduced-Redundancy: 'false'
[2023-03-07T12:30:24.331Z] ['error'] There was an error running the uploader: Error uploading to [https://codecov.io:](https://codecov.io/) HeadersTimeoutError: Headers Timeout Error
[2023-03-07T12:30:24.332Z] ['verbose'] The error stack is: Error: Error uploading to [https://codecov.io:](https://codecov.io/) HeadersTimeoutError: Headers Timeout Error
    at main (/snapshot/repo/dist/src/index.js)
[2023-03-07T12:30:24.332Z] ['verbose'] End of uploader: 30251 milliseconds
Error: Codecov: Failed to properly upload: The process '/Users/runner/work/_actions/codecov/codecov-action/v3/dist/codecov' failed with exit code 255

The issue is usually fixed after running the failed job again.

Proposed solution

I believe the issue can be fixed:

  1. Adding a codecov token
  2. Updating the github action to use the token

The reason for that, is based on the following comment where other users seems to face the same issue and even codecov documentation doesn't mentioned the use of the token when the repo is public, this seems to fix the issue

Additional context

@jjbustamante jjbustamante added type/chore Issue that requests non-user facing changes. status/triage Issue or PR that requires contributor attention. labels Mar 7, 2023
@jjbustamante jjbustamante self-assigned this Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/triage Issue or PR that requires contributor attention. type/chore Issue that requests non-user facing changes.
Projects
None yet
1 participant