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
- Go to a Plan inside Bamboo whose source repository has branches.
- Configure the Automatic branch management to delete plan branches after a period of inactivity.
- 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.
- 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
- Manually delete the unused branch.
- 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
- is related to
-
BAM-18460 New plan branch is automatically deleted due to last commit date from the newly created branch
- Closed