Incorrect base commit of pull request


Recently we’ve been seeing Codecov report incorrect coverage deltas for pull requests. Upon inspection, I noticed that all our PRs are using the same random ~1 month old commit as the pull request base, and not one of the more recent commits with code coverage information.

I inspected the Codecov docmentation for signs of any recent changes and noticed this comment on

base [Deprecated as of July 2020 – Codecov’s product roadmap includes a novel way to manually pick base of pull requests]

I wonder if this could have anything to do with the issue we’re seeing.






bash uploader

Commit SHAs

Commit always used as the PR base: 9ccb0f8a3562fc5fd3cb7a3af05d3bbc131b5aed
One of the many commits on PRs affected by this: fd809f3c116ca56478a0189922585f9f2d3e56c2

Codecov YAML

        target: auto
        threshold: 0.5%
        base: auto
          - model
          - ui
        target: 100
        threshold: 10%
        base: auto
        if_not_found: success
        informational: true
          - model
          - ui
comment: false
    carryforward: true
    carryforward: true

Codecov Output

We upload a couple of reports for every run. There’s nothing special to see here, but here’s one:

curl -s | bash -s - -f iOS/slather-report/cobertura.xml -t $CODECOV_TOKEN -F model'
2020-07-22 09:47:40 INFO   Searching for artifacts: "iOS/slather-report/cobertura.xml" within step: ":xcode: Model Tests iPhone - iOS 14.0, iPad - iOS 14.0"
2020-07-22 09:47:40 INFO   Found 1 artifacts. Starting to download to: /source
2020-07-22 09:47:42 INFO   Successfully downloaded "iOS/slather-report/cobertura.xml" 3948838 bytes
  _____          _
 / ____|        | |
| |     ___   __| | ___  ___ _____   __
| |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| |  __/ (_| (_) \ V /
 \_____\___/ \__,_|\___|\___\___/ \_/
==> Buildkite CI detected.
    project root: .
    Yaml found at: .codecov.yml
    -> Found 1 reports
==> Detecting git/mercurial file structure
==> Reading reports
    + iOS/slather-report/cobertura.xml bytes=3948838
==> Appending adjustments
    + Found adjustments
==> Gzipping contents
==> Uploading reports
    query: branch=peter%2Fusingswift&commit=fd809f3c116ca56478a0189922585f9f2d3e56c2&build=&build_url=&name=&tag=&slug=PSPDFKit%2FPSPDFKit&service=buildkite&flags=model&pr=24946&job=806fe299-2ed0-47d1-97cc-2bad9c32877b&cmd_args=f,t,F
->  Pinging Codecov,t,F
->  Uploading to
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 3220k    0     0  100 3220k      0  4112k --:--:-- --:--:-- --:--:-- 4107k
    -> View reports at

Additional Information


Hi @matej, would you be able to screenshot the commit log for that pull request? I’d like to compare it to the commits here:

Hi @tom. Thanks for looking into this!

Yes, I can. There’s nothing sensitive in this one. Will this do?

Hi @matej, I’m not seeing any logs for 2db4b47, which might mean that coverage reports weren’t uploaded for that commit. Would you be able to double-check to see if Buildkite attempted to run the bash script?

That job was automatically canceled, likely because the next commit came quickly after it. So there was no coverage data uploaded for that specific commit.

Marking this as the solution as this is being taken offline.