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

Deleting a branch in Stash should delete the corresponding plan branch in Bamboo

    • 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.

      We use the git-flow workflow. When a feature branch is created and a commit is made, Bamboo detects it and creates a plan branch for it. That works great. Unfortunately, when the feature branch is merged into its upstream and deleted, the corresponding plan branch stays in Bamboo. When Bamboo tries to check for changes in that branch, an error generated.

      It would be great if Stash notified Bamboo when a branch is deleted so Bamboo can delete the corresponding plan branch.

        1. bamboo560.branches.png
          129 kB
          Rafael Sperafico

            [BAM-14229] Deleting a branch in Stash should delete the corresponding plan branch in Bamboo

            Hi,

            With the release of Bamboo 5.9 we have improved the way branches are cleaned up. You will now have more options to get your branches automatically cleaned up when the branch is removed from the repository.

            I'd like to thank everyone for their patience, we really appreciate the trust that you are putting in us.

            Sten Pittet
            Bamboo Product Manager

            Sten Pittet (Inactive) added a comment - Hi, With the release of Bamboo 5.9 we have improved the way branches are cleaned up. You will now have more options to get your branches automatically cleaned up when the branch is removed from the repository. I'd like to thank everyone for their patience, we really appreciate the trust that you are putting in us. Sten Pittet Bamboo Product Manager

            Is this the same request as this one https://jira.atlassian.com/browse/BAM-13129? Why Atlassian development teams did not run into this problem? Are they not using Bamboo or not doing Agile (Gitflow workflow) themselves?

            Eclipse Trading added a comment - Is this the same request as this one https://jira.atlassian.com/browse/BAM-13129? Why Atlassian development teams did not run into this problem? Are they not using Bamboo or not doing Agile (Gitflow workflow) themselves?

            To clarify my comment,

            I was suggesting two distinct delete alternatives. The user would be able to choose one.

            Alternative A - delete the branch when Stash deletes the branch.
            Alternative B - delete the branch after X days of inactivity (this exists today)

            With possibly an enhancement to alternative A. Where -

            Alternative A++ - delete the branch after X days of Stash branch deletion.
            0 days means delete immediately when Stash deletes the branch.

            john livingston added a comment - To clarify my comment, I was suggesting two distinct delete alternatives. The user would be able to choose one. Alternative A - delete the branch when Stash deletes the branch. Alternative B - delete the branch after X days of inactivity (this exists today) With possibly an enhancement to alternative A. Where - Alternative A++ - delete the branch after X days of Stash branch deletion. 0 days means delete immediately when Stash deletes the branch.

            Main trouble is - if you want to delete branch after X days of deletion in Stash/git you need to remember in Bamboo when it was deleted and periodically search for Bamboo branches eligible to delete - as there will be no more events about it.
            Not a big deal but a little more complicated than just deleting branch.

            Pawel Skierczynski added a comment - Main trouble is - if you want to delete branch after X days of deletion in Stash/git you need to remember in Bamboo when it was deleted and periodically search for Bamboo branches eligible to delete - as there will be no more events about it. Not a big deal but a little more complicated than just deleting branch.

            Configurability for Bamboo branch deletion would seem appropriate here.

            • delete branch synchronized with Stash branch deletion
            • delete branch after X days of inactivity

            john livingston added a comment - Configurability for Bamboo branch deletion would seem appropriate here. delete branch synchronized with Stash branch deletion delete branch after X days of inactivity

            There is a new plug-in Plan Branch Terminator for Stash fom Mibex Software GmbH which addresses this

            Oliver Straesser added a comment - There is a new plug-in Plan Branch Terminator for Stash fom Mibex Software GmbH which addresses this

            It seems the only way to have old feature branches automatically removed is to set an expiry, correct? Unfortunately this then runs into BAM-12161, where a branch which doesn't receive commits for awhile not only has its plan deleted, it will NEVER run again.

            I agree with Pawel that the plan branch shouldn't immediately be deleted, but should instead be cleaned up after some time has passed.

            Daniel Siegmann added a comment - It seems the only way to have old feature branches automatically removed is to set an expiry, correct? Unfortunately this then runs into BAM-12161 , where a branch which doesn't receive commits for awhile not only has its plan deleted, it will NEVER run again. I agree with Pawel that the plan branch shouldn't immediately be deleted, but should instead be cleaned up after some time has passed.

            Immediately deleting plan branch with all results when it's deleted in repository is questionable.
            It may be ok for ones but to soon for the others. I would do it after N days - configurable on plan level.

            Pawel Skierczynski added a comment - Immediately deleting plan branch with all results when it's deleted in repository is questionable. It may be ok for ones but to soon for the others. I would do it after N days - configurable on plan level.

            Still looking for some forward momentum (or a glimmer of hope) on this cleanup feature request. We are in "maintenance Hades" as it stands.

            Matthew Korich added a comment - Still looking for some forward momentum (or a glimmer of hope) on this cleanup feature request. We are in "maintenance Hades" as it stands.

            This is struggeling us too.
            We use the git flow and delete branches after merging via Stash pull requests.
            We have about 10 branches per day.

            The minimum functionality for us would be:

            • No error generated in Bamboo (or configurable), this is not an error scenario but daily valid business
            • Bulk action: "delete branches" with some AND-ed selection criteria (deleted in stash, older than x days, unused for x days, disabled, manually created, matching regexp, notmatching/matching a label) etc.)

            Mike Friedrich added a comment - This is struggeling us too. We use the git flow and delete branches after merging via Stash pull requests. We have about 10 branches per day. The minimum functionality for us would be: No error generated in Bamboo (or configurable), this is not an error scenario but daily valid business Bulk action: "delete branches" with some AND-ed selection criteria (deleted in stash, older than x days, unused for x days, disabled, manually created, matching regexp, notmatching/matching a label) etc.)

              Unassigned Unassigned
              eca435f84aa9 Mojahedul Hasanat
              Votes:
              59 Vote for this issue
              Watchers:
              44 Start watching this issue

                Created:
                Updated:
                Resolved: