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 uploads fail #1090

Closed
BenediktBurger opened this issue Apr 11, 2024 · 5 comments
Closed

Codecov uploads fail #1090

BenediktBurger opened this issue Apr 11, 2024 · 5 comments
Labels
bug dependency Issue in an external dependency

Comments

@BenediktBurger
Copy link
Member

BenediktBurger commented Apr 11, 2024

See for example: https://github.com/pymeasure/pymeasure/actions/runs/8646275960/job/23705256912?pr=1086

That is the upstream issue:

Log entry:

[2024-04-11T12:00:18.997Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-3.1.6-uploader-0.7.2&token=*******&branch=dev%2Fkepco-bop-bit-4886&build=8646275960&build_url=https%3A%2F%2Fgithub.com%2Fpymeasure%2Fpymeasure%2Factions%2Fruns%2F8646275960&commit=e15c0c18bccc682b73428ba47e74ad3724f9402a&job=PyMeasure+CI&pr=1086&service=github-actions&slug=pymeasure%2Fpymeasure&name=codecov-umbrella&tag=&flags=unittests&parent=
[2024-04-11T12:00:18.997Z] ['verbose'] Passed token was 0 characters long
[2024-04-11T12:00:18.997Z] ['verbose'] https://codecov.io/upload/v4?package=github-action-3.1.6-uploader-0.7.2&branch=dev%2Fkepco-bop-bit-4886&build=8646275960&build_url=https%3A%2F%2Fgithub.com%2Fpymeasure%2Fpymeasure%2Factions%2Fruns%2F8646275960&commit=e15c0c18bccc682b73428ba47e74ad3724f9402a&job=PyMeasure+CI&pr=1086&service=github-actions&slug=pymeasure%2Fpymeasure&name=codecov-umbrella&tag=&flags=unittests&parent=
        Content-Type: 'text/plain'
        Content-Encoding: 'gzip'
        X-Reduced-Redundancy: 'false'
[2024-04-11T12:00:19.180Z] ['error'] There was an error running the uploader: Error uploading to [https://codecov.io:](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')}
[2024-04-11T12:00:19.181Z] ['verbose'] The error stack is: Error: Error uploading to [https://codecov.io:](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')}
    at main (/snapshot/repo/dist/src/index.js)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[2024-04-11T12:00:19.181Z] ['verbose'] End of uploader: 1052 milliseconds
Error: Codecov: Failed to properly upload: The process '/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov' failed with exit code 255
This was referenced Apr 11, 2024
@BenediktBurger
Copy link
Member Author

The current master branch (after merging) can upload.
It seems to be only on branches, which are on forks.

@BenediktBurger BenediktBurger added bug dependency Issue in an external dependency labels Apr 27, 2024
@BenediktBurger
Copy link
Member Author

One solution could be to set fail_ci_if_error to false.
That way, the CI always succeeds, regardless, whether the upload succeeds or not.

@BenediktBurger
Copy link
Member Author

@driftregion commented in #1091 (comment) :

It seems the established solution is to use pull_request_target. Example: hyperledger/firefly-tezosconnect#20

See also:
codecov/codecov-action#29

This solution seems to be unviable if there is potential for abuse of the codecov token or other secrets. I haven't yet found anything on whether or not it's possible to isolate secrets to a particular workflow.

@BenediktBurger
Copy link
Member Author

The bump of the codecov action to version 4 (#1099 ) seemed to work.
At least #1046 succeeded now.

If all following PRs succeed (after having merged the updated CI), we can close this issue.

@BenediktBurger
Copy link
Member Author

The following pull request checks succeeded, so version 4 seems to solve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dependency Issue in an external dependency
Projects
None yet
Development

No branches or pull requests

1 participant