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

ignore coverage for benchmarks and examples #462

Merged
merged 2 commits into from
Nov 29, 2023

Conversation

danieleades
Copy link
Contributor

ignore benchmarks and examples which are artificially lowering the coverage.

@danieleades
Copy link
Contributor Author

codecov should be posting coverage diffs on the PRs by the way. @dwrensha not sure if you need to toggle anything on over at https://app.codecov.io/github/capnproto/capnproto-rust?

Occasionally the codecov bot is impacted by rate limiting of the github API it uses so it could just be related to that

@danieleades danieleades marked this pull request as draft November 29, 2023 18:26
@danieleades
Copy link
Contributor Author

i'll leave this as a draft until i can confirm the report is updating as expected

@dwrensha
Copy link
Member

I clicked around a bunch, bunch I don't think I changed any settings.

I did notice on #461 that codecov failed on the upload step like this:

Run codecov/codecov-action@v3
==> linux OS detected
https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (b9282b8b43eef83f722646d8992c4dd36563046afe0806722184e7e9923a6d7b  codecov)
==> Running version latest
==> Running version v0.7.1
/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov -n  -Q github-action-3.1.4 -f lcov.info -C 7e6247fa6b15e3314a9314d942b2c7a7f571588d
[2023-11-29T17:10:39.371Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.7.1
[2023-11-29T17:10:39.379Z] ['info'] => Project root located at: /home/runner/work/capnproto-rust/capnproto-rust
[2023-11-29T17:10:39.380Z] ['info'] -> No token specified or token is empty
[2023-11-29T17:10:39.388Z] ['info'] Searching for coverage files...
[2023-11-29T17:10:39.455Z] ['info'] => Found 1 possible coverage files:
  lcov.info
[2023-11-29T17:10:39.455Z] ['info'] Processing /home/runner/work/capnproto-rust/capnproto-rust/lcov.info...
[2023-11-29T17:10:39.571Z] ['info'] Detected GitHub Actions as the CI provider.
[2023-11-29T17:10:39.864Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-3.1.4-uploader-0.7.1&token=*******&branch=coverage-build-script&build=7035998763&build_url=https%3A%2F%2Fgithub.com%2Fcapnproto%2Fcapnproto-rust%2Factions%2Fruns%2F7035998763%2Fjob%2F19147778790&commit=7e6247fa6b15e3314a9314d942b2c7a7f571588d&job=Code+Coverage&pr=461&service=github-actions&slug=capnproto%2Fcapnproto-rust&name=&tag=&flags=&parent=
[2023-11-29T17:10:40.064Z] ['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')}

Weirdly, the overall run was still reported as a success.

@danieleades
Copy link
Contributor Author

danieleades commented Nov 29, 2023

Ah yeah, that's the gitlab API rate limiting issue. If you add the repo's GitHub token to the action that apparently resolves that. There's some docs on the issue and the solution here- https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954/1

I'll give it a go on this PR when I get a moment

@dwrensha
Copy link
Member

I logged into codecov.com and gave the app permission on this repo. Maybe that will help.

@danieleades
Copy link
Contributor Author

danieleades commented Nov 29, 2023

I logged into codecov.com and gave the app permission on this repo. Maybe that will help.

i've also added the token to the github action, but you'll need to add the token to the repo 'secrets' for that to work

EDIT: seems to be working even without the token, whatever you did seems to have worked. Might still be worth adding the token though, in order to avoid that rate limiting issue. What do you think?

Copy link

codecov bot commented Nov 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a95d3e3) 48.54% compared to head (8c19dc0) 51.20%.
Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #462      +/-   ##
==========================================
+ Coverage   48.54%   51.20%   +2.65%     
==========================================
  Files          80       69      -11     
  Lines       34529    33623     -906     
==========================================
+ Hits        16762    17216     +454     
+ Misses      17767    16407    -1360     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@danieleades danieleades marked this pull request as ready for review November 29, 2023 19:59
@dwrensha dwrensha merged commit 2422910 into capnproto:master Nov 29, 2023
9 checks passed
@danieleades danieleades deleted the codecov-config branch November 29, 2023 20:18
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

Successfully merging this pull request may close these issues.

2 participants