Bamboo is deleting active plans under project where marked_for_deletion as set as true for Projects

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 11.0.0, 10.2.2, 9.6.11
    • Affects Version/s: 9.6.4
    • Component/s: Expiry
    • None
    • 1
    • Severity 3 - Minor

      Issue Summary

      Currently in Bamboo it is not possible to delete a project from the Bamboo GUI until all the plans under it are deleted. So in an ideal scenario it is not possible to have marked_for_deletion for projects is set as True if there are active plans under the project.

      Let's assume for some unknown reason if marked_for_deletion for a project is set as True and the project has active plans under it, from Bamboo ( 9.x.x) Bamboo will delete the project and the plans without any checks.

      In Bamboo ( 8.x.x ) this check was present and the below error would be seen in the logs

      2025-02-04 13:07:43,003 INFO [DelayedDeletionThread] [DeletionServiceHelper] Deleting 1 Project(s) marked for deletion
      2025-02-04 13:07:43,004 INFO [DelayedDeletionThread] [DeletionServiceHelper] Deleting BAM
      2025-02-04 13:07:43,177 ERROR [DelayedDeletionThread] [DeletionServiceHelper] Project BAM (BAM) contains plans. Delete the plans first.
      java.lang.IllegalArgumentException: Project BAM (BAM) contains plans. Delete the plans first.
              at com.google.common.base.Preconditions.checkArgument(Preconditions.java:43
      

      Steps to Reproduce

      1) Set marked_for_deletion column as true inside Project table for a project which has active plans under it
      2) Wait for the Background deletion service to run.

      Expected Results

      Warning as per the above should be thrown in the logs

      Actual Results

      The active plans gets deleted.

      Workaround

      None as of now.

            Assignee:
            Mateusz Szmal
            Reporter:
            Shashank Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: