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

SVN polls wrong URL if it includes a build parameter

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • subversion-plugin
    • None

      If a build parameter with default value is used in a SVN URL and the build should be started by changes in the SVN repository, a wrong URL is used for polling. The parameter used for the polling URL seems to be the parameter used in the last build and not the default parameter.

      This is my URL in the Job config:

      https://xxx/svn/repos/zzz/source/${BRANCH}
      

      BRANCH is a job parameter and its default value is trunk

      Expected result:
      The URL used for polling the SVN repository should be constructed by using the default value of the parameter
      https://xxx/svn/repos/zzz/source/trunk

      Actual result:
      The URL used for polling the SVN repository uses the parameter used in the last build.
      https://xxx/svn/repos/zzz/source/tags/yyy

      Then the poll does not see any changes (confirmed by https://xxx/job/zzz/scmPollLog/) and no build is started.

          [JENKINS-34236] SVN polls wrong URL if it includes a build parameter

          Mike Basinger added a comment -

          Seeing the same behavior in Jenkins 1.6.51.2 LTS, had to downgrade to Jenkins 1.642.2 to get svn projects to build properly. Using Subversion Plug-in 2.5.7.

          Building remotely on jenkins-f17-1 (x86_64 fedora-17 linux) in workspace /jenkins/workspace/proj-branch/distro/fedora-17
          Location 'file:///NFS/projects/svn/proj/$SVN_BRANCH_TAG' does not exist
          Checking out a fresh workspace because /jenkins/workspace/proj-branch/distro/fedora-17/$SVN_BRANCH_TAG doesn't exist
          Cleaning local Directory ./$SVN_BRANCH_TAG/
          Checking out file:///NFS/projects/svn/proj/$SVN_BRANCH_TAG at revision '2016-05-12T20:58:56.810 +0000'
          ERROR: Failed to check out file:///NFS/projects/svn/proj/$SVN_BRANCH_TAG
          org.tmatesoft.svn.core.SVNException: svn: E170000: URL 'file:///NFS/projects/svn/proj/$SVN_BRANCH_TAG' doesn't exist
          at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
          at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
          at org.tmatesoft.svn.core.internal.wc16.SVNUpdateClient16.doCheckout(SVNUpdateClient16.java:884)
          at org.tmatesoft.svn.core.internal.wc2.old.SvnOldCheckout.run(SvnOldCheckout.java:66)
          at org.tmatesoft.svn.core.internal.wc2.old.SvnOldCheckout.run(SvnOldCheckout.java:18)
          at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
          at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)
          at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
          at hudson.scm.subversion.CheckoutUpdater$1.perform(CheckoutUpdater.java:119)
          at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:162)
          at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:170)
          at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:134)
          at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:162)
          at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:988)
          at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:969)
          at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:945)
          at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2719)
          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$Sync.innerRun(FutureTask.java:334)
          at java.util.concurrent.FutureTask.run(FutureTask.java:166)
          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:724)
          java.io.IOException: remote file operation failed: /jenkins/workspace/proj-branch/distro/fedora-17 at hudson.remoting.Channel@24cbef6d:jenkins-f17-1: hudson.remoting.ProxyException: java.io.IOException: Failed to check out file:///NFS/projects/svn/proj/$SVN_BRANCH_TAG
          at hudson.FilePath.act(FilePath.java:986)
          at hudson.FilePath.act(FilePath.java:968)
          at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:894)
          at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:830)
          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.matrix.MatrixRun.run(MatrixRun.java:146)
          at hudson.model.ResourceController.execute(ResourceController.java:98)
          at hudson.model.Executor.run(Executor.java:410)
          Caused by: hudson.remoting.ProxyException: java.io.IOException: Failed to check out file:///NFS/projects/svn/proj/$SVN_BRANCH_TAG
          at hudson.scm.subversion.CheckoutUpdater$1.perform(CheckoutUpdater.java:130)
          at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:162)
          at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:170)
          at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:134)
          at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:162)
          at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:988)
          at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:969)
          at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:945)
          at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2719)
          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$Sync.innerRun(FutureTask.java:334)
          at java.util.concurrent.FutureTask.run(FutureTask.java:166)
          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:724)
          at ......remote call to jenkins-f17-1(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 hudson.FilePath.act(FilePath.java:979)
          ... 12 more
          Caused by: hudson.remoting.ProxyException: org.tmatesoft.svn.core.SVNException: svn: E170000: URL 'file:///NFS/projects/svn/proj/$SVN_BRANCH_TAG' doesn't exist
          at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
          at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
          at org.tmatesoft.svn.core.internal.wc16.SVNUpdateClient16.doCheckout(SVNUpdateClient16.java:884)
          at org.tmatesoft.svn.core.internal.wc2.old.SvnOldCheckout.run(SvnOldCheckout.java:66)
          at org.tmatesoft.svn.core.internal.wc2.old.SvnOldCheckout.run(SvnOldCheckout.java:18)
          at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
          at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)
          at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
          at hudson.scm.subversion.CheckoutUpdater$1.perform(CheckoutUpdater.java:119)
          at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:162)
          at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:170)
          at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:134)
          at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:162)
          at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:988)
          at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:969)
          at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:945)
          at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2719)
          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$Sync.innerRun(FutureTask.java:334)
          at java.util.concurrent.FutureTask.run(FutureTask.java:166)
          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:724)

          Mike Basinger added a comment - Seeing the same behavior in Jenkins 1.6.51.2 LTS, had to downgrade to Jenkins 1.642.2 to get svn projects to build properly. Using Subversion Plug-in 2.5.7. Building remotely on jenkins-f17-1 (x86_64 fedora-17 linux) in workspace /jenkins/workspace/proj-branch/distro/fedora-17 Location 'file:///NFS/projects/svn/proj/$SVN_BRANCH_TAG' does not exist Checking out a fresh workspace because /jenkins/workspace/proj-branch/distro/fedora-17/$SVN_BRANCH_TAG doesn't exist Cleaning local Directory ./$SVN_BRANCH_TAG/ Checking out file:///NFS/projects/svn/proj/$SVN_BRANCH_TAG at revision '2016-05-12T20:58:56.810 +0000' ERROR: Failed to check out file:///NFS/projects/svn/proj/$SVN_BRANCH_TAG org.tmatesoft.svn.core.SVNException: svn: E170000: URL 'file:///NFS/projects/svn/proj/$SVN_BRANCH_TAG' doesn't exist at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64) at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51) at org.tmatesoft.svn.core.internal.wc16.SVNUpdateClient16.doCheckout(SVNUpdateClient16.java:884) at org.tmatesoft.svn.core.internal.wc2.old.SvnOldCheckout.run(SvnOldCheckout.java:66) at org.tmatesoft.svn.core.internal.wc2.old.SvnOldCheckout.run(SvnOldCheckout.java:18) at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21) at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235) at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294) at hudson.scm.subversion.CheckoutUpdater$1.perform(CheckoutUpdater.java:119) at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:162) at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:170) at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:134) at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:162) at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:988) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:969) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:945) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2719) 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$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) 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:724) java.io.IOException: remote file operation failed: /jenkins/workspace/proj-branch/distro/fedora-17 at hudson.remoting.Channel@24cbef6d:jenkins-f17-1: hudson.remoting.ProxyException: java.io.IOException: Failed to check out file:///NFS/projects/svn/proj/$SVN_BRANCH_TAG at hudson.FilePath.act(FilePath.java:986) at hudson.FilePath.act(FilePath.java:968) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:894) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:830) 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.matrix.MatrixRun.run(MatrixRun.java:146) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: hudson.remoting.ProxyException: java.io.IOException: Failed to check out file:///NFS/projects/svn/proj/$SVN_BRANCH_TAG at hudson.scm.subversion.CheckoutUpdater$1.perform(CheckoutUpdater.java:130) at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:162) at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:170) at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:134) at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:162) at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:988) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:969) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:945) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2719) 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$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) 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:724) at ......remote call to jenkins-f17-1(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 hudson.FilePath.act(FilePath.java:979) ... 12 more Caused by: hudson.remoting.ProxyException: org.tmatesoft.svn.core.SVNException: svn: E170000: URL 'file:///NFS/projects/svn/proj/$SVN_BRANCH_TAG' doesn't exist at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64) at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51) at org.tmatesoft.svn.core.internal.wc16.SVNUpdateClient16.doCheckout(SVNUpdateClient16.java:884) at org.tmatesoft.svn.core.internal.wc2.old.SvnOldCheckout.run(SvnOldCheckout.java:66) at org.tmatesoft.svn.core.internal.wc2.old.SvnOldCheckout.run(SvnOldCheckout.java:18) at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21) at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235) at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294) at hudson.scm.subversion.CheckoutUpdater$1.perform(CheckoutUpdater.java:119) at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:162) at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:170) at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:134) at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:162) at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:988) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:969) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:945) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2719) 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$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) 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:724)

          Kamyar Ghandi added a comment -

          We were experiencing a similar issue. We had jobs which used a parameter in the SVN path.
          We updated the parameter value for the jobs, but found that Jenkins was still polling the old URL.
          The problem was resolved after we manually kicked off "Build with Parameters". After the manual build Jenkins began using the new parameter value for polling SVN.

          Kamyar Ghandi added a comment - We were experiencing a similar issue. We had jobs which used a parameter in the SVN path. We updated the parameter value for the jobs, but found that Jenkins was still polling the old URL. The problem was resolved after we manually kicked off "Build with Parameters". After the manual build Jenkins began using the new parameter value for polling SVN.

          Shawn Fox added a comment -

          Thank you for writing this. I am experiencing the same issue. However the work around suggested by Kamyar only works for me if I build the default branch. If I perform a Build With Parameters specifying anything other than the default, the next poll fails.

          Shawn Fox added a comment - Thank you for writing this. I am experiencing the same issue. However the work around suggested by Kamyar only works for me if I build the default branch. If I perform a Build With Parameters specifying anything other than the default, the next poll fails.

          Chris Amis added a comment -

          +1

          I have a job that is supposed to monitor and build integration but also allow developers to instruct it to build a feature branch.

           

           

          Chris Amis added a comment - +1 I have a job that is supposed to monitor and build integration but also allow developers to instruct it to build a feature branch.    

          Saqib added a comment -

          +1

          I also have a situation to monitor builds for sometimes 2 and sometime 3 branches

          Saqib added a comment - +1 I also have a situation to monitor builds for sometimes 2 and sometime 3 branches

            Unassigned Unassigned
            jherb Joachim Herb
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: