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

Troubleshoot codecov failures to upload coverage data #3376

Merged
merged 25 commits into from
Oct 11, 2024

Conversation

scorbajio
Copy link
Contributor

This PR looks into issues that codecov is having with uploading coverage info. Currently, only the tx package is reporting coverage in codecov.

This PR was originally at #3375 before it was accidentally closed by resetting and force pushing the head commit.

@scorbajio
Copy link
Contributor Author

scorbajio commented May 1, 2024

Currently, the logs show codecov-action errors related to token issues, such as here:

[2024-04-25T19:13:10.355Z] ['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')}

Also, a new major version of codecov-action has been released that does not support tokenless uploads.
In order to experiment with fixing the current errors or potentially even just updating to version 4.3.0 of codecov-actions, a codecov token can be used by adding it to github actions secrets.

Some resources on adding the token:

@holgerd77
Copy link
Member

What is the status of this?

CodeCov is not running RN, is this correct? It would generally be good (somewhat urgent) to have code coverage working again.

@scorbajio
Copy link
Contributor Author

What is the status of this?

CodeCov is not running RN, is this correct? It would generally be good (somewhat urgent) to have code coverage working again.

Yes, that's correct, codecov-action@v3 errors out currently as can be seen in the above comment and also, from a more recent CI run, here:

[2024-10-09T19:25:07.565Z] ['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: 429 - {"message":"Rate limit reached. Please upload with the Codecov repository upload token to resolve issue. Expected time to availability: 2866s."}

In this PR, I've changed a workflow file to upload a token. This token needs to be added by the CodeCov and Github repo admin (can see this article for help with doing so). @holgerd77 would you or someone with access be able to add this token to the repo? This may be enough to unblock us for now, and I would be able to also look into upgrading codecov-action@v3 to the newest major version.

@holgerd77
Copy link
Member

@scorbajio ah ok, yes I do remember the token request, sorry for not follwing up! 😬

Have now added following the instructions you linked! Would be great if you can re-pick this up! Living without coverage for far too long already! 🙂

Copy link

codecov bot commented Oct 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 27.46%. Comparing base (4470cc3) to head (07ffdde).
Report is 96 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block 67.57% <ø> (-5.89%) ⬇️
blockchain 83.49% <ø> (?)
client 0.00% <ø> (ø)
common 89.85% <ø> (?)
devp2p 0.00% <ø> (?)
evm 65.18% <ø> (?)
genesis 0.00% <ø> (?)
mpt 52.10% <ø> (?)
statemanager 67.41% <ø> (?)
tx 76.70% <ø> (-1.08%) ⬇️
util 71.23% <ø> (?)
vm 58.28% <ø> (?)
wallet 0.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@scorbajio
Copy link
Contributor Author

scorbajio commented Oct 11, 2024

As can be seen on codecov, uploads of coverage data is successfully happening as expected. The issue was the secrets were not being passed from the build.yml file job that was calling the mpt build job, so this secrets: inherit fixes the issue. This comment helped in the process of figuring this out. Codecov-actions has been upgraded to v4 with this change as well.

Copy link
Contributor

@acolytec3 acolytec3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done sir! LGTM

@scorbajio scorbajio merged commit 9a4dabd into master Oct 11, 2024
41 checks passed
@scorbajio scorbajio deleted the troubleshoot-coverage-upload-failure branch October 11, 2024 20:39
@holgerd77
Copy link
Member

Cool! 🎉

@scorbajio scorbajio changed the title Toubleshoot codecov failures to upload coverage data Troubleshoot codecov failures to upload coverage data Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants