Bamboo plan gets stuck if the artifact download has a source plan without successful runs
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
It is possible for a plan not to run or get stuck/hung in case the artifact download has a source plan without successful runs. The job with a dependent artifact can hang during the initial branch build if triggered before artifact exists.
Environment
Any versions of Bamboo.
Diagnosis
When running a plan if you see the below error in the UI or in the logs when a plan gets stuck or hung:
java.lang.RuntimeException: java.lang.IllegalArgumentException: Unable to find at least one successful result for plan: Test-plan com.atlassian.bamboo.chains.ChainPluginSupportHelper.lambda$prepareRuntimeTaskData$0(ChainPluginSupportHelper.java:50)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
this would mean that one of the artifact download tasks is still pointing at the wrong plan or there was a dependency on an old plan.
Cause
Bamboo generally assumes that if there's an artifact download task it makes so sense to run subsequent tasks that need this artifact. Thus, there has to be at least 1 successful build which has produced the artifact to be downloaded in a different plan and stage.
Solution
You can follow the below steps so that you can run the impacted plan:
- Identify the blocking build which has a failing artifact download task.
- From there you can use the plan key to identify the missing shared artifact that is blocking the build.
- You can then disable the artifact download task and see if the plan now runs successfully.
The error that is seen above matches a known bug that causes a job to hang indefinitely if the dependent artifact are not found: