kubernetes: git checkout fails with "reference is not a tree"
I see the following in Jenkins verification of https://github.com/kubernetes/kubernetes/pull/27453:
hudson.plugins.git.GitException: Command "/usr/bin/git checkout -f 6676629a96bf8631fbe106ff5ad147527359cbcc" returned status code 128:
stdout:
stderr: fatal: reference is not a tree: 6676629a96bf8631fbe106ff5ad147527359cbcc
Artifacts at https://pantheon.corp.google.com/storage/browser/kubernetes-jenkins/pr-logs/pull/27453/kubernetes-pull-verify-all/140
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 24 (24 by maintainers)
edit: What I describe below is true and can happen, but most of our cases are caused by a race condition in the Jenkins plugin and aren’t caused by anyone force-pushing.
Oh! I think I remember this one. I think what happens is this:
It might not be exactly that, since we actually try to check out the merge commit, but I think that’s the idea.
It’s the Git plugin. I’ve patched it and installed the fixed version on pr-jenkins last night, and haven’t observed any failures since then. Normally there are ~20 failures per day.
See JENKINS-26290 for the full details.
Latest version of the plugin (1.32.8) is broken in a new and fun way:
Looking at the logs, it seems to be repeatedly querying PRs without abandon; I see lines like
repeating a few times per PR per minute.
Downgrading back to 1.31.4 again…
So it looks pretty clear that the GitHub PR builder plugin doesn’t handle multiple executors very well. We try to check out
origin/pr/${ghprbPullId}/merge, but increasingly frequently this is set to a different PR that we’re testing at the same time.There was a rework of some of the envvar code recently, and I tried upgrading the plugin to see if that fixed the issue, but I then ran into a different as-of-yet undiagnosed issue where the plugin was failing to schedule any jobs at all.
I’m noticing that https://github.com/jenkinsci/ghprb-plugin/commit/9c46eab31437d8feaeec7658fcef5062f6b7a40c merged since then, and could very likely explain the more recent issue. So I might try upgrading the plugin again.