codecov / feedback

A place to discuss feedback about the pull request and web product experience.
37 stars 7 forks source link

Bug Report: Unable to publish codecov reports for public repository #525

Closed peterzhuamazon closed 1 month ago

peterzhuamazon commented 1 month ago

https://community.codecov.com/t/unable-to-publish-codecov-reports-for-public-repository-using-github-action/4543

Describe the bug A bit similar to Unable to publish codecov reports for public repository one of our recently created repo stuck on private state.

https://github.com/opensearch-project/automation-app

GitHub Action: https://github.com/opensearch-project/automation-app/actions/runs/11078806591/job/30786789771

To Reproduce

info - 2024-09-27 23:04:54,683 -- Found 3 coverage files to report
info - 2024-09-27 23:04:54,683 -- > /home/runner/work/automation-app/automation-app/coverage/lcov.info
info - 2024-09-27 23:04:54,683 -- > /home/runner/work/automation-app/automation-app/coverage/clover.xml
info - 2024-09-27 23:04:54,683 -- > /home/runner/work/automation-app/automation-app/coverage/coverage-final.json
info - 2024-09-27 23:04:54,857 -- Process Upload complete
error - 2024-09-27 23:04:54,858 -- Upload failed: {"message":"Token required because repository is private"}

Expected behavior It should upload without any issues.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context We already set the CODECOV_TOKEN and it still says we are not, and calling it is a private repo while we already make it public. Upload failed: {“message”:“Token required because repository is private”}

Thanks!

saimedhi commented 1 month ago

Hello Team, I am seeing similar error while adding codecov for dashboards-flow-framework repo in PR https://github.com/opensearch-project/dashboards-flow-framework/pull/401.

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: 429 - {"message":"Rate limit reached. Please upload with the Codecov repository upload token to resolve issue. Expected time to availability: 1052s."}

drazisil-codecov commented 1 month ago

@peterzhuamazon I'm not seeing it marked private in the Codecov database. Are you still getting this message?

drazisil-codecov commented 1 month ago

@saimedhi how many times are you trying to upload to Codecov per commit?

saimedhi commented 1 month ago

@saimedhi how many times are you trying to upload to Codecov per commit?

drazisil-codecov commented 1 month ago

@saimedhi Ah, I misread which rate limit it was. As the message says, our GitHub token has run out of rate limits. You will need to use your own, or wait the amount of time the message says.

saimedhi commented 1 month ago

@saimedhi Ah, I misread which rate limit it was. As the message says, our GitHub token has run out of rate limits. You will need to use your own, or wait the amount of time the message says.

@drazisil-codecov, I am using codecov token in this PR https://github.com/opensearch-project/dashboards-flow-framework/pull/401. Could you please confirm if "Rate limit reached" is common even after using codecov token? I am getting the same error after waiting for a day and then running.

drazisil-codecov commented 1 month ago

@saimedhi Can you enable verbose on the Codecov CLI so we can make sure it's correctly finding the token?

saimedhi commented 1 month ago

@saimedhi Can you enable verbose on the Codecov CLI so we can make sure it's correctly finding the token?

Enabled verbose, Getting the following error message :

peterzhuamazon commented 1 month ago

I notice that push event will allow access to secret as pull_request doesnt.

So when I merge my PR and check the workflow triggered by push it goes through......


warning - 2024-09-30 20:26:18,403 -- coverage.py is not installed or can't be found.
info - 2024-09-30 20:26:18,414 -- Found 3 coverage files to report
info - 2024-09-30 20:26:18,414 -- > /home/runner/work/automation-app/automation-app/coverage/clover.xml
info - 2024-09-30 20:26:18,414 -- > /home/runner/work/automation-app/automation-app/coverage/coverage-final.json
info - 2024-09-30 20:26:18,414 -- > /home/runner/work/automation-app/automation-app/coverage/lcov.info
info - 2024-09-30 20:26:18,712 -- Your upload is now processing. When finished, results will be available at: https://app.codecov.io/github/opensearch-project/automation-app/commit/bab72eef5bfade9af0951a19f7eb3c53afc65cf9
info - 2024-09-30 20:26:18,883 -- Process Upload complete

Thanks.

peterzhuamazon commented 1 month ago

I think for my issue this ticket can be closed. Sorry for the confusion on this.

Thanks.