Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-20243

Upgrade to 'Jenkins GIT plugin' 2.0 from 1.5 brakes Gerrit triggered builds

      Upgrading results in the following error:

      git version 1.7.1
      ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.

      Downgrading to 1.5 resolved the issue.

          [JENKINS-20243] Upgrade to 'Jenkins GIT plugin' 2.0 from 1.5 brakes Gerrit triggered builds

          please attach full polling log for diagnostic.

          Nicolas De Loof added a comment - please attach full polling log for diagnostic.

          ERROR: Unable to retrieve changeset
          hudson.plugins.git.GitException: Failed to find parent id.
          at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser.getFirstParent(GerritTriggerBuildChooser.java:156)
          at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser.prevBuildForChangelog(GerritTriggerBuildChooser.java:117)
          at hudson.plugins.git.GitSCM.computeChangeLog(GitSCM.java:935)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:875)
          at hudson.model.AbstractProject.checkout(AbstractProject.java:1412)
          at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652)
          at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:557)
          at hudson.model.Run.execute(Run.java:1679)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:230)
          Caused by: java.lang.UnsupportedOperationException
          at org.jenkinsci.plugins.gitclient.RemoteGitImpl.getRepository(RemoteGitImpl.java:187)
          at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser.getFirstParent(GerritTriggerBuildChooser.java:146)
          ... 11 more

          Balazs Barcsik added a comment - ERROR: Unable to retrieve changeset hudson.plugins.git.GitException: Failed to find parent id. at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser.getFirstParent(GerritTriggerBuildChooser.java:156) at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser.prevBuildForChangelog(GerritTriggerBuildChooser.java:117) at hudson.plugins.git.GitSCM.computeChangeLog(GitSCM.java:935) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:875) at hudson.model.AbstractProject.checkout(AbstractProject.java:1412) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:557) at hudson.model.Run.execute(Run.java:1679) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:230) Caused by: java.lang.UnsupportedOperationException at org.jenkinsci.plugins.gitclient.RemoteGitImpl.getRepository(RemoteGitImpl.java:187) at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser.getFirstParent(GerritTriggerBuildChooser.java:146) ... 11 more

          Sam Xiao added a comment -

          I have the same problem with Gerrit's SSH URL

          11:04:53 Building remotely on bob-10.47 in workspace /home/jenkins/slave-root/workspace/gerrit_client_android_build_debug
          11:04:53 
          11:04:53 Deleting project workspace... done
          11:04:53 
          11:04:53 Cloning the remote Git repository
          11:04:53 Cloning repository ssh://XXXXXXXXXX:29418/client.git
          11:04:53 git --version
          11:04:53 git version 1.8.4.2
          11:05:15 ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
          

          Here suggest a downgrade:
          https://groups.google.com/forum/#!topic/repo-discuss/BWjtSX07IpQ

          Sam Xiao added a comment - I have the same problem with Gerrit's SSH URL 11:04:53 Building remotely on bob-10.47 in workspace /home/jenkins/slave-root/workspace/gerrit_client_android_build_debug 11:04:53 11:04:53 Deleting project workspace... done 11:04:53 11:04:53 Cloning the remote Git repository 11:04:53 Cloning repository ssh://XXXXXXXXXX:29418/client.git 11:04:53 git --version 11:04:53 git version 1.8.4.2 11:05:15 ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job. Here suggest a downgrade: https://groups.google.com/forum/#!topic/repo-discuss/BWjtSX07IpQ

          Kevin Burge added a comment - - edited

          I'm running in to the same issue (integration with Gerrit Trigger). This doesn't prevent checkout, it just causes Jenkins to clear the workspace so that my build completely starts over, which can take 45 minutes, when it could take 1 or 2. This is a significant problem for us. I'd rather not downgrade as I would have to reconfigure many jobs to specify the ref location (like I did when I upgraded from the older git client).

          Fetching changes from the remote Git repository
          Fetching upstream changes from git://repo.dev.systemware.com/xds
          Checking out Revision 407f296d95c4626e65647e50573f6a2ad08b0eef (master)
          ERROR: Unable to retrieve changeset
          hudson.plugins.git.GitException: Failed to find parent id.
          at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser.getFirstParent(GerritTriggerBuildChooser.java:156)
          at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser.prevBuildForChangelog(GerritTriggerBuildChooser.java:117)
          at hudson.plugins.git.GitSCM.computeChangeLog(GitSCM.java:935)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:875)
          at hudson.model.AbstractProject.checkout(AbstractProject.java:1376)
          at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:655)
          at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:560)
          at hudson.model.Run.execute(Run.java:1592)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:237)
          Caused by: java.lang.UnsupportedOperationException
          at org.jenkinsci.plugins.gitclient.RemoteGitImpl.getRepository(RemoteGitImpl.java:187)
          at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser.getFirstParent(GerritTriggerBuildChooser.java:146)
          ... 11 more
          Cleaning workspace

          Kevin Burge added a comment - - edited I'm running in to the same issue (integration with Gerrit Trigger). This doesn't prevent checkout, it just causes Jenkins to clear the workspace so that my build completely starts over, which can take 45 minutes, when it could take 1 or 2. This is a significant problem for us. I'd rather not downgrade as I would have to reconfigure many jobs to specify the ref location (like I did when I upgraded from the older git client). Fetching changes from the remote Git repository Fetching upstream changes from git://repo.dev.systemware.com/xds Checking out Revision 407f296d95c4626e65647e50573f6a2ad08b0eef (master) ERROR: Unable to retrieve changeset hudson.plugins.git.GitException: Failed to find parent id. at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser.getFirstParent(GerritTriggerBuildChooser.java:156) at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser.prevBuildForChangelog(GerritTriggerBuildChooser.java:117) at hudson.plugins.git.GitSCM.computeChangeLog(GitSCM.java:935) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:875) at hudson.model.AbstractProject.checkout(AbstractProject.java:1376) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:655) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:560) at hudson.model.Run.execute(Run.java:1592) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:237) Caused by: java.lang.UnsupportedOperationException at org.jenkinsci.plugins.gitclient.RemoteGitImpl.getRepository(RemoteGitImpl.java:187) at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser.getFirstParent(GerritTriggerBuildChooser.java:146) ... 11 more Cleaning workspace

          Roman G added a comment - - edited

          I observe the stacktrace but in same time correct hash was checkout from gerrit
          I checked sources and see that it happens getFirstParent function.
          Looks like this functionality touch only changelog but not code checkout. I could assume that
          it happens because gerrit patchsets are placed in detached head and parent commit cannot
          be simple found

          Roman G added a comment - - edited I observe the stacktrace but in same time correct hash was checkout from gerrit I checked sources and see that it happens getFirstParent function. Looks like this functionality touch only changelog but not code checkout. I could assume that it happens because gerrit patchsets are placed in detached head and parent commit cannot be simple found

          Leevar Williams added a comment - This seems to be caused by JENKINS-20098 , and fixed by https://github.com/jenkinsci/gerrit-trigger-plugin/commit/599cea84849432d3e12f427237025680e8276dce .

          Mark Waite added a comment -

          Since Leevar reports it is fixed by a change to the gerrit-trigger plugin, this issue is resolved.

          Mark Waite added a comment - Since Leevar reports it is fixed by a change to the gerrit-trigger plugin, this issue is resolved.

            ndeloof Nicolas De Loof
            s7726 Gavin Swanson
            Votes:
            9 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated:
              Resolved: