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

User: Admin user does not exist #94

Closed yfc845 closed 5 years ago

yfc845 commented 5 years ago

We are facing below error when running seed job:

simple  30-May-2019 12:12:28    Starting task 'DEVOPS' of type 'ch.mibex.bamboo.plandsl:seed.task'
simple  30-May-2019 12:12:28    Plan DSL: trigger reason: Manual build
simple  30-May-2019 12:12:28    Plan DSL: will run under user 'ichan'
simple  30-May-2019 12:12:28    Plan DSL: start processing...
simple  30-May-2019 12:12:28    Plan DSL: will now process script file from build.groovy
simple  30-May-2019 12:12:32    Plan DSL: warning: (PlanBlocks.groovy:139): polling is deprecated
error   30-May-2019 12:12:32    Plan DSL: task failed: User: Admin user does not exist
error   30-May-2019 12:12:32    java.lang.IllegalArgumentException: User: Admin user does not exist
error   30-May-2019 12:12:32        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)
error   30-May-2019 12:12:32        at com.atlassian.bamboo.security.PermissionsServiceUtils.validateUser(PermissionsServiceUtils.java:65)
error   30-May-2019 12:12:32        at com.atlassian.bamboo.project.AbstractProjectPermissionsService.validateUser(AbstractProjectPermissionsService.java:261)
error   30-May-2019 12:12:32        at com.atlassian.bamboo.project.AbstractProjectPermissionsService.getUserPermissionsForProject(AbstractProjectPermissionsService.java:84)
error   30-May-2019 12:12:32        at com.atlassian.bamboo.project.DefaultProjectPermissionsService.getUserPermissionsForProject(DefaultProjectPermissionsService.java:72)
error   30-May-2019 12:12:32        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
error   30-May-2019 12:12:32        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
error   30-May-2019 12:12:32        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   30-May-2019 12:12:32        at java.lang.reflect.Method.invoke(Method.java:498)
error   30-May-2019 12:12:32        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
error   30-May-2019 12:12:32        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
error   30-May-2019 12:12:32        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1212)
error   30-May-2019 12:12:32        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHelper.java:911)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:902)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:168)
error   30-May-2019 12:12:32        at ch.mibex.bamboo.plandsl.plugin.services.ProjectService$PermissionsHandler$_handleUserPermissions_closure1.doCall(ProjectService.groovy:146)
error   30-May-2019 12:12:32        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
error   30-May-2019 12:12:32        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
error   30-May-2019 12:12:32        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   30-May-2019 12:12:32        at java.lang.reflect.Method.invoke(Method.java:498)
error   30-May-2019 12:12:32        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
error   30-May-2019 12:12:32        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
error   30-May-2019 12:12:32        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021)
error   30-May-2019 12:12:32        at groovy.lang.Closure.call(Closure.java:426)
error   30-May-2019 12:12:32        at groovy.lang.Closure.call(Closure.java:442)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2056)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
error   30-May-2019 12:12:32        at ch.mibex.bamboo.plandsl.plugin.services.ProjectService$PermissionsHandler.handleUserPermissions(ProjectService.groovy:145)
error   30-May-2019 12:12:32        at ch.mibex.bamboo.plandsl.plugin.services.ProjectService$PermissionsHandler.updatePermissions(ProjectService.groovy:133)
error   30-May-2019 12:12:32        at ch.mibex.bamboo.plandsl.plugin.services.ProjectService$PermissionsHandler$updatePermissions.call(Unknown Source)
error   30-May-2019 12:12:32        at ch.mibex.bamboo.plandsl.plugin.services.ProjectService.updateProjectPermissions(ProjectService.groovy:81)
error   30-May-2019 12:12:32        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
error   30-May-2019 12:12:32        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
error   30-May-2019 12:12:32        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   30-May-2019 12:12:32        at java.lang.reflect.Method.invoke(Method.java:498)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166)
error   30-May-2019 12:12:32        at ch.mibex.bamboo.plandsl.plugin.services.ProjectService.updateProjectAndPlanPermissions(ProjectService.groovy:49)
error   30-May-2019 12:12:32        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
error   30-May-2019 12:12:32        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
error   30-May-2019 12:12:32        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   30-May-2019 12:12:32        at java.lang.reflect.Method.invoke(Method.java:498)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166)
error   30-May-2019 12:12:32        at ch.mibex.bamboo.plandsl.plugin.services.ProjectService.createOrUpdate(ProjectService.groovy:36)
error   30-May-2019 12:12:32        at ch.mibex.bamboo.plandsl.plugin.services.ProjectService$createOrUpdate.call(Unknown Source)
error   30-May-2019 12:12:32        at ch.mibex.bamboo.plandsl.plugin.PlanDslExecutorImpl$1$_doInTransaction_closure1.doCall(PlanDslExecutorImpl.groovy:65)
error   30-May-2019 12:12:32        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
error   30-May-2019 12:12:32        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
error   30-May-2019 12:12:32        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   30-May-2019 12:12:32        at java.lang.reflect.Method.invoke(Method.java:498)
error   30-May-2019 12:12:32        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
error   30-May-2019 12:12:32        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
error   30-May-2019 12:12:32        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021)
error   30-May-2019 12:12:32        at groovy.lang.Closure.call(Closure.java:426)
error   30-May-2019 12:12:32        at groovy.lang.Closure.call(Closure.java:442)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2056)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
error   30-May-2019 12:12:32        at ch.mibex.bamboo.plandsl.plugin.PlanDslExecutorImpl$1.doInTransaction(PlanDslExecutorImpl.groovy:63)
error   30-May-2019 12:12:32        at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21)
error   30-May-2019 12:12:32        at com.atlassian.sal.spring.component.SpringHostContextAccessor$1.doInTransaction(SpringHostContextAccessor.java:71)
error   30-May-2019 12:12:32        at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
error   30-May-2019 12:12:32        at com.atlassian.sal.spring.component.SpringHostContextAccessor.doInTransaction(SpringHostContextAccessor.java:68)
error   30-May-2019 12:12:32        at sun.reflect.GeneratedMethodAccessor202.invoke(Unknown Source)
error   30-May-2019 12:12:32        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   30-May-2019 12:12:32        at java.lang.reflect.Method.invoke(Method.java:498)
error   30-May-2019 12:12:32        at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
error   30-May-2019 12:12:32        at com.sun.proxy.$Proxy409.doInTransaction(Unknown Source)
error   30-May-2019 12:12:32        at sun.reflect.GeneratedMethodAccessor202.invoke(Unknown Source)
error   30-May-2019 12:12:32        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   30-May-2019 12:12:32        at java.lang.reflect.Method.invoke(Method.java:498)
error   30-May-2019 12:12:32        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
error   30-May-2019 12:12:32        at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
error   30-May-2019 12:12:32        at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
error   30-May-2019 12:12:32        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   30-May-2019 12:12:32        at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
error   30-May-2019 12:12:32        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
error   30-May-2019 12:12:32        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   30-May-2019 12:12:32        at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
error   30-May-2019 12:12:32        at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
error   30-May-2019 12:12:32        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   30-May-2019 12:12:32        at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
error   30-May-2019 12:12:32        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   30-May-2019 12:12:32        at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
error   30-May-2019 12:12:32        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
error   30-May-2019 12:12:32        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   30-May-2019 12:12:32        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
error   30-May-2019 12:12:32        at com.sun.proxy.$Proxy692.doInTransaction(Unknown Source)
error   30-May-2019 12:12:32        at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18)
error   30-May-2019 12:12:32        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
error   30-May-2019 12:12:32        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
error   30-May-2019 12:12:32        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   30-May-2019 12:12:32        at java.lang.reflect.Method.invoke(Method.java:498)
error   30-May-2019 12:12:32        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
error   30-May-2019 12:12:32        at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
error   30-May-2019 12:12:32        at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
error   30-May-2019 12:12:32        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   30-May-2019 12:12:32        at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
error   30-May-2019 12:12:32        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
error   30-May-2019 12:12:32        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   30-May-2019 12:12:32        at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
error   30-May-2019 12:12:32        at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
error   30-May-2019 12:12:32        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   30-May-2019 12:12:32        at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
error   30-May-2019 12:12:32        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   30-May-2019 12:12:32        at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
error   30-May-2019 12:12:32        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
error   30-May-2019 12:12:32        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   30-May-2019 12:12:32        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
error   30-May-2019 12:12:32        at com.sun.proxy.$Proxy1843.execute(Unknown Source)
error   30-May-2019 12:12:32        at com.atlassian.sal.api.transaction.TransactionTemplate$execute.call(Unknown Source)
error   30-May-2019 12:12:32        at ch.mibex.bamboo.plandsl.plugin.PlanDslExecutorImpl.execute(PlanDslExecutorImpl.groovy:46)
error   30-May-2019 12:12:32        at ch.mibex.bamboo.plandsl.plugin.PlanDslExecutor$execute.call(Unknown Source)
error   30-May-2019 12:12:32        at ch.mibex.bamboo.plandsl.plugin.task.SeedTask$_execute_closure1$_closure4.doCall(SeedTask.groovy:56)
error   30-May-2019 12:12:32        at ch.mibex.bamboo.plandsl.plugin.task.SeedTask$_execute_closure1$_closure4.doCall(SeedTask.groovy)
error   30-May-2019 12:12:32        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
error   30-May-2019 12:12:32        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
error   30-May-2019 12:12:32        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   30-May-2019 12:12:32        at java.lang.reflect.Method.invoke(Method.java:498)
error   30-May-2019 12:12:32        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
error   30-May-2019 12:12:32        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
error   30-May-2019 12:12:32        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021)
error   30-May-2019 12:12:32        at groovy.lang.Closure.call(Closure.java:426)
error   30-May-2019 12:12:32        at groovy.lang.Closure.call(Closure.java:420)
error   30-May-2019 12:12:32        at com.atlassian.bamboo.utils.BambooRunnables$BambooRunnableFromCallable.run(BambooRunnables.java:65)
error   30-May-2019 12:12:32        at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
error   30-May-2019 12:12:32        at com.atlassian.bamboo.applinks.ImpersonationServiceImpl$1.call(ImpersonationServiceImpl.java:74)
error   30-May-2019 12:12:32        at java_util_concurrent_Callable$call.call(Unknown Source)
error   30-May-2019 12:12:32        at ch.mibex.bamboo.plandsl.plugin.task.SeedTask$_execute_closure1.doCall(SeedTask.groovy:58)
error   30-May-2019 12:12:32        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
error   30-May-2019 12:12:32        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
error   30-May-2019 12:12:32        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   30-May-2019 12:12:32        at java.lang.reflect.Method.invoke(Method.java:498)
error   30-May-2019 12:12:32        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
error   30-May-2019 12:12:32        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
error   30-May-2019 12:12:32        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021)
error   30-May-2019 12:12:32        at groovy.lang.Closure.call(Closure.java:426)
error   30-May-2019 12:12:32        at groovy.lang.Closure.call(Closure.java:442)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2068)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.dgm$164.invoke(Unknown Source)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
error   30-May-2019 12:12:32        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
error   30-May-2019 12:12:32        at ch.mibex.bamboo.plandsl.plugin.task.SeedTask.execute(SeedTask.groovy:52)
error   30-May-2019 12:12:32        at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$2(TaskExecutorImpl.java:317)
error   30-May-2019 12:12:32        at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:252)
error   30-May-2019 12:12:32        at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:317)
error   30-May-2019 12:12:32        at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:112)
error   30-May-2019 12:12:32        at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:73)
error   30-May-2019 12:12:32        at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.executeBuildPhase(DefaultBuildAgent.java:204)
error   30-May-2019 12:12:32        at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:176)
error   30-May-2019 12:12:32        at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.lambda$waitAndPerformBuild$0(BuildAgentControllerImpl.java:131)
error   30-May-2019 12:12:32        at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:185)
error   30-May-2019 12:12:32        at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:125)
error   30-May-2019 12:12:32        at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:127)
error   30-May-2019 12:12:32        at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
error   30-May-2019 12:12:32        at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
error   30-May-2019 12:12:32        at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
error   30-May-2019 12:12:32        at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
error   30-May-2019 12:12:32        at java.lang.Thread.run(Thread.java:748)

Recently we upgraded our bamboo to 6.9.0, and today we found that you released dsl 1.9.15 which is said to be supporting bamboo 6.9.0, but after the upgrade the seed job still fails with the same error.

We don't have any "Admin user" defined in our dsl sourcecodes, why is it looking for it?

Notice that we have such a user in bamboo user directory:


Full name      Username   Status    Email                                 Directory 
Admin User   admin          Active     sysadmin@cmcrc.com      Crowd Repository

Maybe dsl is looking for a user named "Admin user" but we only have "Admin User" or "admin" ?

Also notice that we used to have below codes in our dsl:

                permissions {
                    user(name: 'Admin user') {
                        permissionTypes PermissionType.VIEW,
                                        PermissionType.EDIT
                    }
......

Because of this issue, we deleted every single code that has "Admin user" from sourcecode, but now it is still compaining about it...

Ian

mrueegg commented 5 years ago

Hi Ian,

The error occurs where the plug-in tries to create a diff between the existing project users and the new ones from the DSL to decide what needs to be updated. Is there a user "admin" in the project permissions?

Best regards, Michael

yfc845 commented 5 years ago

We used to define "Admin user" in permissions for many plans, now I have deleted all of these permissions from dsl groovies, and I can confirm that in any project admin is not defined there. Why is dsl still looking for such a user?

yfc845 commented 5 years ago

Can you elaborate how dsl compares the diff?

If it uses something from db, then it will be an issue because I went into the db and did a search of: bamboo=# select * from acl_entry where sid='Admin user';

and I can see thousands of records showing.

yfc845 commented 5 years ago

At least I need some more detailed error info which can tell me in which plan there is the issue... or do you know a db query that returns any plan that has "Admin" defined in its permissions?

yfc845 commented 5 years ago

OK, now I can confirm it is a mismatch when dsl do the comparison. I changed the option "action for not-referenced bamboo object" from "Delete" to "Ignore" and at least it succeeded... but we still need to change it back to "delete", what should I do?

yfc845 commented 5 years ago

I did lots of tests, it looks like: In our previous dsl definition, we defined this:

                permissions {
                    user(name: 'Admin user') {
                        permissionTypes PermissionType.VIEW,
                                        PermissionType.EDIT
                    }
......

and actually i found that this setting is not in the real plan UI, and after test I confirmed that this codes are wrong, we should use its username but here we used its full name. that is why dsl didn't add it correctly to all plans, although i don't understand why it is not giving us errors before...

so when the seed task is defined to use "delete" policy, it compares the new def with our current def, and our current def is looking for a username "Admin user", which never exists, then it will always fail.

So I guess now the only way to solve this is from db level, running something to remove/update all records with "Admin user" defined.

Do you have any idea?

mrueegg commented 5 years ago

@yfc845 I've just checked that the lower Bamboo version bound (6.2.0 when project permissions where introduced) verifies that the user exists before creating the project permissions. This is why I ask myself how Bamboo could create the permissions for a user that actually doesn't exist with that user name. Could you please tell us which version of Bamboo you used before upgrading to 6.9.0?

yfc845 commented 5 years ago

@mrueegg Hi, we upgraded our bamboo from 6.6.0 to 6.9.0, then this issue came.

yfc845 commented 5 years ago

No idea what happened, now my dsl build can pass with policy:delete. It is not complain for No Admin user. I asked my colleagues and nobody has done changes.

Anyway, is there a way to create project permission in dsl? We were always defining plan permissions before...

yfc845 commented 5 years ago

Hi @mrueegg I think this ticket can be closed because somehow the dsl build passed before we have done any change...this is weird.

mrueegg commented 5 years ago

@yfc845 Thanks for your feedback. Please do not hesitate to re-open the ticket if the problem comes up again.