Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

codecov fails in CircleCI on merge commits #134

Closed
eps1lon opened this issue Oct 3, 2018 · 9 comments
Closed

codecov fails in CircleCI on merge commits #134

eps1lon opened this issue Oct 3, 2018 · 9 comments

Comments

@eps1lon
Copy link

eps1lon commented Oct 3, 2018

When running bash <(curl -s https://codecov.io/bash) on a PR in CircleCI that has a merge commit as the latest commit codecov will fail with

HTTP 400
Commit sha does not match Circle build.

Full report

I guess this fixable on our end if we call it with -C $CIRCLE_SHA1 or simply add empty commits after merges but I'd like to understand the reason for that behavior.

@alejandrovelez7
Copy link

Was this fixed? I see some messages along the lines of: Fixing merge commit SHA when using the bash uploader. But we still see unexpected results when codecov runs on a PR with a merge commit as it's latest commit.

bcolloran pushed a commit to iodide-project/iodide that referenced this issue Oct 8, 2019
* rebased commits specific to modify keybindings for intercept backspace

* added keybind initialization to eval-frame

* move keybindings to shared

* "moved keybindings back to editor and added handleInterceptBackspace to shared"

* code coverage fails on merge commit reference issue codecov/codecov-bash#134

* empty commit code coverage failes on merge commit
@evantorrie
Copy link

Still not fixed. Is this just a CircleCI issue?

@thomasrockhu
Copy link
Contributor

@evantorrie would you be able to supply a circleci build URL?

@evantorrie
Copy link

@thomasrockhu Here's an example. Check the Upload Coverage Results step.

The corresponding commit was a "merge" from master into the PR. Here's a link to the PR.

@thomasrockhu
Copy link
Contributor

Thanks @evantorrie, this is going to take a bit of time to investigate properly to handle all use cases. For now, the workaround is to specify -C $CIRCLE_SHA1. I'll update here as we work through the issue.

@evantorrie
Copy link

Thanks @thomasrockhu. Regarding using -C $CIRCLE_SHA1, it's unclear to me how to do this using the Codecov CircleCI Orb, since it seems to require passing an extra parameter which is not supported in the existing Orb code.

I opened codecov/codecov-circleci-orb#48 to address this, but it doesn't appear that a reviewer has looked at that yet.

@thomasrockhu
Copy link
Contributor

@eps1lon, @alejandrovelez7, @evantorrie, we recently made some changes to the bash uploader here. Would you mind taking a look to see if this is still an issue?

@eps1lon
Copy link
Author

eps1lon commented Nov 9, 2020

We're using -C $CIRCLE_SHA1 now. I don't plan on testing if this is no longer necessary since -C has been working for us.

@alejandrovelez7
Copy link

@thomasrockhu We've transitioned to Buildkite since then so can't help out sadly! We got around this at the time by squashing our PRs too if that helps.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants