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

Bamboo doesn't expire inactive plan braches that didn't run builds

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 6.5.0
    • 5.9.7
    • Expiry
    • None

    Description

      Summary

      Bamboo doesn't expire inactive plan braches that didn't run builds.

      Environment

      • Bamboo version: 5.9.7 and 5.9.10
      • Java Version: OpenJDK 1.8 (-XX:MaxPermSize=256m -Xms6g -Xmx6g)
      • OS: Linux (2.6.32-573.12.1.el6.x86_64)
      • Database: MySQL

      Steps to Reproduce

      1. Go to a Plan inside Bamboo whose source repository has branches.
      2. Configure the Automatic branch management to delete plan branches after a period of inactivity.
      3. Create a plan branch through Plan configuration >> Branches using one of the following options:
        • Configure Automatic branch management inside the Plan configuration >> Branches page to create new plan branches when new branches are detected in the primary source repository.
        • Create a plan branch using the create plan branch button inside Plan configuration >> Branches.
      4. Wait till next time the expiry process is triggered.

      Expected Results

      The branch should be deleted based on the period of inactivity set in the Automatic branch management.

      Actual Results

      The branch is not deleted and the following messages can be seen in the <bamboo-installation-directory>/logs/catalina.out file when DEBUG for the com.atlassian.bamboo.plan.branch class is enabled:

      2016-03-07 03:03:44,809 INFO [scheduler_Worker-1] [BranchExpiryJob] 0 - Branches - Continuous Branches - pds-trytry branch has been removed from the VCS repo. Expiration will be based on stored data about latest commit (inactivity cleanup).
      2016-03-07 03:03:44,809 DEBUG [scheduler_Worker-1] [BranchExpiryJob] No existing commit information: using last build date
      2016-03-07 03:03:44,809 DEBUG [scheduler_Worker-1] [BranchExpiryJob] No build results: using plan creation date
      2016-03-07 03:03:44,809 WARN [scheduler_Worker-1] [BranchExpiryJob] Plan Branch BRANCH-CB1315 does not provide any meaningful date to base expiration on
      

      Workaround

      1. Manually delete the unused branch.
      2. Ensure that at least one build is executed when a new plan branch is created. Read more about Triggering builds at our official documentation.

      Attachments

        Issue Links

          Activity

            People

              mgardias Marcin Gardias
              dsantos Daniel Santos
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: