Description
When seeing a job's requirements in Bamboo Cloud, there's a link to elastic instance. This link is broken, as it's taking to a page like:
https://instance.atlassian.net/builds/agent/viewAgents.action?planKey=undefined
The 'planKey=undefined' seems to be a problem.
Clicking the link takes to a page with an error and a stack trace.
The image shows the link and the target URL:
Steps to Reproduce
- Create a Cloud instance with Bamboo
- Create a plan with a job
- Configure the plan, by going to it and clicking 'Actions >> Configure Plan'
- Select the job on the left menu (expand the stage if necessary)
- Click the 'Requirements' tab
- Click the 'N elastic images' link, where 'N' is the number of images
Expected outcome
- The pages with elastic images is open
Actual behavior
- The error pages with a stacktrace appears
The stacktrace is:
com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.IllegalArgumentException: Could not parse key 'undefined' at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149) at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112) at com.atlassian.bamboo.configuration.agent.ViewAgents.validateInputKey(ViewAgents.java:226) at com.atlassian.bamboo.configuration.agent.ViewAgents.doDefault(ViewAgents.java:242) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:450) at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:289) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:252) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:100) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:100) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.atlassian.bamboo.ww2.interceptors.FieldErrorUsageVerifier.intercept(FieldErrorUsageVerifier.java:49) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.atlassian.bamboo.ww2.interceptors.JSONValidationInterceptor.doIntercept(JSONValidationInterceptor.java:69) at com.atlassian.bamboo.ww2.interceptors.AbstractBambooInterceptor.intercept(AbstractBambooInterceptor.java:34) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) ... at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.IllegalArgumentException: Could not parse key 'undefined' at com.atlassian.bamboo.plan.PlanKeys.getPlanKey(PlanKeys.java:350) at com.atlassian.bamboo.configuration.agent.ViewAgents$1.create(ViewAgents.java:68) at com.atlassian.bamboo.configuration.agent.ViewAgents$1.create(ViewAgents.java:61) at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:321) at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143) ... 233 more
Workaround
- Replace 'undefined' by the plan key in the link and access it