mibexsoftware / bamboo-plan-dsl-plugin

Configuration as code with a Groovy-based DSL or YAML for Atlassian Bamboo.
https://marketplace.atlassian.com/plugins/ch.mibex.bamboo.plandsl/
Other
40 stars 16 forks source link

ConcurrentModificationException - Updating Custom Environment Notifications #70

Open kokokruunch opened 6 years ago

kokokruunch commented 6 years ago

Version 1.9.7 Bamboo Version: 6.1.0

We're seeing a ConcurrentModificationException when it tries to update/delete deployment environment custom notifications.

Steps to reproduce

  1. Add a Custom Environment Notification to a Deployment Plan

    notifications {
    custom (event: NotificationEvent.DEPLOYMENT_FINISHED,
    pluginKey: 'com.atlassian.bamboo.plugins.bamboo-slack:recipient.slack') {
    
    configure (
      webhookUrl: "${Config.SLACK_WEBHOOK_URL}",
      channel: "${Config.SLACK_RELEASE_CH}",
      botName: "${Config.SLACK_BOT_NAME}"
    )
    }
    }
  2. Run seed. It successfully adds the notification.
  3. Remove the notifications and run the seed again.
  4. The error below occurs.

Not sure if this is just specific to custom environment notifications.

EDIT: It only seems to happen when there's two environment notifications that exist. Haven't tried it with plan notifications.

simple  17-Jan-2018 12:29:20    Plan DSL: found shared artifact with name 'adapter-beat-v1 Zip' and ID '12156949'
simple  17-Jan-2018 12:29:20    Plan DSL: found artifact with name 'adapter-beat-v1 Zip': ch.mibex.bamboo.plandsl.dsl.tasks.ArtifactInfo(12156949, 0, 2, adapter-beat-v1 Zip)
simple  17-Jan-2018 12:29:20    Plan DSL: deleted notification 'com.atlassian.bamboo.plugins.bamboo-slack:recipient.slack' because it is not referenced anymore.
error   17-Jan-2018 12:29:20    Error occurred while running Task 'takes the icare-bambooseed project and runs to make the other jobs(1)' of type ch.mibex.bamboo.plandsl:seed.task.
error   17-Jan-2018 12:29:20    java.util.ConcurrentModificationException
error   17-Jan-2018 12:29:20        at java.util.HashMap$HashIterator.nextNode(HashMap.java:1442)
error   17-Jan-2018 12:29:20        at java.util.HashMap$KeyIterator.next(HashMap.java:1466)
error   17-Jan-2018 12:29:20        at org.hibernate.collection.internal.AbstractPersistentCollection$IteratorProxy.next(AbstractPersistentCollection.java:835)
error   17-Jan-2018 12:29:20        at ch.mibex.bamboo.plandsl.plugin.services.EnvironmentService.createOrUpdateNotifications(EnvironmentService.groovy:120)
error   17-Jan-2018 12:29:20        at sun.reflect.GeneratedMethodAccessor4365.invoke(Unknown Source)
error   17-Jan-2018 12:29:20        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   17-Jan-2018 12:29:20        at java.lang.reflect.Method.invoke(Method.java:498)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
error   17-Jan-2018 12:29:20        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:384)
error   17-Jan-2018 12:29:20        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174)
error   17-Jan-2018 12:29:20        at ch.mibex.bamboo.plandsl.plugin.services.EnvironmentService$_createOrUpdate_closure1.doCall(EnvironmentService.groovy:53)
error   17-Jan-2018 12:29:20        at sun.reflect.GeneratedMethodAccessor4615.invoke(Unknown Source)
error   17-Jan-2018 12:29:20        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   17-Jan-2018 12:29:20        at java.lang.reflect.Method.invoke(Method.java:498)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
error   17-Jan-2018 12:29:20        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
error   17-Jan-2018 12:29:20        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021)
error   17-Jan-2018 12:29:20        at groovy.lang.Closure.call(Closure.java:426)
error   17-Jan-2018 12:29:20        at groovy.lang.Closure.call(Closure.java:442)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2056)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
error   17-Jan-2018 12:29:20        at ch.mibex.bamboo.plandsl.plugin.services.EnvironmentService.createOrUpdate(EnvironmentService.groovy:48)
error   17-Jan-2018 12:29:20        at ch.mibex.bamboo.plandsl.plugin.services.EnvironmentService$createOrUpdate.call(Unknown Source)
error   17-Jan-2018 12:29:20        at ch.mibex.bamboo.plandsl.plugin.services.DeploymentProjectService.handleEnvironments(DeploymentProjectService.groovy:91)
error   17-Jan-2018 12:29:20        at sun.reflect.GeneratedMethodAccessor4380.invoke(Unknown Source)
error   17-Jan-2018 12:29:20        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   17-Jan-2018 12:29:20        at java.lang.reflect.Method.invoke(Method.java:498)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
error   17-Jan-2018 12:29:20        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:384)
error   17-Jan-2018 12:29:20        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174)
error   17-Jan-2018 12:29:20        at ch.mibex.bamboo.plandsl.plugin.services.DeploymentProjectService$_createOrUpdate_closure1$_closure4$_closure5.doCall(DeploymentProjectService.groovy:39)
error   17-Jan-2018 12:29:20        at sun.reflect.GeneratedMethodAccessor4374.invoke(Unknown Source)
error   17-Jan-2018 12:29:20        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   17-Jan-2018 12:29:20        at java.lang.reflect.Method.invoke(Method.java:498)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
error   17-Jan-2018 12:29:20        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
error   17-Jan-2018 12:29:20        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021)
error   17-Jan-2018 12:29:20        at groovy.lang.Closure.call(Closure.java:426)
error   17-Jan-2018 12:29:20        at groovy.lang.Closure.call(Closure.java:442)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2056)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
error   17-Jan-2018 12:29:20        at ch.mibex.bamboo.plandsl.plugin.services.DeploymentProjectService$_createOrUpdate_closure1$_closure4.doCall(DeploymentProjectService.groovy:29)
error   17-Jan-2018 12:29:20        at sun.reflect.GeneratedMethodAccessor4373.invoke(Unknown Source)
error   17-Jan-2018 12:29:20        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   17-Jan-2018 12:29:20        at java.lang.reflect.Method.invoke(Method.java:498)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
error   17-Jan-2018 12:29:20        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
error   17-Jan-2018 12:29:20        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021)
error   17-Jan-2018 12:29:20        at groovy.lang.Closure.call(Closure.java:426)
error   17-Jan-2018 12:29:20        at groovy.lang.Closure.call(Closure.java:442)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2056)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
error   17-Jan-2018 12:29:20        at ch.mibex.bamboo.plandsl.plugin.services.DeploymentProjectService$_createOrUpdate_closure1.doCall(DeploymentProjectService.groovy:28)
error   17-Jan-2018 12:29:20        at sun.reflect.GeneratedMethodAccessor4447.invoke(Unknown Source)
error   17-Jan-2018 12:29:20        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   17-Jan-2018 12:29:20        at java.lang.reflect.Method.invoke(Method.java:498)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
error   17-Jan-2018 12:29:20        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
error   17-Jan-2018 12:29:20        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021)
error   17-Jan-2018 12:29:20        at groovy.lang.Closure.call(Closure.java:426)
error   17-Jan-2018 12:29:20        at groovy.lang.Closure.call(Closure.java:442)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2056)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
error   17-Jan-2018 12:29:20        at ch.mibex.bamboo.plandsl.plugin.services.DeploymentProjectService.createOrUpdate(DeploymentProjectService.groovy:27)
error   17-Jan-2018 12:29:20        at ch.mibex.bamboo.plandsl.plugin.services.DeploymentProjectService$createOrUpdate.call(Unknown Source)
error   17-Jan-2018 12:29:20        at ch.mibex.bamboo.plandsl.plugin.PlanDslExecutorImpl$3.doInTransaction(PlanDslExecutorImpl.groovy:108)
error   17-Jan-2018 12:29:20        at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21)
error   17-Jan-2018 12:29:20        at com.atlassian.sal.spring.component.SpringHostContextAccessor$1.doInTransaction(SpringHostContextAccessor.java:71)
error   17-Jan-2018 12:29:20        at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
error   17-Jan-2018 12:29:20        at com.atlassian.sal.spring.component.SpringHostContextAccessor.doInTransaction(SpringHostContextAccessor.java:68)
error   17-Jan-2018 12:29:20        at sun.reflect.GeneratedMethodAccessor168.invoke(Unknown Source)
error   17-Jan-2018 12:29:20        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   17-Jan-2018 12:29:20        at java.lang.reflect.Method.invoke(Method.java:498)
error   17-Jan-2018 12:29:20        at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
error   17-Jan-2018 12:29:20        at com.sun.proxy.$Proxy338.doInTransaction(Unknown Source)
error   17-Jan-2018 12:29:20        at sun.reflect.GeneratedMethodAccessor168.invoke(Unknown Source)
error   17-Jan-2018 12:29:20        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   17-Jan-2018 12:29:20        at java.lang.reflect.Method.invoke(Method.java:498)
error   17-Jan-2018 12:29:20        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
error   17-Jan-2018 12:29:20        at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
error   17-Jan-2018 12:29:20        at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
error   17-Jan-2018 12:29:20        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   17-Jan-2018 12:29:20        at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
error   17-Jan-2018 12:29:20        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
error   17-Jan-2018 12:29:20        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   17-Jan-2018 12:29:20        at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
error   17-Jan-2018 12:29:20        at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
error   17-Jan-2018 12:29:20        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   17-Jan-2018 12:29:20        at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
error   17-Jan-2018 12:29:20        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   17-Jan-2018 12:29:20        at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
error   17-Jan-2018 12:29:20        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
error   17-Jan-2018 12:29:20        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   17-Jan-2018 12:29:20        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
error   17-Jan-2018 12:29:20        at com.sun.proxy.$Proxy562.doInTransaction(Unknown Source)
error   17-Jan-2018 12:29:20        at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18)
error   17-Jan-2018 12:29:20        at sun.reflect.GeneratedMethodAccessor384.invoke(Unknown Source)
error   17-Jan-2018 12:29:20        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   17-Jan-2018 12:29:20        at java.lang.reflect.Method.invoke(Method.java:498)
error   17-Jan-2018 12:29:20        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
error   17-Jan-2018 12:29:20        at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
error   17-Jan-2018 12:29:20        at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
error   17-Jan-2018 12:29:20        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   17-Jan-2018 12:29:20        at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
error   17-Jan-2018 12:29:20        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
error   17-Jan-2018 12:29:20        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   17-Jan-2018 12:29:20        at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
error   17-Jan-2018 12:29:20        at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
error   17-Jan-2018 12:29:20        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   17-Jan-2018 12:29:20        at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
error   17-Jan-2018 12:29:20        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   17-Jan-2018 12:29:20        at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
error   17-Jan-2018 12:29:20        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
error   17-Jan-2018 12:29:20        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   17-Jan-2018 12:29:20        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
error   17-Jan-2018 12:29:20        at com.sun.proxy.$Proxy1138.execute(Unknown Source)
error   17-Jan-2018 12:29:20        at com.atlassian.sal.api.transaction.TransactionTemplate$execute.call(Unknown Source)
error   17-Jan-2018 12:29:20        at ch.mibex.bamboo.plandsl.plugin.PlanDslExecutorImpl.execute(PlanDslExecutorImpl.groovy:104)
error   17-Jan-2018 12:29:20        at ch.mibex.bamboo.plandsl.plugin.PlanDslExecutor$execute.call(Unknown Source)
error   17-Jan-2018 12:29:20        at ch.mibex.bamboo.plandsl.plugin.task.SeedTask$_execute_closure1$_closure4.doCall(SeedTask.groovy:53)
error   17-Jan-2018 12:29:20        at ch.mibex.bamboo.plandsl.plugin.task.SeedTask$_execute_closure1$_closure4.doCall(SeedTask.groovy)
error   17-Jan-2018 12:29:20        at sun.reflect.GeneratedMethodAccessor4430.invoke(Unknown Source)
error   17-Jan-2018 12:29:20        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   17-Jan-2018 12:29:20        at java.lang.reflect.Method.invoke(Method.java:498)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
error   17-Jan-2018 12:29:20        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
error   17-Jan-2018 12:29:20        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021)
error   17-Jan-2018 12:29:20        at groovy.lang.Closure.call(Closure.java:426)
error   17-Jan-2018 12:29:20        at groovy.lang.Closure.call(Closure.java:420)
error   17-Jan-2018 12:29:20        at com.atlassian.bamboo.utils.BambooRunnables$BambooRunnableFromCallable.run(BambooRunnables.java:64)
error   17-Jan-2018 12:29:20        at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
error   17-Jan-2018 12:29:20        at com.atlassian.bamboo.applinks.ImpersonationServiceImpl$1.call(ImpersonationServiceImpl.java:74)
error   17-Jan-2018 12:29:20        at java_util_concurrent_Callable$call.call(Unknown Source)
error   17-Jan-2018 12:29:20        at ch.mibex.bamboo.plandsl.plugin.task.SeedTask$_execute_closure1.doCall(SeedTask.groovy:55)
error   17-Jan-2018 12:29:20        at sun.reflect.GeneratedMethodAccessor4429.invoke(Unknown Source)
error   17-Jan-2018 12:29:20        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   17-Jan-2018 12:29:20        at java.lang.reflect.Method.invoke(Method.java:498)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
error   17-Jan-2018 12:29:20        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
error   17-Jan-2018 12:29:20        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021)
error   17-Jan-2018 12:29:20        at groovy.lang.Closure.call(Closure.java:426)
error   17-Jan-2018 12:29:20        at groovy.lang.Closure.call(Closure.java:442)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2068)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.dgm$164.invoke(Unknown Source)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
error   17-Jan-2018 12:29:20        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
error   17-Jan-2018 12:29:20        at ch.mibex.bamboo.plandsl.plugin.task.SeedTask.execute(SeedTask.groovy:49)
error   17-Jan-2018 12:29:20        at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$2(TaskExecutorImpl.java:282)
error   17-Jan-2018 12:29:20        at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:223)
error   17-Jan-2018 12:29:20        at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:282)
error   17-Jan-2018 12:29:20        at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:111)
error   17-Jan-2018 12:29:20        at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:71)
error   17-Jan-2018 12:29:20        at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:185)
error   17-Jan-2018 12:29:20        at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:120)
error   17-Jan-2018 12:29:20        at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:113)
error   17-Jan-2018 12:29:20        at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:185)
error   17-Jan-2018 12:29:20        at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:113)
error   17-Jan-2018 12:29:20        at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:126)
error   17-Jan-2018 12:29:20        at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:47)
error   17-Jan-2018 12:29:20        at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
error   17-Jan-2018 12:29:20        at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
error   17-Jan-2018 12:29:20        at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
error   17-Jan-2018 12:29:20        at java.lang.Thread.run(Thread.java:748)
mrueegg commented 6 years ago

Hi,

Please excuse my late response.

Unfortunately, I was not yet able to reproduce this with Bamboo 6.1.

1) I ran the seed task with the following example DSL and "Action for not-referenced Bamboo objects" = DELETE:

project(key: 'PROJECTKEY', name: 'my project') {
    plan(key: 'SIMPLEPLAN', name: 'my simple plan') {
        deploymentProject(name: 'DP1') {
            description 'my deployment project'

            environment(name: 'staging') {
                description 'Staging env'
                notifications {
                    custom(event: NotificationEvent.DEPLOYMENT_FINISHED,
                            pluginKey: 'com.atlassian.bamboo.plugins.bamboo-slack:recipient.slack') {
                        configure(
                                webhookUrl: "x",
                                channel: "y",
                                botName: "z"
                        )
                    }
                    custom(event: NotificationEvent.DEPLOYMENT_FINISHED,
                            pluginKey: 'com.atlassian.bamboo.plugins.bamboo-slack:recipient.slack') {
                        configure(
                                webhookUrl: "x",
                                channel: "y",
                                botName: "z"
                        )
                    }
                }
            }
        }
    }
}
  1. I removed the complete notifications block and re-run the seed task.
  2. The seed task was successful.

Do you see any differences compared to your example?

Thanks, Michael