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
[v4] Error: Codecov token not found
in a PR from a fork to a pubilc repo
#1292
Comments
@jishnub thanks for reaching out. We can take a look |
@jishnub are you able to request the failing run to be re-run just to confirm? We suspect that at the time the action ran, we hit Github rate limits which caused our check (to verify if the source was a fork) to fail |
Getting the same error on a public repo as well when using v4, using v3 works fine. |
@clemenscodes can you point me to the run where this happened? |
@rohan-at-sentry this the run in which it happened: https://github.com/clemenscodes/draken/actions/runs/7890558172/job/21532976187 |
I can confirm re-running the job does not lead to the issue, so it could certainly be a rate limit. It's just a bit puzzling when jobs fail at random. Perhaps the error message may be improved? |
Thanks @jishnub - yeah we're working on fixing the error messaging around rate limits (not just on the CLI, but all other user facing touchpoints - PR, UI etc) |
@JoseLion @clemenscodes if you can open a different issue, while I take a look that would be appreciated. This will help me track better. FWIW @clemenscodes - my understanding is that it looks to be separate from this issue (which is about forks). Closing this as the original issue is resolved |
Getting the same error in my own public repo when running As you can see, re-running (once) didn't help. Rolling back to |
The error persists, we had to downgrade to v3. |
## PR Checklist - [x] Addresses an existing open issue: fixes #1303 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md) were taken ## Overview codecov/codecov-action#1292 & codecov/feedback#273 make me not want to deal with this token stuff until it's all resolved. Things were working fine before, and I really don't want to add a _third_ token requirement to repos made with `create-typescript-app`.
Getting hit by this also: https://github.com/burningmantech/ranger-ims-server/actions/runs/7866907121/job/21574339078?pr=1116 |
Me to here https://github.com/kiraware/paspybin/actions/runs/7911211535/job/21595033660. It would be nice if codecov failing the workflow not just passed as everything is ok. |
@kiraware Are you passing the param |
@carlosmondra nice point, i miss the docs. Thanks for pointing it. And for everyone, I was surprised because codecov gave the wrong guide, here is an example of the guide I got when setting up a new repo as you can see, it should using steps:
- uses: actions/checkout@master
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true # optional (default = false)
files: ./coverage1.xml,./coverage2.xml # optional
flags: unittests # optional
name: codecov-umbrella # optional
token: ${{ secrets.CODECOV_TOKEN }} # required
verbose: true # optional (default = false) and via environment variable steps:
- uses: actions/checkout@master
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true # optional (default = false)
files: ./coverage1.xml,./coverage2.xml # optional
flags: unittests # optional
name: codecov-umbrella # optional
verbose: true # optional (default = false)
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} Again, it was my fault not read the docs. But the guide needs to be fixed soon. Thanks. |
On the DSP.jl repo, this happens suspiciously often on macos-latest. 5 / 6 of the most recent Codecov failures are on this platform (2 in a matrix of 8). |
I'm getting the https://github.com/jayqi/failed-build-issue-action/actions/runs/7964800022/job/21822931777 |
Passing it as an input does not seem to work in workflow_calls for unknown reasons. [1] Instead we try to pass it as an environment variable what is also possible according to the action documentation. [2] [1] codecov/codecov-action#1292 (comment) [2] https://github.com/codecov/codecov-action/blob/54bcd87/README.md#usage
With codecov action v3 or v4, even with _official_ tokenless support for open source repos, our CI sometimes fails because codecov hits a rate limit on github API. See issues with codecov action: * codecov/codecov-action#1292 * codecov/codecov-action#1274 The safest way to securely send our test coverage without failures is to configure the token as a github action secret and use that token to connect to codecov. More explanations can be found: * [here](https://about.codecov.io/blog/january-product-update-updating-the-codecov-ci-uploaders-to-the-codecov-cli/) Signed-off-by: Frederic BIDON <[email protected]>
With codecov action v3 or v4, even with _official_ tokenless support for open source repos, our CI sometimes fails because codecov hits a rate limit on github API. See issues with codecov action: * codecov/codecov-action#1292 * codecov/codecov-action#1274 The safest way to securely send our test coverage without failures is to configure the token as a github action secret and use that token to connect to codecov. More explanations can be found: * [here](https://about.codecov.io/blog/january-product-update-updating-the-codecov-ci-uploaders-to-the-codecov-cli/) Signed-off-by: Frederic BIDON <[email protected]>
With codecov action v3 or v4, even with _official_ tokenless support for open source repos, our CI sometimes fails because codecov hits a rate limit on github API. See issues with codecov action: * codecov/codecov-action#1292 * codecov/codecov-action#1274 The safest way to securely send our test coverage without failures is to configure the token as a github action secret and use that token to connect to codecov. More explanations can be found: * [here](https://about.codecov.io/blog/january-product-update-updating-the-codecov-ci-uploaders-to-the-codecov-cli/) Signed-off-by: Frederic BIDON <[email protected]>
Details about the error: codecov/codecov-action#1292
is there a reason for why we need a token for public repos while we didn't before? that's creating a lot of churn/changes |
This reverts commit eb0ec90. Refer to: codecov/codecov-action#1292
@JoseLion to get secrets passed on to a I just ran into the same issue. |
… work as described in the repository's README in some cases for a public repository - codecov/codecov-action#1292
It looks like there's a [bug](codecov/codecov-action#1292) in v4
They hit in limits of calling GitHub API required for identifying workflow run. If you upload with a token, they save GitHub API calls. Best will be if they will have higher limit, but it depends on GitHub itself. |
After spending over an hour grappling with this issue, it seems like my problem was with the token (which is stored as a secret) missing in codecov when triggering via a For anyone facing the same problem, my workaround is passing the secret from the caller job into the workflow job. This allows codecov to receive the token. Here's the change that did the trick for me: https://github.com/Open-Attestation/document-store/pull/170/files I believe you only have to pass the |
It is not workaround but official way to do this (I face same problem a week ago) https://github.com/napari/napari/pull/6701/files It is in documentation, but not clearly written. |
Ah... Glad to know that it's the official way to do it.👍 Is this even mentioned in the documentation? I didn't find anything about this issue. I ended up trying different methods just to pass the token into the action. |
|
My understanding was that a token would not be required when creating a PR from a fork to a public, open-source project. However, in the run https://github.com/JuliaMath/FFTW.jl/actions/runs/7854977161/job/21436255573?pr=295, I encounter
Other runs in the matrix do succeed without a token, e.g. https://github.com/JuliaMath/FFTW.jl/actions/runs/7854977161/job/21436254781?pr=295, as is expected.
The text was updated successfully, but these errors were encountered: