Skip to content

Fix Codecov PGP key fetch in coverage upload (release/26.8) - #22964

Merged
nbradbury merged 1 commit into
release/26.8from
fix/codecov-keybase-url-26.8
Jun 9, 2026
Merged

Fix Codecov PGP key fetch in coverage upload (release/26.8)#22964
nbradbury merged 1 commit into
release/26.8from
fix/codecov-keybase-url-26.8

Conversation

@nbradbury

@nbradbury nbradbury commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Backport of #22963 to release/26.8.

Summary

CI was failing in the Uploading code coverage step because curl https://keybase.io/codecovsecurity/pgp_keys.asc now returns a 32-byte HTTP 404 (SELF-SIGNED PUBLIC KEY NOT FOUND). That body gets piped into gpg --import, gpg fails with "no valid OpenPGP data found", and set -e aborts the rest of the run-unit-tests script before merge_junit_reports runs.

Codecov appears to have renamed their Keybase account from codecovsecurity to codecovsecops. The new URL serves the same signing key (fingerprint 27034E7FDB850E0BBC2C62FF806BB28AED779869, key ID ED779869).

Changes

  • Update the keybase URL: codecovsecuritycodecovsecops.
  • Add --fail --silent --show-error to the curl call so the next time this URL moves, curl exits non-zero with a clear error instead of silently piping a 404 page into gpg.

Test plan

  • CI green on this PR (the coverage upload step in particular).
  • Codecov report appears on the PR.

Codecov rotated their Keybase username from codecovsecurity to
codecovsecops (the new URL serves the same key fingerprint
27034E7FDB850E0BBC2C62FF806BB28AED779869). The old URL now returns a
32-byte 404 body that curl was happily piping into gpg, breaking the
import and aborting run-unit-tests.sh under `set -e` before
merge_junit_reports could run.

Also add `--fail --silent --show-error` so any future move surfaces as
a curl failure with a clear message instead of an opaque gpg error.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dangermattic

dangermattic commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator
1 Warning
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

@wpmobilebot

Copy link
Copy Markdown
Contributor

App Icon📲 You can test the changes from this Pull Request in Jetpack Android by scanning the QR code below to install the corresponding build.

App NameJetpack Android
Build TypeDebug
Versionpr22964-01d07d0
Build Number1493
Application IDcom.jetpack.android.prealpha
Commit01d07d0
Installation URL4pff78e3l3aio
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

Copy link
Copy Markdown
Contributor

App Icon📲 You can test the changes from this Pull Request in WordPress Android by scanning the QR code below to install the corresponding build.

App NameWordPress Android
Build TypeDebug
Versionpr22964-01d07d0
Build Number1493
Application IDorg.wordpress.android.prealpha
Commit01d07d0
Installation URL2abckd5re5fb8
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@nbradbury
nbradbury marked this pull request as ready for review June 9, 2026 16:02
@nbradbury
nbradbury requested a review from adalpari June 9, 2026 16:03
@nbradbury
nbradbury enabled auto-merge (squash) June 9, 2026 16:48
@adalpari

adalpari commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

✅ Codecov report verified via API

Confirmed the coverage upload now works end-to-end. Queried the Codecov API for commit 01d07d0:

Field Value
State complete (Codecov finished processing)
CI passed true
Sessions 1 (upload received)
Coverage 37.34%

PR comparison (Codecov pulls/22964 endpoint): base 37.34% → head 37.34% — both totals present and compared.

This confirms the keybase URL fix (codecovsecuritycodecovsecops) restores the upload: without it, run-unit-tests.sh aborted under set -e before the upload ran and Codecov received 0 sessions.

Full report: https://app.codecov.io/gh/wordpress-mobile/WordPress-Android/pull/22964

Note: the report is uploaded and processed on Codecov, but no Codecov status check/comment is auto-posted on the GitHub PR — that's a separate Codecov GitHub-integration config matter, unrelated to this script fix.

@adalpari adalpari left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@nbradbury
nbradbury merged commit f70a22a into release/26.8 Jun 9, 2026
31 checks passed
@nbradbury
nbradbury deleted the fix/codecov-keybase-url-26.8 branch June 9, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants