Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-25765

Bamboo stages cannot be deleted with an internal server error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 9.5.4, 9.6.2
    • 9.5.0, 9.6.0
    • Stages
    • None

    Description

      Issue Summary

      Bamboo stages cannot be deleted with an internal server error

      2024-04-16 12:05:51,198 INFO [http-nio-8085-exec-15 url: /bamboo/ajax/deleteStage.action; user: admin] [DeletionServiceImpl] Stopping any running builds for PROJ-PLAN-SJ2
      2024-04-16 12:05:51,198 INFO [http-nio-8085-exec-15 url: /bamboo/ajax/deleteStage.action; user: admin] [DeletionServiceImpl] Scheduling plan [PROJ-PLAN-SJ2] for deletion
      2024-04-16 12:05:51,209 ERROR [http-nio-8085-exec-15 url: /bamboo/ajax/deleteStage.action; user: admin] [ExceptionMappingInterceptor] null
      java.lang.NullPointerException: null
      

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Have the value of one of the stage_id in the build table to NULL

      Expected Results

      Stage is deleted successfully

      Actual Results

      Stage is not deleted with an internal server error

      2024-04-16 12:05:51,198 INFO [http-nio-8085-exec-15 url: /bamboo/ajax/deleteStage.action; user: admin] [DeletionServiceImpl] Stopping any running builds for PROJ-PLAN-SJ2
      2024-04-16 12:05:51,198 INFO [http-nio-8085-exec-15 url: /bamboo/ajax/deleteStage.action; user: admin] [DeletionServiceImpl] Scheduling plan [PROJ-PLAN-SJ2] for deletion
      2024-04-16 12:05:51,209 ERROR [http-nio-8085-exec-15 url: /bamboo/ajax/deleteStage.action; user: admin] [ExceptionMappingInterceptor] null
      java.lang.NullPointerException: null
      
      2024-04-16 09:24:10,316 INFO [http-nio-8085-exec-127 url: /ajax/deleteStage.action; user: admin] [DeletionServiceImpl] Scheduling stage [PROJ-PLAN::abc324234324] for deletion <-- THIS IS THE STAGE IN THE MASTER PLAN
      2024-04-16 09:24:10,320 INFO [http-nio-8085-exec-127 url: /ajax/deleteStage.action; user: admin] [DeletionServiceImpl] Scheduling stage [PROJ-PLAN0::abc324234324] for deletion <-- THIS IS THE SAME STAGE IN THE BRANCH
      2024-04-16 09:24:10,320 ERROR [http-nio-8085-exec-127 url: /ajax/deleteStage.action; user: admin] [ImmutableChainStageImpl] nulljava.lang.IllegalStateException: This stage is not a DB object 
      

      The root cause is an operation executed after the plan branch's stage is marked for deletion - Bamboo tries to retrieve its database ID, but it doesn't exist, because stages are not created for every plan branch (unless it is divergent). Instead, a "virtual" stage is created, which doesn't have a real database id.

      Workarounds

      If the plan branch is removed, then the stage can be deleted properly. Afterwards, the branch can be re-created.

      Attachments

        Issue Links

          Activity

            People

              94ce1c6f8249 Bruno Benvenuti
              feeaafc2eddb Mohamed Ayman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: