Details
-
Bug
-
Resolution: Fixed
-
Low
-
5.2, 5.4.2
-
Severity 3 - Minor
-
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
- My repository is located in the URL: https://sultan-PC/svn/
- So I created a shared repo with the URL: https://sultan-PC/svn/${bamboo.svnpath}
- 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.
- In the parent plan, I override this variable to point to a repo
- 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