Bamboo never forgets a Bitbucket branch deletion (but it should upon a re-creation of that branch)

Over the past year, people have periodically complained of their branch build plan disappearing willy-nilly; the build plan was building yesterday, and today it's gone, yet their Bitbucket branch still exists.

Although, I felt like it had to do with the user potentially having deleted the branch previously and then re-creating it, I had no real proof, of which product (Bitbucket or Bamboo) that was driving this willy-nilly branch plan deletion process.

Perusing the postgres database, I see that this table, "vcs_branch", holds a record of every single Bitbucket branch that ever existed that Bamboo has been notified about (or personally polled Bitbucket for).

It has a column, "detected_deletion_date", which is either blank (because that Bitbucket branch still exists), or has a timestamp value of when that Bitbucket branch was deleted.

The problem is that when a user re-creates that same branch on Bitbucket, Bamboo does not change the "detected_deletion_date" value to "null". So in, say 14 days, the setting that we have in Bamboo of how many days to delete a build plan after a Bitbucket branch removal, the Bamboo build plan will be removed. If user then re-creates that Bamboo branch build plan after seeing that it is missing, that branch plan will be removed the next day at 2:00 AM, and the next day at 2:00 AM, etc.

Users occasionally remove a Bitbucket branch, cause we like being tidy around here, but then days/weeks/months, the user may recreate that same branch name in Bitbucket (accepting the default name as when generated by JIRA) cause they want to either begin work on that bug, or continue to do more work on that bug or because they like the name of that branch. 

So it's part of our process here, to recreate Bitbucket branches with the same name.

Bamboo needs to accommodate this possibility.

(i'd log this as a bug, but maybe there's a reasonable explanation of why Bamboo wants to never forget.)

1 answer

It is the wrong solution for a problem. I believe Bamboo tries to be too smart here. The motivation probably comes from keeping the storage allocations small for systems where you never delete branches in (Git) repositories.

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,068 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot