I have a situation I can’t figure out and I’m hoping someone can help me. I recent enabled codecov for a repo I work in by adding it to our CICD (Jenkins) pipeline. This uploads coverage reports on both PRs and merges to master. When I look at the logs for merges to the master branch, I see things like this being printed (details stripped):
However, when I go to the repo on Codecov, I see a message about “Not enough recent commits found with current parameters”. If I go into the branches view and find the master branch specifically, I see the same message, but with a “No commits found.” content view. However if I click on that final link, then I see the commit I’m looking for.
The way I’ve understood it is that the commits are all uploaded, but for some reason they aren’t associated with the master branch (note the branch=master part of the query though).
How do I fix this? What am I missing with the setup?
Hi @evancharlton, this is strange. For that SHA you provided, I’m seeing Commit was deleted by force push or pull request rebase. Does this resonate with what you expect? Is there another commit SHA that you would expect to show up?
@tom - Interesting! We use squash-and-merge when our PRs are merged into master, but that commit is very much still in our tree (as part of the master branch).
Or CICD pipeline is basically this:
stage('Execute unit tests') {
dir('unit-tests') {
container('node') {
sh('yarn test')
junit(allowEmptyResults: true, testResults: '**/junit.xml')
if (isPullRequest) {
// This is just a helper function which posts a comment
// on the PR of which tests have failed.
summarizeTestResults()
}
}
stage("Upload coverage reports") {
sh('bash <codecov-upload-report.sh')
}
}
}
Now that I write this out, I’m pretty sure that those lines about junit(..) and summarizeTestResults() don’t actually do anything on this repo and are left over from when I copy/pasted that from another (java-based) repo. But they shouldn’t be deleting commits on codecov
Hmmm… this is wildly bizarre @evancharlton. I’d like to compare a few other commits, if possible. Do you have another SHA that is on the master branch that would be useful here?
Hi @evancharlton, this is surely a doozey. I’m seeing a few of those commits on your master branch, but for other commits I’m seeing them either on other branches or being force-pushed over. Would you mind DMing me a screenshot of the master commits off of GitHub?
https://github.com/{organization}/{repo_name}/commits/master I just want to make sure I’m not going crazy.