Description
Summary
Artifact download task breaks when plan is moved. This only affects Artifact Download tasks if they are in the same plan, example, Job A in Stage B downloading artifact from Job A Stage A.
Steps to Reproduce
- Create a plan with 2 stages with a job in each stage
- Create an artifact definition in the first stage job
- Create a artifact download task in the second stage job. Set it to point to the first stage
- Move the plan to another project
Expected Results
The source plan of the artifact download task should be updated to point to the new Job key
Actual Results
The below exception is thrown in the atlassian-bamboo.log file:
2016-03-09 21:18:21,763 ERROR [AtlassianEvent::0-BAM::EVENTS:pool-2-thread-7] [AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event [com.atlassian.bamboo.event.BuildFinishedEvent[source=com.atlassian.bamboo.build.DefaultBuildExecutionManager@44c46304] job=PROJ2-PLAN1-JOB1 #2] from the invoker [SingleParameterMethodListenerInvoker{method=public void com.atlassian.bamboo.chains.ChainExecutionManagerImpl.onBuildFinished(com.atlassian.bamboo.event.BuildFinishedEvent), listener=com.atlassian.bamboo.chains.ChainExecutionManagerImpl@7e9032a0}] java.lang.RuntimeException: java.lang.IllegalStateException: Unable to find plan [PROJ-PLAN1] at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1$1.run(AsynchronousAbleEventDispatcher.java:46) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) 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) Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Unable to find plan [PROJ-PLAN1]
In the task configuration, the source plan is still pointing to the old JOB key.
Workaround
Manually update the artifact download task to select the proper source job
Attachments
Issue Links
- causes
-
BAM-17785 Artifact download failed from S3 after build deleted
- Closed