PR comments fail to update after force pushes

Before submitting a topic, please confirm the following

I have searched for similar issues before creating this topic.
I have verified that my repository is using the Codecov GitHub app, if using GitHub
I have validated my codecov.yaml configuration file.
I have filled out the below sections to the best of my ability.
[ x I understand that the community boards are a free, best-effort tool. While we hope to have someone on the Codecov team resolve your problem quickly, this is not always possible.

Description

After force pushing to a PR branch, the Codecov comment in the PR gets stuck at something like this:

“Current head f30b9c2 differs from pull request most recent head 40b76b0. Consider uploading reports for the commit 40b76b0 to get more accurate results”

CI/CD URL

Please provide a link to the CI/CD run.

Codecov Output


  execArgs: [
    '-n',
    '',
    '-Q',
    'github-action-3.1.1',
    '-Z',
    '-f',
    './lcov.info',
    '-C',
    '40b76b0905513a79be75d9ffde5b98fb8fb7730f',
    '-v'
  ]
}
==> linux OS detected
https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
Received SHA256SUM 671cf0d89d1c149f57e1a9a31f3fb567ab4209e4d5829f13ff7b8c104db7131f  codecov
Received SHA256SUM signature -----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEJwNOf9uFDgu8LGL/gGuyiu13mGkFAmQZ/6UACgkQgGuyiu13
mGkaAA/8DXpdJCt9apqCYOK/euGQUG5bq1X8o0sotrjzJbFJyc65FQu7sMhF6TL/
jGYBmzWDCDQgMzhnrYSilbTN047/Nifh1/wY+eL90K5cJvVzcI5xhRgbwSjjD2W6
aT4UuiaGQjgW1Ulhd6kRySNAfz6NUyPVz7bZbu8vrhFArekTOtpmNJhiNIMrDtYy
mQIIs6f6MG4qbKfAhNwIMWVNR89yLZBnwp8QVIjuF7/8neE0LJUgtgsdmvlhQJGG
5ySfwvE4YD/kfq/y41HH/gsQyDtqUF0j+03P0//lWQ7KLPABV74sP9ut2h+Er9Nt
w8J1O4Xng6DLot3x08mITezx5j1ABh8kognglBEeTvnBGdq+CqpW7l8PtQJ1a2Lw
im62ndiFlE7EzVwX3cEd9KlGOk7omTe+NQ57NmqcN+2v+TmCss8ep90ojRcHlOND
qjvwbOrEepuKDgjE6lMa0efBNIKgyGFW7S1Xn4HApUEPTHcPqxlsyiNMsEkabvL/
MoXyDiYaTYVchaM29EIz0y5TlUX1N/L2t75feUsoDwiFSWTNsGQO8Qpy+7OkpWpL
Ra78dDwxYQbH8ZdLuX4ePcZrUG4HLrDyR3fOiRo2okjZ2tSe+OQvmA+Of0CKPhUN
vClIj2MaWhVi2DO/NXevcW7iOe2M3KtJb0/0uFe4zLcVvhhgreU=
=w57T
-----END PGP SIGNATURE-----

==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (671cf0d89d1c149f57e1a9a31f3fb567ab4209e4d5829f13ff7b8c104db7131f  codecov)
==> Running version latest
==> Running version v0.4.0
/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov -n  -Q github-action-3.1.1 -Z -f ./lcov.info -C 40b76b0905513a79be75d9ffde5b98fb8fb7730f -v
[2023-03-28T08:11:52.891Z] ['verbose'] Start of uploader: 1679991112891...
[2023-03-28T08:11:52.893Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.4.0
[2023-03-28T08:11:52.899Z] ['info'] => Project root located at: /home/runner/work/webpki/webpki
[2023-03-28T08:11:52.900Z] ['info'] -> No token specified or token is empty
[2023-03-28T08:11:52.900Z] ['verbose'] Start of network processing...
[2023-03-28T08:11:52.900Z] ['verbose'] Searching for files in /home/runner/work/webpki/webpki
[2023-03-28T08:11:52.907Z] ['verbose'] coveragepy is not installed
[2023-03-28T08:11:52.907Z] ['info'] Searching for coverage files...
[2023-03-28T08:11:52.995Z] ['verbose'] Preparing to clean the following coverage paths: ./lcov.info
[2023-03-28T08:11:52.995Z] ['info'] => Found 1 possible coverage files:
  ./lcov.info
[2023-03-28T08:11:52.995Z] ['verbose'] End of network processing
[2023-03-28T08:11:52.995Z] ['info'] Processing ./lcov.info...
[2023-03-28T08:11:53.001Z] ['info'] Detected GitHub Actions as the CI provider.
[2023-03-28T08:11:53.001Z] ['verbose'] -> Using the following env variables:
[2023-03-28T08:11:53.001Z] ['verbose']      GITHUB_ACTION: __codecov_codecov-action
[2023-03-28T08:11:53.002Z] ['verbose']      GITHUB_HEAD_REF: prepare-0.100.1
[2023-03-28T08:11:53.002Z] ['verbose']      GITHUB_REF: refs/pull/40/merge
[2023-03-28T08:11:53.002Z] ['verbose']      GITHUB_REPOSITORY: rustls/webpki
[2023-03-28T08:11:53.002Z] ['verbose']      GITHUB_RUN_ID: 4540771827
[2023-03-28T08:11:53.002Z] ['verbose']      GITHUB_SERVER_URL: https://github.com
[2023-03-28T08:11:53.002Z] ['verbose']      GITHUB_SHA: f6ce5919631e469b67e5781f5bea9c839a692101
[2023-03-28T08:11:53.002Z] ['verbose']      GITHUB_WORKFLOW: ci
[2023-03-28T08:11:53.003Z] ['verbose'] Using the following upload parameters:
[2023-03-28T08:11:53.003Z] ['verbose'] branch
[2023-03-28T08:11:53.003Z] ['verbose'] build
[2023-03-28T08:11:53.003Z] ['verbose'] buildURL
[2023-03-28T08:11:53.003Z] ['verbose'] commit
[2023-03-28T08:11:53.003Z] ['verbose'] job
[2023-03-28T08:11:53.003Z] ['verbose'] pr
[2023-03-28T08:11:53.005Z] ['verbose'] service
[2023-03-28T08:11:53.005Z] ['verbose'] slug
[2023-03-28T08:11:53.005Z] ['verbose'] name
[2023-03-28T08:11:53.005Z] ['verbose'] tag
[2023-03-28T08:11:53.005Z] ['verbose'] flags
[2023-03-28T08:11:53.005Z] ['verbose'] parent
[2023-03-28T08:11:53.006Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-3.1.1-uploader-0.4.0&token=*******&branch=prepare-0.100.1&build=4540771827&build_url=https%3A%2F%2Fgithub.com%2Frustls%2Fwebpki%2Factions%2Fruns%2F4540771827&commit=40b76b0905513a79be75d9ffde5b98fb8fb7730f&job=ci&pr=40&service=github-actions&slug=rustls%2Fwebpki&name=&tag=&flags=&parent=
[2023-03-28T08:11:53.006Z] ['verbose'] Passed token was 0 characters long
[2023-03-28T08:11:53.006Z] ['verbose'] https://codecov.io/upload/v4?package=github-action-3.1.1-uploader-0.4.0&branch=prepare-0.100.1&build=4540771827&build_url=https%3A%2F%2Fgithub.com%2Frustls%2Fwebpki%2Factions%2Fruns%2F4540771827&commit=40b76b0905513a79be75d9ffde5b98fb8fb7730f&job=ci&pr=40&service=github-actions&slug=rustls%2Fwebpki&name=&tag=&flags=&parent=
        Content-Type: 'text/plain'
        Content-Encoding: 'gzip'
        X-Reduced-Redundancy: 'false'
[2023-03-28T08:11:53.360Z] ['error'] There was an error running the uploader: Error uploading to https://codecov.io: Error: There was an error fetching the storage URL during POST: 404 - {'detail': ErrorDetail(string='Unable to locate build via Github Actions API. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}
[2023-03-28T08:11:53.361Z] ['verbose'] The error stack is: Error: Error uploading to https://codecov.io: Error: There was an error fetching the storage URL during POST: 404 - {'detail': ErrorDetail(string='Unable to locate build via Github Actions API. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}
    at main (/snapshot/repo/dist/src/index.js)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2023-03-28T08:11:53.361Z] ['verbose'] End of uploader: 470 milliseconds

Expected Results

The coverage info should update after coverage runs have been executed.

Actual Results

No update, stuck on an old revision of the PR.

Additional Information

I’ve seen this recently in a bunch of PRs against rustls/rustls, too. It seems like a recent regression.

@djc

Please upload with the Codecov repository upload token to resolve issue.

You will need to upload with the Codecov upload token, which you can find in the settings tab for your repository. See this topic