codecov-action: Inconsistent - Token required because branch is protected
On a public repo, i’m getting inconsistent results with codecov-v4
e.g. https://github.com/opensearch-project/opensearch-migrations/pull/1016
First Run - Successful
Run codecov/codecov-action@v4
evenName: pull_request
baseRef: opensearch-project:main | headRef: AndreKurait:FixSetHeaderExtraArgs
==> Fork detected, tokenless uploading used
evenName: pull_request
baseRef: opensearch-project:main | headRef: AndreKurait:FixSetHeaderExtraArgs
==> Fork detected, tokenless uploading used
evenName: pull_request
baseRef: opensearch-project:main | headRef: AndreKurait:FixSetHeaderExtraArgs
==> Fork detected, tokenless uploading used
==> linux OS detected
https://cli.codecov.io/latest/linux/codecov.SHA256SUM
gpg: directory '/home/runner/.gnupg' created
gpg: keybox '/home/runner/.gnupg/pubring.kbx' created
gpg: /home/runner/.gnupg/trustdb.gpg: trustdb created
gpg: key 806BB28AED779869: public key "Codecov Uploader (Codecov Uploader Verification Key) <security@codecov.io>" imported
gpg: Total number processed: 1
gpg: imported: 1
gpg: Signature made Fri Aug [16](https://github.com/opensearch-project/opensearch-migrations/actions/runs/11058330515/job/30724095698?pr=1016#step:5:17) 23:23:14 2024 UTC
gpg: using RSA key 27034E7FDB850E0BBC2C62FF806BB28AED779869
gpg: Good signature from "Codecov Uploader (Codecov Uploader Verification Key) <security@codecov.io>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 2703 4E7F DB85 0E0B BC2C 62FF 806B B28A ED77 9869
==> Uploader SHASUM verified (eb90[20](https://github.com/opensearch-project/opensearch-migrations/actions/runs/11058330515/job/30724095698?pr=1016#step:5:21)09cb800fdefbce291c1357953f80e29382f43c7a98cce3b57d2b4d8cec codecov)
==> Running version latest
==> Running version v0.7.4
==> Running git config --global --add safe.directory /home/runner/work/opensearch-migrations/opensearch-migrations
/usr/bin/git config --global --add safe.directory /home/runner/work/opensearch-migrations/opensearch-migrations
==> Running command '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-commit'
/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-commit --git-service github -C cea160a44ad1038bdd62054da250f1655206d1b8 -Z
info - 2024-09-25 [21](https://github.com/opensearch-project/opensearch-migrations/actions/runs/11058330515/job/30724095698?pr=1016#step:5:22):23:42,715 -- ci service found: github-actions
info - 2024-09-25 21:[23](https://github.com/opensearch-project/opensearch-migrations/actions/runs/11058330515/job/30724095698?pr=1016#step:5:24):42,723 -- The PR is happening in a forked repo. Using tokenless upload.
info - 20[24](https://github.com/opensearch-project/opensearch-migrations/actions/runs/11058330515/job/30724095698?pr=1016#step:5:25)-09-25 21:23:43,132 -- Process Commit creating complete
==> Running command '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-report'
/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-report --git-service github -C cea160a44ad1038bdd62054da[25](https://github.com/opensearch-project/opensearch-migrations/actions/runs/11058330515/job/30724095698?pr=1016#step:5:26)0f1655206d1b8 -Z
info - 2024-09-25 21:23:43,847 -- ci service found: github-actions
info - 2024-09-25 21:23:44,[28](https://github.com/opensearch-project/opensearch-migrations/actions/runs/11058330515/job/30724095698?pr=1016#step:5:29)6 -- Process Report creating complete
info - 2024-09-25 21:23:44,286 -- Finished creating report successfully --- {"response": "{\"status\":\"queued\"}\n"}
==> Running command '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov do-upload'
/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov do-upload -Z -f ./coverage.xml --git-service github -C cea160a44ad1038bdd62054da250f1655206d1b8
info - 2024-09-25 21:23:45,002 -- ci service found: github-actions
warning - 2024-09-25 21:23:45,010 -- xcrun is not installed or can't be found.
warning - 2024-09-25 21:23:45,0[32](https://github.com/opensearch-project/opensearch-migrations/actions/runs/11058330515/job/30724095698?pr=1016#step:5:33) -- No gcov data found.
warning - 2024-09-25 21:23:45,032 -- coverage.py is not installed or can't be found.
warning - 2024-09-25 21:23:45,059 -- Some files were not found --- {"not_found_files": ["coverage.xml"]}
info - 2024-09-25 21:23:45,092 -- Found 1 coverage files to report
info - 2024-09-25 21:23:45,092 -- > /home/runner/work/opensearch-migrations/opensearch-migrations/TrafficCapture/dockerSolution/src/main/docker/migrationConsole/console_api/coverage.xml
info - 2024-09-25 21:23:45,684 -- Your upload is now processing. When finished, results will be available at: https://app.codecov.io/github/opensearch-project/opensearch-migrations/commit/cea160a44ad10[38](https://github.com/opensearch-project/opensearch-migrations/actions/runs/11058330515/job/30724095698?pr=1016#step:5:39)bdd62054da250f1655206d1b8
info - 2024-09-25 21:23:45,975 -- Process Upload complete
Subsequent Run - Failure
Run codecov/codecov-action@v4
evenName: pull_request
baseRef: opensearch-project:main | headRef: AndreKurait:FixSetHeaderExtraArgs
==> Fork detected, tokenless uploading used
evenName: pull_request
baseRef: opensearch-project:main | headRef: AndreKurait:FixSetHeaderExtraArgs
==> Fork detected, tokenless uploading used
evenName: pull_request
baseRef: opensearch-project:main | headRef: AndreKurait:FixSetHeaderExtraArgs
==> Fork detected, tokenless uploading used
==> linux OS detected
https://cli.codecov.io/latest/linux/codecov.SHA256SUM
gpg: directory '/home/runner/.gnupg' created
gpg: keybox '/home/runner/.gnupg/pubring.kbx' created
gpg: /home/runner/.gnupg/trustdb.gpg: trustdb created
gpg: key 806BB28AED779869: public key "Codecov Uploader (Codecov Uploader Verification Key) <security@codecov.io>" imported
gpg: Total number processed: 1
gpg: imported: 1
gpg: Signature made Fri Aug [16](https://github.com/opensearch-project/opensearch-migrations/actions/runs/11058330515/job/30724095698?pr=1016#step:5:17) 23:23:14 2024 UTC
gpg: using RSA key 27034E7FDB850E0BBC2C62FF806BB28AED779869
gpg: Good signature from "Codecov Uploader (Codecov Uploader Verification Key) <security@codecov.io>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 2703 4E7F DB85 0E0B BC2C 62FF 806B B28A ED77 9869
==> Uploader SHASUM verified (eb902009cb800fdefbce291c1357953f80e29382f43c7a98cce3b57d2b4d8cec codecov)
==> Running version latest
==> Running version v0.7.4
==> Running git config --global --add safe.directory /home/runner/work/opensearch-migrations/opensearch-migrations
/usr/bin/git config --global --add safe.directory /home/runner/work/opensearch-migrations/opensearch-migrations
==> Running command '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-commit'
/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-commit --git-service github -C cb162006e653a[17](https://github.com/opensearch-project/opensearch-migrations/actions/runs/11058330515/job/30724095698?pr=1016#step:5:18)23ec910d17de13b0ea8525550 -Z
info - 2024-09-26 18:44:15,790 -- ci service found: github-actions
info - 2024-09-26 [18](https://github.com/opensearch-project/opensearch-migrations/actions/runs/11058330515/job/30724095698?pr=1016#step:5:19):44:15,798 -- The PR is happening in a forked repo. Using tokenless upload.
info - [20](https://github.com/opensearch-project/opensearch-migrations/actions/runs/11058330515/job/30724095698?pr=1016#step:5:21)24-09-26 18:44:16,057 -- Process Commit creating complete
==> Running command '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-report'
/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-report --git-service github -C cb162006e653a17[23](https://github.com/opensearch-project/opensearch-migrations/actions/runs/11058330515/job/30724095698?pr=1016#step:5:24)ec910d17de13b0ea8525550 -Z
info - 2024-09-26 18:44:16,771 -- ci service found: github-actions
info - 20[24](https://github.com/opensearch-project/opensearch-migrations/actions/runs/11058330515/job/30724095698?pr=1016#step:5:25)-09-26 18:44:17,038 -- Process Report creating complete
error - 2024-09-[26](https://github.com/opensearch-project/opensearch-migrations/actions/runs/11058330515/job/30724095698?pr=1016#step:5:27) 18:44:17,039 -- Report creating failed: {"message":"Token required because branch is protected"}
Error: Codecov:
Failed to properly create report: The process '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov' failed with exit code 1
0s
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 13
- Comments: 35 (17 by maintainers)
Commits related to this issue
- Update to CodeCov @v5 (#608) <!-- Thanks for sending a pull request! Here are some tips for you: 1. If this is your first time, please read our contributor guidelines: https://github.com/delta-in... — committed to delta-io/delta-kernel-rs by nicklan 2 years ago
- Update codecov action (?) Getting inconsistent errors in CI, maybe due to a codecov issue? - Example: https://github.com/mila-iqia/milatools/actions/runs/12419445408/job/34676165915?pr=137 - Issue on... — committed to lebrice/milatools by lebrice 2 years ago
- Switch from Poetry to UV (#137) * Switch from Poetry to UV Signed-off-by: Fabrice Normandin <normandf@mila.quebec> * Fix pre-commit issues, get removesuffix from `str` Signed-off-by: Fabrice Norma... — committed to mila-iqia/milatools by lebrice 2 years ago
- Trying https://github.com/codecov/codecov-action/issues/1580 — committed to theoboldt/juvem by theoboldt 2 years ago
@thomasrockhu-codecov just wanted to share we’ve had no issues so far, around 3-4 PRs across 2-3 repos since then.
This one is really strange, I’m syncing with the product team to try to understand why this is happening.
That said, we are planning to release action@v5 in the next 2 weeks (likely next week) which SHOULD fix this issue too.
@thomasrockhu-codecov Not sure if would help but wanted to share that we are seeing this issue too. No branch projection has been added.
The first commit passes https://github.com/diffpy/diffpy.utils/pull/158/commits/87a5b6de22fe03ffbfe20ed1a489bac3dc942880, but when a new commit (https://github.com/diffpy/diffpy.utils/pull/158/commits/f45ba82518407988b66f4bf32f914e1938f43d6b) is added, it starts to fail with the message.
@thomasrockhu-codecov I just hit this again, can we reopen this?
I only ever get it after pushing multiple commits after creating a PR.
It appears to be a bug in detecting the fork
==> Fork detected, tokenless uploading used, whereas the PR and action is on a public repo.https://github.com/opensearch-project/opensearch-migrations/actions/runs/11726398842/job/32664937244?pr=1120
Going to close this one out for now, @greg0ire I’ll take a look at that issue
@thomasrockhu-codecov I don’t know as I’m not the owner of the repository, but I’ve not seen this failure for a few weeks so I assume it’s just been fixed 🤷
I’m getting this quite a lot suddenly on https://github.com/google/osv-scanner - this only started happening in the last couple of weeks and afaik there have not been any changes to the branch protection rules (@another-rex could you confirm this?)
Some action examples: