Skip to content

ci: disable codecov for pull requests from forks to prevent CI failures - #12

Merged
ChrisRackauckas merged 1 commit into
masterfrom
at/disable-codecov-for-forks
May 16, 2024
Merged

ChrisRackauckas merged 1 commit into
masterfrom
at/disable-codecov-for-forks

Conversation

@thazhemadam

Copy link
Copy Markdown
Member

Since Codecov now does tokenless uploads, it easily hits the GitHub rate limits, causing the codecov step, and by extension the CI itself, to spuriously fail.

error - 2024-05-14 13:57:26,203 -- Commit creating failed: {"detail":"Tokenless has reached GitHub rate limit. Please upload using a token: https://docs.codecov.com/docs/adding-the-codecov-token. Expected available in 379 seconds."}

This could be worked around by setting fail_ci_if_error to false as well. However, that is not a better solution for two reasons.

  1. The Codecov CI step can spend an indeterminate amount of time waiting waiting for the token to be available per GitHub's rate limit, causing unnecessarily long CI running times. Timing out this step isn't a better option either, since there is no deterministic amount of time that this step is guaranteed to always take.
  2. Disabling fail_ci_if_error would mean that whenever codecov does run (i.e., on main/master, etc), if coverage reporting failed then CI would not report it appropriately, leaving underlying issues undiagnosed.

Since Codecov now does tokenless uploads, it easily hits the GitHub
rate limits, causing the codecov step, and by extension the CI itself,
to spuriously fail.

```
error - 2024-05-14 13:57:26,203 -- Commit creating failed: {"detail":"Tokenless has reached GitHub rate limit. Please upload using a token: https://docs.codecov.com/docs/adding-the-codecov-token. Expected available in 379 seconds."}
```

This could be worked around by setting `fail_ci_if_error` to false as
well. However, that is not a better solution for two reasons.
  1. The Codecov CI step can spend an indeterminate amount of time waiting
     waiting for the token to be available per GitHub's rate limit,
     causing unnecessarily long CI running times.
     Timing out this step isn't a better option either, since there is
     no deterministic amount of time that this step is guaranteed to
     always take.
  2. Disabling `fail_ci_if_error` would mean that whenever codecov does
     run (i.e., on `main`/`master`, etc), if coverage reporting failed
     then CI would not report it appropriately, leaving underlying
     issues undiagnosed.
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