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

Token ignored on forked repo leading to failed coverage upload #1592

Closed
SebastianAment opened this issue Oct 2, 2024 · 3 comments
Closed
Labels
bug Something isn't working Medium Medium Priority Issues (to be fixed or re-evaluated in 3 months

Comments

@SebastianAment
Copy link

SebastianAment commented Oct 2, 2024

Hi experts,

We are running into coverage upload failures, seemingly for a very similar reason to the issue codecov/feedback#358 (comment), which was fixed at the time by #1471.

Since today (could be related to release 4.6.0) we are running into a similar issue, where the token is ignored for forked repos and the upload fails because the token is required for protected branches, see https://github.com/facebook/Ax/actions/runs/11151452009/job/30994900275?pr=2813.

I'd appreciate your help with this.

Copying the logs:

Run codecov/codecov-action@v4
eventName: pull_request
baseRef: facebook:main | headRef: SebastianAment:export-D63638706
==> 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) <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1
gpg: Signature made Wed Oct  2 15:02:36 2024 UTC
gpg:                using RSA key 27034E7FDB850E0BBC2C62FF806BB28AED779869
gpg: Good signature from "Codecov Uploader (Codecov Uploader Verification Key) <[email protected]>" [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 (6e36d96b22f37661f378ec7f40c7d89701d4f252d729f4213e7da4c6c2703e85  codecov)
==> Running version latest
==> Running version v0.7.5
==> Running git config --global --add safe.directory /home/runner/work/Ax/Ax
/usr/bin/git config --global --add safe.directory /home/runner/work/Ax/Ax
==> 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 -B SebastianAment:export-D63638706 -C 80c40acf2ffbb6e5df25383383941a0cfb8f35ad -Z
info - 2024-10-02 21:09:10,595 -- ci service found: github-actions
warning - 2024-10-02 21:09:10,600 -- No config file could be found. Ignoring config.
info - 2024-10-02 21:09:10,602 -- The PR is happening in a forked repo. Using tokenless upload.
info - 2024-10-02 21:09:10,877 -- 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 80c40acf2ffbb6e5df25383383941a0cfb8f35ad -Z
info - 2024-10-02 21:09:[11](https://github.com/facebook/Ax/actions/runs/11151452009/job/30994900275?pr=2813#step:8:12),596 -- ci service found: github-actions
warning - 2024-10-02 21:09:11,602 -- No config file could be found. Ignoring config.
info - 2024-10-02 21:09:11,822 -- Process Report creating complete
error - 2024-10-02 21:09:11,822 -- 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
@ssbarnea
Copy link

ssbarnea commented Oct 4, 2024

For sure v4.6.0 introduced regression around authentication, see #1594

@drazisil-codecov drazisil-codecov added bug Something isn't working Medium Medium Priority Issues (to be fixed or re-evaluated in 3 months labels Oct 10, 2024
@SebastianAment
Copy link
Author

Seems to have been fixed.

@ClementWalter
Copy link

I'm using codecov/codecov-action@v4 and facing this issue. How to solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Medium Medium Priority Issues (to be fixed or re-evaluated in 3 months
Projects
None yet
Development

No branches or pull requests

4 participants