Repository navigation
Install codecov CLI from PyPI (pinned) to fix broken upload verification - #2399
Conversation
The codecov-action v6 wrapper downloads its signing key from https://keybase.io/codecovsecurity/pgp_keys.asc with a bare `curl -s` (no --fail, no retries). That URL now returns 404, so gpg imports an error page ("no valid OpenPGP data found") and the subsequent `gpg --verify` of the codecov CLI fails every upload: gpg: Can't check signature: No public key ==> Could not verify signature. Please contact Codecov if problem continues Upstream: codecov/codecov-action#1876. Vendor the Codecov Uploader Verification Key (2703 4E7F DB85 0E0B BC2C 62FF 806B B28A ED77 9869, taken from codecov's own copy in codecov/test-results-action and cross-checked against the Ubuntu keyserver) and import it into the runner's default keyring before the codecov steps. The wrapper's verify falls back to the default keyring, so signature checking keeps working without disabling verification.
Greptile SummaryThis PR fixes broken Codecov upload steps across all CI jobs by switching away from the default binary download path (
Confidence Score: 5/5Safe to merge — all Codecov upload paths are covered and the pinned version is consistent across job types. The change is a targeted CI workaround touching only codecov-action configuration. All five affected jobs receive the correct fix (use_pypi for GitHub-hosted runners, pre-installed venv + binary path for self-hosted runners), the version pin is applied uniformly at 11.2.8, and the existing step ordering is preserved. No application code is modified. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[CI Job needs Codecov upload] --> B{Runner type?}
B -->|GitHub-hosted\ntests / ci-complete| C[use_pypi: true\nversion: 11.2.8]
C --> D[codecov-action installs\ncli via pip at runtime]
D --> G[Upload succeeds]
B -->|Self-hosted\nself-hosted-tests\nself-hosted-large-tests| E[Install codecov CLI step\nuv venv .codecov-venv\nuv pip install codecov-cli==11.2.8]
E --> F[codecov-action steps use\nbinary: .codecov-venv/bin/codecovcli]
F --> G
Reviews (3): Last reviewed commit: "Self-hosted runners: pre-install codecov..." | Re-trigger Greptile |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Replace the vendored-GPG-key pre-seed with use_pypi: true and a pinned codecov-cli version on every codecov-action step. pip installs the CLI from PyPI instead of downloading a binary from cli.codecov.io, which sidesteps the broken keybase.io key fetch entirely (and also the latest-version republish races seen in codecov/codecov-action#1940). Pinning to 11.2.8 keeps the uploader from changing under CI untracked.
use_pypi fails on the self-hosted runners (`pip: command not found` -- Python there is uv-managed, no pip binary on PATH). Install the pinned codecov-cli into a dedicated venv with uv and pass it to the action via the `binary` input instead. GitHub-hosted jobs keep use_pypi.
|
I'd expect a little more flakiness with codecov this month, as it's just changed hands from Sentry to Harness, so I'd expect some teething issues as the new company takes it over. |
Fixes #2398.
What
Every codecov upload step is hard-failing (example run):
The codecov-action wrapper downloads the codecov CLI binary from
cli.codecov.ioat runtime and GPG-verifies it — but fetches the verification key fromhttps://keybase.io/codecovsecurity/pgp_keys.ascwith a barecurl -s, and that URL went hard-404 (SELF-SIGNED PUBLIC KEY NOT FOUND) on 2026-06-06 between ~13:30 and 18:10 UTC, breaking uploads globally. Upstream: codecov/codecov-action#1955 (today's outage), #1876 (the same fetch flaking since Sept 2025).Fix
Set on every codecov-action step:
use_pypiinstalls the CLI viapip install codecov-cliinstead of downloading a binary fromcli.codecov.io— no keybase key fetch, nocli.codecov.iodependency. Trust model becomes pip/PyPI TLS, the same as other CI dependencies.versionstops the uploader from changing under CI untracked, and also sidesteps thelatestrepublish races that caused the April outage ([BUG] Intermittent GPG signature failures on windows-latest runners codecov/codecov-action#1940,BAD signaturewith a good key).An earlier revision of this PR fixed it by pre-seeding the GPG key from a vendored copy (keeps the action's signature verification alive); see the history if we ever want that back. The PyPI route was preferred as the smaller, cleaner change.
Note for review: the self-hosted runners (ROS container, macOS, large) need a
pipon PATH foruse_pypito work — this CI run is the validation of that.This is a workaround; revert when codecov fixes the key distribution upstream.