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

no comment on PRs when using v5 and app is not installed #1759

Closed
HarelM opened this issue Feb 4, 2025 · 7 comments
Closed

no comment on PRs when using v5 and app is not installed #1759

HarelM opened this issue Feb 4, 2025 · 7 comments
Assignees

Comments

@HarelM
Copy link

HarelM commented Feb 4, 2025

See the title - the coverage comment does not appear if the app is not installed.
This is in continue to:

The following PR was created after disabling the codecov app, and as can be seen no coverage report comment is generated:

Image

@thomasrockhu-codecov let me know if you need more details in order to address this.

@thomasrockhu-codecov thomasrockhu-codecov self-assigned this Feb 4, 2025
@HarelM
Copy link
Author

HarelM commented Feb 5, 2025

Here's another repo with the same issue:
IsraelHikingMap/planet-search#22
It's a lot smaller, with a lot less CI runs.
Feel free to try things there...

@thomasrockhu-codecov
Copy link
Contributor

thomasrockhu-codecov commented Feb 6, 2025

Ok, @HarelM I finally got a good answer for this. The App is NOT required, however, it is strongly recommended. Why is that? Well, the issue comes down to GitHub rate limiting. With the app, we are far less limited due to it using the app credentials to call GitHub's API (and subsequently the API to post comments). Without the app, we use Codecov's own token which, as you might expect, gets rate limited quite quickly.

As a result, not having the app does not guarantee that you will get a comment or status checks.

As for why did this work on v4? The v4 and v5 release are mutually exclusive from this problem. We have done some things on our side to help curtail the number of GitHub calls we make, but it is still unlikely to get a comment from Codecov when the app is not set up.

@HarelM
Copy link
Author

HarelM commented Feb 6, 2025

Thanks for looking into this!
The main problem I'm facing with the app is that it marks build as failing (red x next to PR in the PR list) when coverage is missing.
While I think coverage is important, I don't want it to mark build as failing.
I couldn't find a configuration for this in the GitHub actions and I don't want to introduce a config file for each repo I use codecov in (which is a lot).
Can you direct me to where I can find information about this?

@thomasrockhu-codecov
Copy link
Contributor

thomasrockhu-codecov commented Feb 6, 2025

@HarelM ok, here are some cases

  1. Don't fail checks, but assuming SOME coverage report gets uploaded
    In a coverage.yml file, add
coverage:
  status:
    project:
      default:
        informational: true
    patch:
      default:
        informational: true
  1. Fail checks if coverage is below target, but if no coverage report is uploaded, succeed
    Have a job in the CI workflow that runs the empty-upload command
- name: Upload empty report to Codecov
  uses: codecov/codecov-action@v5
  with:
    token: ${{ secrets.CODECOV_TOKEN }}
    run_command: empty-upload
  1. Don't fail checks, but sometimes no coverage is uploaded
    Probably a combination of 1 and 2

Let me know if this helps!

@HarelM
Copy link
Author

HarelM commented Feb 6, 2025

I'm trying to avoid the need to add a codecov.yml file to every repo I add codecov to (again, a lot of repos...).
Is it possible to somehow inline the codecov.yml into the github action yml so that I have everything in one place and I can easily copy paste it from one repo to another?

@thomasrockhu-codecov
Copy link
Contributor

@HarelM unfortunately not, but you can add an org level yaml in the Codecov UI here

@HarelM
Copy link
Author

HarelM commented Feb 7, 2025

Thanks for the hint, for the IsraelHikingMap organization I test it, and it seems to do the job.
Thanks!!

@HarelM HarelM closed this as completed Feb 7, 2025
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

No branches or pull requests

2 participants