Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-14382

Shared SVN repository can not be used in a plan dependency

    XMLWordPrintable

Details

    Description

      In setting up plan dependencies, when the parent and child plan uses the same repository, then Bamboo will ensure that the revision or hash number (in the case of git) cloned is same for both builds. Now the issue with SVN is that when we add a shared repo with a gloabl variable and have this overridden by plans, Bamboo still assumes the plans are using same repo.

      Steps to replicate

      1. My repository is located in the URL: https://sultan-PC/svn/
      2. So I created a shared repo with the URL: https://sultan-PC/svn/${bamboo.svnpath}
      3. Configure a global variable svnpath that can point to any location. In this case, it point to some other repository not intended for this test.
      4. In the parent plan, I override this variable to point to a repo
      5. The child plan also overrides this variable to point to a different plan

      Now we will expect that the two plans have different repositories but Bamboo assumes both to be from same repo and try to clone same revision number of the child. This will cause the child plan to always fail with the error below eventhough the variable has been substituted correctly:

      Caused by: com.atlassian.bamboo.repository.RepositoryException: Unable to retrieve source code for revision '11', plan 'TESTA-CSVN-JOB1': svn: E160006: No such target revision '11' found in the repository.
      svn: E175002: REPORT of '/svn/mavenimport/!svn/vcc/default': 500 Internal Server Error (https://sultan-pc)
      	at com.atlassian.bamboo.repository.svn.SvnRepository.retrieveSourceCode(SvnRepository.java:616)
      	at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.fillWorkingDirFromVcs(VcsCheckoutTask.java:248)
      	at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.access$100(VcsCheckoutTask.java:54)
      	at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$2.call(VcsCheckoutTask.java:175)
      	at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$2.call(VcsCheckoutTask.java:171)
      	at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:108)
      	... 12 more
      Caused by: org.tmatesoft.svn.core.SVNException: svn: E160006: No such target revision '11' found in the repository.
      svn: E175002: REPORT of '/svn/mavenimport/!svn/vcc/default': 500 Internal Server Error (https://sultan-pc)
      	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.io.dav.DAVRepository.runReport(DAVRepository.java:1289)
      	at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.update(DAVRepository.java:835)
      	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.updateInternal(SvnNgAbstractUpdate.java:192)
      	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.update(SvnNgAbstractUpdate.java:76)
      	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgUpdate.run(SvnNgUpdate.java:38)
      	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgUpdate.run(SvnNgUpdate.java:18)
      	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgOperationRunner.run(SvnNgOperationRunner.java:20)
      	at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:20)
      	at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)
      	at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:291)
      	at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:311)
      	at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:291)
      

      Workaround
      The viable option apart from disabling the shared repos feature is to check the option "Use SVN export" option in the repository advanced config

      Attachments

        1. child.PNG
          child.PNG
          58 kB
        2. global.PNG
          global.PNG
          16 kB
        3. parent.PNG
          parent.PNG
          52 kB
        4. shared.png
          shared.png
          39 kB

        Activity

          People

            Unassigned Unassigned
            smaiyaki Sultan Maiyaki (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: