Details
-
Bug
-
Resolution: Fixed
-
Low
-
5.9, 5.10-OD-02, 5.12.1, 5.14.5
-
Severity 3 - Minor
-
1
-
Description
After creating a plan and a deployment project using the plan, it's possible to delete the plan, leaving the project without a plan.
This seems to be a expected, as this message is shown when the plan is deleted:
Deployment projects related to this plan
The following deployment projects are related to this plan and will not run when this plan is removed:
My Deployment Project
However, this is causing bugs like this one when cloning or the following stacktrace when creating an environment, failing to create it:
java.lang.NullPointerException at com.atlassian.bamboo.trigger.environment.AbstractEnvironmentTriggerConfigurator.populateContextWithBranchControlVariablesForDeployments(AbstractEnvironmentTriggerConfigurator.java:128) at com.atlassian.bamboo.trigger.dependency.AfterSuccessfulPlanTriggerConfigurator.populateContextForCreate(AfterSuccessfulPlanTriggerConfigurator.java:55) at com.atlassian.bamboo.ww2.actions.chains.admin.triggers.TriggerUIConfigBean.prepareCreateHtml(TriggerUIConfigBean.java:83) at com.atlassian.bamboo.deployments.environments.actions.CreateEnvironment$1.apply(CreateEnvironment.java:105) at com.atlassian.bamboo.deployments.environments.actions.CreateEnvironment$1.apply(CreateEnvironment.java:95) at com.google.common.collect.Iterators$8.next(Iterators.java:812) at com.google.common.collect.Lists.newArrayList(Lists.java:139) at com.google.common.collect.Lists.newArrayList(Lists.java:119) at com.atlassian.bamboo.deployments.environments.actions.CreateEnvironment.prepare(CreateEnvironment.java:94) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:167) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:139) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.atlassian.bamboo.security.acegi.intercept.web.WebworkSecurityInterceptor.intercept(WebworkSecurityInterceptor.java:65) at com.atlassian.bamboo.security.acegi.intercept.web.WebworkSecurityInterceptorProxy.intercept(WebworkSecurityInterceptorProxy.java:31) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.atlassian.xwork.interceptors.AroundInterceptor.intercept(AroundInterceptor.java:25) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.atlassian.bamboo.ww2.interceptors.PaginationAwareInterceptor.doIntercept(PaginationAwareInterceptor.java:100) at com.atlassian.bamboo.ww2.interceptors.AbstractBambooInterceptor.intercept(AbstractBambooInterceptor.java:34) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.atlassian.bamboo.ww2.interceptors.ConditionalActionInterceptor.intercept(ConditionalActionInterceptor.java:82) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.atlassian.bamboo.ww2.interceptors.AroundInterceptor.intercept(AroundInterceptor.java:25) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77) at org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter.doFilter(StrutsExecuteFilter.java:93) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:70) at com.atlassian.labs.botkiller.BotKillerFilter.doFilter(BotKillerFilter.java:36) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:78)
This is both not expected (a stacktrace is definitively not an expected behavior), prevents the users from completely using the system and it's now clear on how to fix it.
Steps to reproduce
- Create a build plan
- Create a deployment project using that plan
- Delete the plan
- Clone project or try to set an environment
Expected behavior
Expected behaviors may be:
- Prevent users from doing the operation while the project doesn't have a plan
- Prevent users from editing the project at all while it doesn't have a plan
- Prevent plan from being deleted while it's associated with deployment projects
- Ask customer to set the plan in the deployment project before continuing with the operations
- Have all operations work even without a plan
Actual outcome
- In both cases (and probably in other situations) a stack trace is shown and the operation is not completed
Workaround
- Set a plan before cloning/setting and environment
Attachments
Issue Links
- was cloned as
-
BDEV-9960 Loading...