codecov-action
codecov-action copied to clipboard
Create commit fails after too many retries when upgrading to codecov-action v4
When upgrading from v3.1.4 to v4.x.x we are seeing that the report upload is failing. The required token is being passed to the action and it works on v3. The full output is at https://github.com/sillsdev/TheCombine/actions/runs/8632978671/job/23665019290?pr=3003
The traceback shows:
Traceback (most recent call last):
File "codecov_cli/main.py", line 81, in <module>
File "codecov_cli/main.py", line 77, in run
File "click/core.py", line 1157, in __call__
File "click/core.py", line 1078, in main
File "click/core.py", line 1688, in invoke
File "click/core.py", line 1434, in invoke
File "click/core.py", line 783, in invoke
File "click/decorators.py", line 33, in new_func
File "codecov_cli/commands/commit.py", line 64, in create_commit
File "codecov_cli/services/commit/__init__.py", line 28, in create_commit_logic
File "codecov_cli/services/commit/__init__.py", line 64, in send_commit_data
File "codecov_cli/helpers/request.py", line 78, in wrapper
Exception: Request failed after too many retries
[2095] Failed to execute script 'main' due to unhandled exception!
@thomasrockhu-codecov can you take a look?
Can probably take a look, but may be better for someone on the CLI team
@jmgrady it's possible that this coincided towards the end of our degraded performance incident on the 9th of April. Would you mind re-running and reporting if this is still a problem?
jmgrady it's possible that this coincided towards the end of our degraded performance incident on the 9th of April. Would you mind re-running and reporting if this is still a problem?
@rohan-at-sentry,
The problem remains for our project.
Here is the output from the upload attempt: https://github.com/sillsdev/TheCombine/actions/runs/8912800071/job/24477037957
You can see the GitHub workflow at https://github.com/sillsdev/TheCombine/blob/codecov-action-v4/.github/workflows/backend.yml
Thank you for your help. Let me know if there is any more information that you need.
We'll take a look with engineering. Thanks for raising!
Hello @jmgrady,
This issue was brought to my attention yesterday. Thanks for your patience... not sure if you are still having this problem.
In any case seeing your upload_coverage job it seems to be listing some allowed_endpoints.
Loking at the code here the create-commit command sends a request to api.codecov.io by default (unless you are self-hosting codecov). See here
Could you try adding that one?
That was the problem. I added the endpoint and now it uploads fine with v4.
We were still having the problem but were able to use v3 in the meantime.
It is puzzling that the harden-runner action did not produce a report that identified that endpoint - at least I did not see it.
Many thanks for your help.