Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
None
Description
stderr: fatal: Couldn't find remote ref refs/changes/12/34567/8
fatal: The remote end hung up unexpectedly
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:981)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:920)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:187)
at hudson.plugins.git.GitAPI.fetch(GitAPI.java:229)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:610)
... 10 more
And there is no even attempt to retry...
(I have local Git-mirror, which updates from Gerrit. Jenkins fetching from that mirror, so it's ok when ref not "ready" yet)
In versions 1.* retrying works like a charm, so I have to roll back to 1.4
If the Git repository from Gerrit is mirrored to the local Git mirror and the Jenkins job is cloning from the local Git mirror, why not have the Jenkins job monitor the local git mirror?
You could possibly use a post-receive hook for fast detection of new arrivals. That seems like coupling the Jenkins job to the local Git mirror, but launching it from a submission to an unmonitored repository, and expecting it to build a submission which may not yet have arrived in the local Git mirror is unnecessarily asymmetric.
I'm not claiming that your report is not a bug. I think it is a bug, but it seems like you could work around that bug by monitoring the local Git repo with the Jenkins job rather than monitoring the Gerrit repo and cloning the local repo.
Alternately, if clone performance is the issue due to a large repository, you could consider adding an "Advanced clone behaviors" to reference the local Git repo, but clone from the Gerrit repo. That advanced clone behavior has helped significantly reduce my clone times on Linux machines. Unfortunately, I have never found a way to make it work on Windows.