We have several issues with codecov trying to guess the base commit to compare against, so we decided to use the
-N flag to tell it ourselves.
We first had an issue with codecov identifying the head commit, but we solved it by using the
-C flag. This one works fine. We tried doing the same with
-N, but unsuccessfully.
Codecov bash script is properly setting the parent parameter when uploading the reports to codecov… but the report I see is wrongly using the incorrect parent, and not the one provided.
Steps to Reproduce
- Create a branch
featurefrom a base branch
- Commit anything into base branch
- Open a pull request from “delayed” branch
- Configure your CI to do a virtual merge on the
- Run your tests on this virtual merge (I call it virtual, because is not pushed)
- Since codecov is not picking correctly the base commit to compare, find it yourself and provide it with
Expected behavior: Get the report comparing against the commit passed with
Actual behavior: The report is comparing about whatever codecov script picks without the parameter
Github and jenkins. Using the bash uploader.
We allow outdated PRs, but have the
Merging the pull request with the current target branch revision enabled.
Let me show a git tree to visualize better the problem.
* 5555 Virtual Merge commit develop into feature branch |\ | * 0022 Latest develop commit | * 0011 Another develop commit * | 1122 Second commit on feature branch * | 1111 First commit on feature branch |/ * 0000 First develop commit
We have a base commit 0000 in develop branch.
We create a branch feature from there and push two commits, 1111 and 1122. The head of the branch is 1122 and this is the commit we want to bind the report. We use -C to tell this to the bash codecov script.
While we open our PR, other developer pushes two more commits to develop: 0011 and 0022. The head of develop is 0022.
Now, we would like to compare our test report with develop. If we do nothing, codecov picks 0000, which is outdated, producing a fake and useless report.
If we tell bash codecov script to use 0022 with
-N flag to have the most updated develop version… codecov ignores us
codecov.io/bash| bash -s – -t token -C 1122 -N 0022
[ … ignoring … ]
==> Gzipping contents
==> Uploading reports
-> Pinging Codecov
-> View reports at
Up to here it looks ok… but when I open the report, it’s comparing with the wrong commit 000 instead!