Nearest Pull Request Base/PseudoBase Commit not chosen correctly

Description

Nearest Pull Request Base/PseudoBase Commit is not chosen correctly

(This is started in Bug Fixes because this seems like at least the pseudo base is not chosen correctly)

Repository

CI/CD

Github Actions

Uploader

Github Action codecov/codecov-action@v1 (bash uploader)

Commit SHAs

PR Base: 6279619ba0e56475b13c3c1da41d58fe4bc11c06 (detected as base, but has no coverage uploaded)
Nearest with coverage: 3c7d1027137257913b4648525a51703a95f07ac4
First of PR: 718aed7281c25c7198ea068a87b06924d77de8ba
Latest of PR: 04b0ee9c5685107a1db67a6edc19bb3b2762bbc4

Codecov YAML

default, no file

Steps to Reproduce

  • create an pull request on an commit that dosnt have coverage report, but previous commit has
  • create some commits on the pull request with coverage uploaded

Expected behavior: expected is that commit 3c7d1027137257913b4648525a51703a95f07ac4 is chosen as the nearest commit with coverage

Actual behavior: No Base is assigned / wrong pseudo base is chosen, and history since 869d697ded82c105352b1dc5204f4ba8a8255a3c is shown

Flakiness? Happens on all Pull Requests that the base commit does not have an upload

Additional Information

There might be the question on why the base commit dosnt have an coverage report, but this is because we use automated released (semantic release) which will upload an release commit (base in this case), where tests are not run (thanks to this)

Here the Pull Request to see it happening on (Github)
Here the Pull Request to see it happening on (CodeCov)

Here some screenshots to show the current state (because might change later):
CodeCov PR/Commits site:


VSCode git-log extension:

Commits from beta on github (to show where actions are run):

Update:
since then another Pull Request was made, and when trying to go to the compare an 400 error shows up:
PR: https://github.com/nodkz/mongodb-memory-server/pull/415
/compare: https://app.codecov.io/gh/nodkz/mongodb-memory-server/compare/415
/pull (still working): https://codecov.io/gh/nodkz/mongodb-memory-server/pull/415/commits

the /pull link gets referenced in the comment codecov makes with Continue to review full report at Codecov.
the /compare link gets referenced when going to /pulls and clicking on an PR name

PS: it seems like it dosnt always throw this page and actually load the page (that looks almost exactly like the /pull page, but it is empty in every tab (-1 commits))

PPS: it seems like when going to /pulls it sometimes goes to codecov.io and sometimes to apps.codecov.io
Steps i took: going from the github comment to this page and then clicking on Pulls (near the top) (if it should matter, with middle mouse button), tried 10 times, and 2/10 it was going to app.codecov.io

Hi @hasezoey, there are a couple things going on in this thread. I’m going to try to separate them out so that I’m not missing anything

  1. For this pull request, we are attributing the wrong commit SHA as the base. It is showing 6279619ba0e56475b13c3c1da41d58fe4bc11c06 but it should be a parent of 718aed7281c25c7198ea068a87b06924d77de8ba (or 3c7d1027137257913b4648525a51703a95f07ac4)
  2. You are unable to access this compare page. One note, how are you getting to this particular page?
  3. Sometimes you get the compare page above, but it shows -1 Commits
  4. You are sometimes being routed to app.codecov.io.

Is this an accurate representation of things?

Is this an accurate representation of things?

yes

One note, how are you getting to this particular page?

as i explained in the earlier comment, sometimes i get routed to app.codecov.io and when i there click on Pulls (to get here) and when i then click on any Pull Request listed there, it goes to an /compare/PRNumber and not an /pull/PRNumber

For this pull request, we are attributing the wrong commit SHA as the base.

as for that, i also gave an second example PR that has the same issue (or all PR’s where the base has no report uploaded, but the parent one has)


sorry that there are so many things in this thread, i just didnt know how related they are