No such revision when multiple SVN repository definitions point to same repo URL

XMLWordPrintable

      Summary

      • Multiple SVN repositories definitions point to the same SVN repository URL
        • Definition 1: Has detect changes on externals = false
        • Definition 2: Has detect changes on externals = true
      • The change detection for plan with Definition 2 tries to checkout a revision one higher than what exists in the repository. It then fails and does not attempt a build.
        org.tmatesoft.svn.core.SVNException: svn: E160006: No such revision 5
        svn: E175002: PROPFIND of '/svn/external1/!svn/vcc/default': 500 Internal Server Error (https://192.168.56.101)

      Steps to Reproduce

      1. Create two plans configured with SVN repositories that point to the same SVN repository URL
      2. Plan 1: configure the SVN repository to have Detect changes on externals false (advanced options)
      3. Plan 2: configure the SVN repository to have Detect changes on externals true (advanced options)
      4. Build both plans - success
      5. Restart Bamboo
      6. Build both plans again - Plan 2 fails with the error above

      Alternatively you could have one plan with two repositories (that point to the same SVN repo), one with detect changes in externals and one without.

      Expected Results

      Change detection checks out the correct revision of the external and proceeds to build.

      Actual Results

      Change detection attempts to checkout latest revision + 1, fails and doesn't execute the plan.

      The below exception is thrown in the atlassian-bamboo.log file and shown in the plan error log:

      2016-07-06 15:44:31,393 ERROR [6-DelayedChangeDetectionThread:pool-12-thread-2] [ChainExecutionManagerImpl] Plan 'TEST-S2' could not be started. Exception: Build 'TEST-S2' failed to check SVN repository
      com.atlassian.bamboo.repository.RepositoryException: Build 'TEST-S2' failed to check SVN repository
      	at com.atlassian.bamboo.repository.svn.SvnRepository.collectChangesSinceLastBuild(SvnRepository.java:368)
      	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.lambda$createBuildRepositoryChanges$159(DefaultChangeDetectionManager.java:418)
      	at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:221)
      	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildInternal(DefaultChangeDetectionManager.java:362)
      	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:310)
      	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:202)
      	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectAllChangesSinceLastBuild(DefaultChangeDetectionManager.java:159)
      	at com.atlassian.bamboo.v2.trigger.ManualBuildDetectionAction.performDelayedChangeDetection(ManualBuildDetectionAction.java:172)
      	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl$1.getChainState(ChainExecutionManagerImpl.java:239)
      	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.tryStartChainState(ChainExecutionManagerImpl.java:330)
      	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.delayedStart(ChainExecutionManagerImpl.java:228)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
      	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
      	at com.sun.proxy.$Proxy133.delayedStart(Unknown Source)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201)
      	at com.sun.proxy.$Proxy133.delayedStart(Unknown Source)
      	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$1$1$1.lambda$call$229(PlanExecutionManagerImpl.java:414)
      	at com.atlassian.bamboo.util.CacheAwareness$3.call(CacheAwareness.java:159)
      	at com.atlassian.bamboo.util.CacheAwareness$3.call(CacheAwareness.java:155)
      	at com.atlassian.bamboo.util.CacheAwareness.withValuesOlderThanTimestampReloaded(CacheAwareness.java:188)
      	at com.atlassian.bamboo.util.CacheAwareness.withValuesOlderThanTimestampReloaded(CacheAwareness.java:154)
      	at com.atlassian.bamboo.util.CacheAwareness.withValuesOlderThanTimestampReloaded(CacheAwareness.java:219)
      	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$1$1$1.call(PlanExecutionManagerImpl.java:413)
      	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$1$1$1.call(PlanExecutionManagerImpl.java:404)
      	at io.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:293)
      	at com.atlassian.bamboo.plan.PlanExecutionLockServiceImpl.lock(PlanExecutionLockServiceImpl.java:85)
      	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.doWithProcessLock(PlanExecutionManagerImpl.java:784)
      	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.access$400(PlanExecutionManagerImpl.java:130)
      	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$1$1.run(PlanExecutionManagerImpl.java:398)
      	at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:51)
      	at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)
      	at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)
      	at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: org.tmatesoft.svn.core.SVNException: svn: E160006: No such revision 5
      svn: E175002: PROPFIND of '/svn/external1/!svn/vcc/default': 500 Internal Server Error (https://192.168.56.101)
      	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.DAVUtil.getResourceProperties(DAVUtil.java:81)
      	at org.tmatesoft.svn.core.internal.io.dav.DAVUtil.getBaselineProperties(DAVUtil.java:249)
      	at org.tmatesoft.svn.core.internal.io.dav.DAVUtil.getBaselineInfo(DAVUtil.java:184)
      	at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.logImpl(DAVRepository.java:1004)
      	at org.tmatesoft.svn.core.io.SVNRepository.log(SVNRepository.java:1038)
      	at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.run(SvnRemoteLog.java:181)
      	at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.run(SvnRemoteLog.java:35)
      	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 org.tmatesoft.svn.core.wc.SVNLogClient.doLog(SVNLogClient.java:968)
      	at org.tmatesoft.svn.core.wc.SVNLogClient.doLog(SVNLogClient.java:873)
      	at com.atlassian.bamboo.repository.svn.SvnRepository.detectCommitsForUrl(SvnRepository.java:592)
      	at com.atlassian.bamboo.repository.svn.SvnRepository.collectChangesSinceLastBuild(SvnRepository.java:343)
      	... 46 more
      

      Workaround

      1. Enable detect changes on externals on both instances of the SVN repository
      2. Rebuild both plans

      or

      1. Disable detect changes on externals on repo in Plan 2
      2. Build - success
      3. Re-enable detect changes on externals on repo in Plan 2
      4. Build - success
      5. Suspect this will stop working once Bamboo is restarted again.

      or

      1. Enable SVN export (advanced options) on repository in Plan 2

            Assignee:
            Przemek Bruski
            Reporter:
            Jeremy Owen
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: