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

Pull requests duplicate and are hard to expire on long lived/active branches

XMLWordPrintable

    • 5
    • 11
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Problem Definition

      Plan Branch creation via Pull Request can result in Plan Branches with duplicate names which can create confusion.

      The problem can be reproduced as such: Navigate to the Plan Configuration page >> Create Plan Branch strategy set to Pull Request (PR) by checking feature "When pull request is created". This creates a new Plan Branch each time a new PR is issued by an autorized Bamboo user.

      For example (gitflow): A first PR creates Plan Branch "develop" in a Git repository. If this PR is not yet closed and another Bamboo user issues a new PR, a new Plan Branch is created, now with name "develop1". If none of the previous PRs gets closed and a new PR is issue, a third Plan Branch gets created with name "develop2". And so on. All of these refere to the same Git repos branch "develop".

      None of these PRs will ever be cleaned / expired, as develop is a long lived branch with frequent activity and is never closed once the PR is merged. Gradually they build up and use disk space on an agent too.

      Suggested Solution

      1. PR creates a new Plan Branch if none with that name is existing in the repository (so it's first on this branch). Thefrefore checking for an existing Plan Branch name is basic.
      2. If a PR on a repository branch is issued and a Plan Branch with the same name already exists, Bamboo should not create a new Plan Branch, but queue the new PR, wait till the original PR is closed and once closed, proceed by re-use of the existing Plan Branch (name)
      3. For the expiry/cleanup aspect, it might be helpful to have a separate criteria for PR removal (e.g. if the PR itself was merged/closed 5 days ago).

      Workaround

      None.

              Unassigned Unassigned
              gforster@atlassian.com Gerhard Forster (Inactive)
              Votes:
              37 Vote for this issue
              Watchers:
              26 Start watching this issue

                Created:
                Updated: