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

2.4.5 bad regression: unable to handle previously-acceptable branch names

XMLWordPrintable

      Git client plugin 2.4.5 (latest released) is unable to handle %2F in a branch name.

      E.g:

      The git project has a branch called "feature/story-cb-807" in a multi-branch project. We have Gerrit rules that change code review behaviour when the branch startts with "feature/". Git branch scanning in the multi-branch project causes the sub-job in Jenkins to be called "feature%2Fstory-cb-807".

      With git-client 2.1.0, this build completes without error.

      With git-client 2.4.5, this build almost instantly aborts with

      Cloning the remote Git repository
      Cloning repository ssh://jmellor@gerrit.internal:29418/soa-workers/soa-workers-common-packages
      > /usr/bin/git init /var/lib/jenkins/workspace/soa_workers_common_packages/feature%2Fstory-cb-807 # timeout=10
      Fetching upstream changes from ssh://jmellor@gerrit.internal:29418/soa-workers/soa-workers-common-packages
      > /usr/bin/git --version # timeout=10
      using GIT_SSH to set credentials
      > /usr/bin/git fetch --tags --progress ssh://jmellor@gerrit.internal:29418/soa-workers/soa-workers-common-packages +refs/heads/:refs/remotes/origin/
      ERROR: Error cloning remote repo 'origin'
      hudson.plugins.git.GitException
      : Command "/usr/bin/git fetch --tags --progress ssh://jmellor@gerrit.internal:29418/soa-workers/soa-workers-common-packages +refs/heads/:refs/remotes/origin/" returned status code 128:
      stdout:
      stderr: percent_expand: unknown key %2
      fatal: Could not read from remote repository.

      Please make sure you have the correct access rights
      and the repository exists.

      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1877)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1596)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:348)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:545)
      at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
      at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
      at hudson.remoting.UserRequest.perform(UserRequest.java:120)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:332)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)
      at ......remote call to buildslave3(Native Method)
      at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
      at hudson.remoting.UserResponse.retrieve(UserRequest.java:220)
      at hudson.remoting.Channel.call(Channel.java:781)
      at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)
      at sun.reflect.GeneratedMethodAccessor154.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132)
      at com.sun.proxy.$Proxy73.execute(Unknown Source)
      at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1054)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1094)
      at hudson.scm.SCM.checkout(SCM.java:485)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
      at hudson.model.Run.execute(Run.java:1738)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:410)
      ERROR: null

      This is a typical example, but we have a large number of builds depending on the now-broken functionality.

      Git client 2.4.5 is broken. Git client 2.1.0 handles this branch name without issue.

            markewaite Mark Waite
            alt_jmellor John Mellor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: