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

Unable to locate build via Github Actions API #903

Closed
adamjstewart opened this issue Jan 28, 2023 · 9 comments
Closed

Unable to locate build via Github Actions API #903

adamjstewart opened this issue Jan 28, 2023 · 9 comments

Comments

@adamjstewart
Copy link

We've been seeing intermittent upload failures recently that have caused problems with coverage reporting. The full error log looks like:

==> 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/v3.1.1/dist/codecov -n  -Q github-action-3.1.1
[2023-01-26T16:20:56.003Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.3.2
[2023-01-26T16:20:56.021Z] ['info'] => Project root located at: /home/runner/work/torchgeo/torchgeo
[2023-01-26T16:20:56.025Z] ['info'] -> No token specified or token is empty
[2023-01-26T16:20:56.230Z] ['info'] Running coverage xml...
[2023-01-26T16:20:57.507Z] ['info'] Searching for coverage files...
[2023-01-26T16:20:57.613Z] ['info'] Warning: Some files located via search were excluded from upload.
[2023-01-26T16:20:57.613Z] ['info'] If Codecov did not locate your files, please review https://docs.codecov.com/docs/supported-report-formats
[2023-01-26T16:20:57.613Z] ['info'] => Found 1 possible coverage files:
  coverage.xml
[2023-01-26T16:20:57.614Z] ['info'] Processing /home/runner/work/torchgeo/torchgeo/coverage.xml...
[2023-01-26T16:20:57.623Z] ['info'] Detected GitHub Actions as the CI provider.
[2023-01-26T16:20:57.625Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-3.1.1-uploader-0.3.2&token=*******&branch=main&build=4016999956&build_url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Ftorchgeo%2Factions%2Fruns%2F4016999956&commit=fa46d111b266148dba6cc1df7c974d540d7b6729&job=tests&pr=&service=github-actions&slug=microsoft%2Ftorchgeo&name=&tag=&flags=&parent=
[2023-01-26T16:21:00.875Z] ['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')}

Examples of this behavior include:

@rowanseymour
Copy link

You need to use the action with a token despite what the documentation says (that it's only the case for private repos). We used to have this problem and builds would generally pass if you re-ran them. With tokens we haven't seen this error.

@adamjstewart
Copy link
Author

Thanks, will try this. If this is true, someone should either fix the documentation or fix the bug that makes it required. It works 95% of the time for us, but that 5% is really frustrating.

@adamjstewart
Copy link
Author

adamjstewart commented Feb 14, 2023

@devantler
Copy link

I am also seeing this error from time to time. It tends to happen a lot for some time, and then not happen for a few weeks before reappearing.

I do not use the token, but I have tested with and without the token when the issue appears, and neither works.

@rowanseymour
Copy link

@adamjstewart looking at your logs you've shared it doesn't seem you are using a token..

  Codecov report uploader 0.3.2
[2023-02-13T21:42:48.484Z] ['info'] => Project root located at: /home/runner/work/torchgeo/torchgeo
[2023-02-13T21:42:48.488Z] ['info'] -> No token specified or token is empty

@adamjstewart
Copy link
Author

it doesn't seem you are using a token

And yet I am. microsoft/torchgeo#1077 was merged into main 3 weeks ago. microsoft/torchgeo#1109 was automatically created by dependabot and branched off of main 1 week ago.

Is it possible that PRs opened by external collaborators do not have access to secrets? If so, then the "just add a token" fix is no longer a fix.

@rowanseymour
Copy link

Hmm the blurb from the repo settings > secrets page says:

"Anyone with collaborator access to this repository can use these secrets and variables for actions. They are not passed to workflows that are triggered by a pull request from a fork."

@adamjstewart
Copy link
Author

Gotcha, so secrets aren't particularly useful for open source projects. So we should figure out why tokens are necessary (sometimes) to upload coverage reports.

@thomasrockhu-codecov
Copy link
Contributor

Closing this in favor of codecov/feedback#126

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