Github Actions POST upload 404: requires Codecov repository upload token

Description

Uploads from public repository on Github using Github Actions shows:

[2022-07-25T18:41:14.578Z] ['error'] There was an error running the uploader: Error uploading to 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')}

Seems to be a random failure. Other uploads for other jobs work OK.

CI/CD URL

https://github.com/apereo/cas/runs/7505867350?check_suite_focus=true

and

Codecov Output

Run codecov/codecov-action@v3
  with:
    files: ./build/reports/jacoco/jacocoRootReport/jacocoRootReport.xml
    flags: mail
    name: mail
    verbose: false
  env:
    JAVA_OPTS: -Xms512m -Xmx6048m -Xss128m -XX:ReservedCodeCacheSize=512m -server
    GRADLE_OPTS: -Xms512m -Xmx6048m -Xss128m -XX:ReservedCodeCacheSize=512m -server
    TERM: xterm-256color
    GRADLE_BUILDCACHE_USER: ci
    GRADLE_BUILDCACHE_PSW: ***
    CODACY_PROJECT_TOKEN: ***
    SONARCLOUD_TOKEN: ***
    GITHUB_TOKEN: ***
    JDK_CURRENT: 11
    RETRY_MINUTES: 180
    CATEGORY_REGEX: .*
    JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/11.0.15-10/x64
==> linux OS detected
https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (432553f03714a83ab5cac78be2e7fe6a6050767f78f77e9c7a84bdb1c34a0bd3  codecov)
==> Running version latest
==> Running version v0.2.4
/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov -n mail -Q github-action-3.1.0 -f ./build/reports/jacoco/jacocoRootReport/jacocoRootReport.xml -F mail
[2022-07-25T18:41:13.025Z] ['info'] 


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

  Codecov report uploader 0.2.4
[2022-07-25T18:41:13.041Z] ['info'] => Project root located at: /home/runner/work/cas/cas
[2022-07-25T18:41:13.046Z] ['info'] -> No token specified or token is empty
[2022-07-25T18:41:13.072Z] ['info'] Searching for coverage files...
[2022-07-25T18:41:14.093Z] ['info'] => Found 1 possible coverage files:
  ./build/reports/jacoco/jacocoRootReport/jacocoRootReport.xml
[2022-07-25T18:41:14.093Z] ['info'] Processing ./build/reports/jacoco/jacocoRootReport/jacocoRootReport.xml...
[2022-07-25T18:41:14.289Z] ['info'] Detected GitHub Actions as the CI provider.
[2022-07-25T18:41:14.291Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-3.1.0-uploader-0.2.4&token=*******&branch=master&build=2733897624&build_url=https%3A%2F%2Fgithub.com%2Fapereo%2Fcas%2Factions%2Fruns%2F2733897624&commit=dd9eace60d78cf737ef0c3f28facfcd41a096f6d&job=Tests+-+Ubuntu&pr=&service=github-actions&slug=apereo%2Fcas&name=mail&tag=&flags=mail&parent=
[2022-07-25T18:41:14.578Z] ['error'] There was an error running the uploader: Error uploading to 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')}

Expected Results

Upload should successfully pass. Do we need to specify upload tokens?

@mmoayyed strange… you shouldn’t have to. I see that you added in the token. I’m pretty sure the issue you ran into is a result of this.

Ah I see. I was thrown off by the error message. Thanks much! I suppose I could remove the token then?

@mmoayyed yes it should be safe to remove with public projects using GitHub Actions

[2022-10-27T00:48:13.867Z] [‘error’] There was an error running the uploader: Error uploading to 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’)}

Just happened in the past hour.

[2022-10-27T17:57:05.146Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-3.1.1-uploader-0.3.2&token=*******&branch=up&build=3339732148&build_url=https%3A%2F%2Fgithub.com%2Funional%2Fsearch-packages%2Factions%2Fruns%2F3339732148&commit=2a9eb2fab9f9888b645597c0b518bed47d12a5df&job=pull-request&pr=44&service=github-actions&slug=unional%2Fsearch-packages&name=&tag=&flags=&parent=
[2022-10-27T17:57:10.417Z] ['error'] There was an error running the uploader: Error uploading to 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')}

Another failure. It is very frequent.

@unional thanks for letting us know, we are working on a longer term fix for this issue.

I am also seeing this issue…
https://github.com/ansible-collections/community.hashi_vault/actions/runs/3373349479/jobs/5598109920#step:5:96

@tom is there anywhere we can track the long term dix for this issue?
Is there a short term fix for the issue?

@unional @briantist @mmoayyed yes, I’m tracking the issue here

this is similar as mine using private repository