Details
-
Bug
-
Resolution: Fixed
-
Medium
-
8.0.4, 8.2.4
-
None
-
5
-
Severity 2 - Major
-
1
-
Description
Problem
Bamboo will put a Build re-run in an "endless run" state and will not follow any stop commands in case the current Build plan has been modified since the original referenced Plan used by the re-run
Environment
Bamboo 8.2
Steps to Reproduce
- Create a Build plan with "Stage 1" and two Jobs with a simple "sleep 30"
- Run the Build plan once - it will succeed
- Modify the Build plan by adding an additional Stage, then move/drag "Job 2" to "Stage 2"
- Re-run the Build that had succeeded
Additional issue:
When re-running a build Bamboo will follow the current Plan structure to indicate the build order, so if a "Job 1" from "Stage 1" has been moved to "Stage 2", it is expected that Job to be run only when "Stage 2" starts, but that's not the case, within this issue, Bamboo will run "Job 1" and "Stage 2" before "Stage 1" and break the execution order.
Expected Results
The re-run should succeed and finish completely
Actual Results
The re-run Jobs succeed, but the Build status remains on "Building". Whenever trying to stop it manually we get logs such as:
2022-07-06 16:39:37,890 INFO [scheduler_Worker-4] [OrphanedBuildMonitorJob] DEF-BREAK-12 marked as InProgress but not present in CBC since Wed Jul 06 16:35:37 AEST 2022 2022-07-06 16:39:37,891 INFO [scheduler_Worker-4] [OrphanedBuildMonitorJob] Found a job with no running tasks: DEF-BREAK. Trying to stop. 2022-07-06 16:39:37,893 INFO [scheduler_Worker-4] [OrphanedBuildMonitorJob] Finishing build from OrphanedBuildMonitorJob DEF-BREAK-JOB2-12 2022-07-06 16:39:37,893 INFO [scheduler_Worker-4] [CurrentlyBuildingContainer] removeCurrentlyBuilding called for [DEF-BREAK-JOB2-12] 2022-07-06 16:39:37,893 INFO [scheduler_Worker-4] [CurrentlyBuildingContainer] removeCurrentlyBuilding called for [DEF-BREAK-JOB2-12] but the plan did not exist in CBC 2022-07-06 16:39:37,893 INFO [scheduler_Worker-4] [DefaultBuildExecutionManager] Did not remove DEF-BREAK-JOB2-12 from CBC
Workaround
Do not re-run any past builds. Instead, run a fresh build of the same plan.