Details
-
Bug
-
Resolution: Answered
-
Low
-
None
-
5.14.5
-
None
-
Severity 2 - Major
-
1
-
Description
Summary
After upgrading Bamboo, re-run build or continuing a build that was pending a manual stage that existed before the upgrade will fail with an Unknown RepositoryDefinition error.
Steps to Reproduce
- Using an older version of Bamboo, E.g. 5.7.2
- Create a plan and link it to a repository (reproduced with a linked Bitbucket repository)
- Build definition:
- Stage 1: Source-code checkout
- Stage 2 (Manual Stage): Source-code checkout
- Run the plan
- Continue / run the manual stage so it completes successfully
- Run the plan again: New build, don't run the manual stage
- Should now have a successful build result and a second build result pending manual stage completion
- Shutdown Bamboo
- Upgrade Bamboo to 5.14+
- Attempt to re-run the first successful pre-upgrade build result
- Attempt to continue the manual stage from the second pre-upgrade build result
Expected Results
- Build re-runs and completes successfully.
- Manual stage runs and build is completed.
Actual Results
- Build will not complete.
The below exception is thrown in the atlassian-bamboo.log file and shown in the UI:
java.lang.IllegalArgumentException: Unknown RepositoryDefinition 917505 at com.atlassian.bamboo.v2.build.BuildChangesImpl.getBuildRepositoryChanges(BuildChangesImpl.java:214) at com.atlassian.bamboo.v2.build.BuildChangesImpl.setPreviousVcsRevisionKey(BuildChangesImpl.java:87) at com.atlassian.bamboo.plan.vcsRevision.PlanVcsRevisionHistoryManagerImpl.markBuildStartedNewTx(PlanVcsRevisionHistoryManagerImpl.java:60) 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:302) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) at com.sun.proxy.$Proxy180.markBuildStartedNewTx(Unknown Source) at com.atlassian.bamboo.plan.vcsRevision.PlanVcsRevisionHistoryServiceImpl.lambda$markBuildStarted$1(PlanVcsRevisionHistoryServiceImpl.java:35) at io.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:302) at com.atlassian.bamboo.plan.vcsRevision.PlanVcsRevisionHistoryServiceImpl.markBuildStarted(PlanVcsRevisionHistoryServiceImpl.java:34) at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.tryStartChainState(ChainExecutionManagerImpl.java:362) at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.delayedStart(ChainExecutionManagerImpl.java:235) 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:302) 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:208) at com.sun.proxy.$Proxy151.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:302) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at com.sun.proxy.$Proxy151.delayedStart(Unknown Source) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$1$1$1.lambda$call$0(PlanExecutionManagerImpl.java:413) 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:412) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$1$1$1.call(PlanExecutionManagerImpl.java:403) 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:783) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.access$400(PlanExecutionManagerImpl.java:130) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$1$1.run(PlanExecutionManagerImpl.java:397) 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)
Notes
- New builds complete successfully.
Workaround
Instead of rerunning a build customer can run custom build with the same vcs revision as the original one.
Attachments
Issue Links
- relates to
-
BAM-14057 Handle this exception - java.lang.IllegalArgumentException: Unknown RepositoryDefinition
- Closed