-
Notifications
You must be signed in to change notification settings - Fork 475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Danger fails with "Cannot find a merge base between danger_base and danger_head" #768
Comments
This issue is reproduced on one of my PRs and danger doesn't work at all :( |
Does 4.3.1? |
4.3.2 Should I try 4.3.1? |
There were changes around this in 4.3.2 - CHANGELOG Might be worth seeing if they affected you. |
No, it's definitely not related to a new version because another PR is also running on a new version and doesn't fail with such error. |
Sounds like this is a dupe of #768 then |
Duplicate of itself? :) |
ah yeah, #660 |
…n danger_base and danger_head" error. Details: danger/danger#768
I was wrong, it fails on both of PRs. I'm trying to rollback to 4.3.1 |
I confirm that rolling back to 4.3.1 is solving this error. |
I wonder if different versions of git have different behaviour here, can you leave some breadcrumbs in #660 so that you or others can debug 👍 |
I'm not sure that this issue is the same as #660 because error messages and stack traces are different. |
Changes due to #660 were the only thing that shipped in 4.3.1 |
Could it be related to custom git clone depth in TravisCI? git:
depth: 1 |
Yep, that would make sure that the commits Danger is looking for would need to be re-downloaded |
We had this error because there were two branches with the same name: The tricky thing is that PR's unrelated to these branches were failing, so out of nowhere, all PR's were failing. Could there be some branch naming collision "bug" in Danger? Related: https://stackoverflow.com/a/38494084/826435
|
…n danger_base and danger_head" error. Details: danger/danger#768
I'm seeing this as well with Jenkins and Github. We are doing shallow clones with a depth of 1 and the error appears to be sporadic. Most of the time the job works fine, but ~20% it runs into the error. Usually running the job again seems to fix it which makes it even more confusing for us to track down. Seems almost like it bails every time fetch has to do either a forced update or gets a new ref. |
Just dropping a breadcrumb: we were doing shallow clones on CI for PR builds and once the # of commits on that PR surpassed that depth, it started failing with this error |
It feels like danger does some black magic to get the base and the HEAD, which is not really compatible to what shallow clone is about. What helped to me is adding master additionally to refspec: |
I think I forgot to comment on an update. I'm pretty sure that what @rob-keepsafe said worked. We had shallow clone of |
I tried with depth 100 and bigger numbers, also disabling shadow clone, but still get this error:
Any insights on what else could be causing this? On the logs I see the repo being completely cloned (all branches, tags). Edit: Might be related to this. |
Report
What did you do?
I'm running
danger
on Travis CI from a pull request.What did you expect to happen?
Danger shouldn't crash.
What happened instead?
There is no comment on a PR and in the travis log I see the following error:
Your Environment
The text was updated successfully, but these errors were encountered: