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

New plan branch is automatically deleted due to last commit date from the newly created branch

    XMLWordPrintable

Details

    Description

      Problem

      New plan branch is automatically deleted due to last commit date from the newly created branch. UI is not clear about the strategy Bamboo will use to expire the plan branch. The branch is new but its last commit is old.

      Steps to reproduce:

      1. Make sure Bamboo is configured with application links to Bitbucket server
      2. Make sure Admin REST API is enabled with system property -Datlassian.darkfeature.bamboo.experimental.rest.admin.enabled=true
      3. Create a plan with a repository that has old commits
      4. Configure the branch management to create the plan branch automatically. Make sure the "Delete plan branches after a period of inactivity" is set for 7 days
      5. Navigate to your repository and create a checkout an old revision (let's say 2 weeks old - need to be older than a 7 days)
        git checkout eeb81d64e94f44f399212d5d4fc2eb5f0622208f
        
      1. Create a new branch from it
        git checkout -b newbranch
        git push origin newbranch
        
      1. Wait until the plan branch is created in Bamboo (usually 5min with application links configured)
      2. Run the branch expiry job
        curl -u <admin_user> -p -H "Content-Type: application/json" -X POST -d '{"name":"branchExpiryJob", "groupName":"branchExpiryGroup"}' 'http://localhost:8085/rest/admin/latest/scheduler/jobs/trigger'
        

      Expected results:

      The branch was just created and from the UI perspective it is fairly new and should not be expired before the 7 days of inactivity

      Actual results:

      The plan branch newbranch is expired

      Suggestions for resolution:

      1. Store the branch creation date (instead of last commit date) if this information is available and use this new date until a commit newer than this date is added to the branch OR
      2. Update the UI in such a way that the expiry strategy (considering commit date) is more clear to end users

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: