• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • 5.12.0.2
    • 5.8, 5.7.2, 5.9, 5.8.1, 5.8.2, 5.9.1, 5.9.3, 5.9.7, 5.10.3
    • Plan Branches
    • None

      Moving plans may potentially cause inconsistencies in the build table where incorrect branch keys are inserted into the build table.

      If you moved plans and restarted Bamboo, that could cause the same issue. Meaning, contrary to the first impression you might have after reading the logs, this won't happen necessarily during an upgrade task. The following can be seen in the logs:

      atlassian-bamboo.log
      2015-06-04 10:05:23,636 INFO [localhost-startStop-1] [AbstractUpgradeManager] Completed task 4410 with errors.
      2015-06-04 10:05:23,636 FATAL [localhost-startStop-1] [DefaultBootstrapManager] Pre-bootstrap validation tests failed: [Task for build 4410 failed:, com.atlassian.bamboo.upgrade.tasks.validation.BranchKeyStartsWithMastersChainKey: There 
      are invalid branch keys in the BUILD table: [BIS-SNATRUNK3]]
      

      Workaround:
      If you're hitting this and your instance is down, the following procedure should be applied so you can get your instance up and running:

      1. Stop your Bamboo instance.

      2. With Bamboo stopped navigate to

      <Bamboo Install Directory>/atlassian-bamboo/WEB-INF/classes
      

      and open the upgrades.xml file.

      3. Find the following line:

      <upgrade build="4410" build-min="4410" build-max="9999"             class="com.atlassian.bamboo.upgrade.tasks.validation.BranchKeyStartsWithMastersChainKey"/>
      

      and update it by commenting out the entry to:

      <!-- <upgrade build="4410" build-min="4410" build-max="9999" class="com.atlassian.bamboo.upgrade.tasks.validation.BranchKeyStartsWithMastersChainKey"/> -->
      

      4. Save the file Restart Bamboo.

      5. Get an export of your instance.

      6. Raise an issue with https://support.atlassian.com and attach your export so we can double check the database consistency.

      7. Once that's done, you should set your upgrades.xml back to uncomment the tag you commented out on the step #4 of this procedure.

            [BAM-15524] Invalid branch keys in the build table

            I can confirm this has been in 5.12.x

            Mark de Bont added a comment - I can confirm this has been in 5.12.x

            Move plan operation was fixed in 5.12. We do not recommend moving large plans using versions older than 5.12.

            Przemek Bruski added a comment - Move plan operation was fixed in 5.12. We do not recommend moving large plans using versions older than 5.12.

            We are on version 5.10. We tried to move several build plans, some of them have up to 50 - 100 branches. I repeatedly got errors when moving the plans and had to start over again. Eventually, it seemed to be moved fine from within the UI. Upoin restart, Bamboo wouldnt start with the mentioned error "Task for build 4410 failed:", naming multiple branch keys. We disabled the upgrade task as suggested, and when the intsance came back online, investigating the branches of the moved build plan revealed that non of the branch keys seem to be updated. We deleted all branches of the plans (if you google you will find a Python script to do this). Then at least the Bamboo instance would start up with Task 4410 enabled. But still, there were errors when creating branches for one of the plans. Eventually, we ended up cloning the build plan and continue working with the clone.

            After this experience, it seems the move plan functionality is really seriously buggy. It does not seem to work with plans that have branches. You probably better save yourself some time (We lost a whole workday) and just start out with a new clone in the correct project.

            Enrico Welder added a comment - We are on version 5.10. We tried to move several build plans, some of them have up to 50 - 100 branches. I repeatedly got errors when moving the plans and had to start over again. Eventually, it seemed to be moved fine from within the UI. Upoin restart, Bamboo wouldnt start with the mentioned error "Task for build 4410 failed:", naming multiple branch keys. We disabled the upgrade task as suggested, and when the intsance came back online, investigating the branches of the moved build plan revealed that non of the branch keys seem to be updated. We deleted all branches of the plans (if you google you will find a Python script to do this). Then at least the Bamboo instance would start up with Task 4410 enabled. But still, there were errors when creating branches for one of the plans. Eventually, we ended up cloning the build plan and continue working with the clone. After this experience, it seems the move plan functionality is really seriously buggy. It does not seem to work with plans that have branches. You probably better save yourself some time (We lost a whole workday) and just start out with a new clone in the correct project.

            This is crazy. If the move feature causes issues like this then disable that feature and make sure it's listed as an issue on upgrade. Also why hasn't this been fixed yet. I really don't care about new cloud features!!! I want Bamboo to work and have the features I need.

            Oliver Eikenberry added a comment - This is crazy. If the move feature causes issues like this then disable that feature and make sure it's listed as an issue on upgrade. Also why hasn't this been fixed yet. I really don't care about new cloud features!!! I want Bamboo to work and have the features I need.

            Problem also occurs in 5.9.10

            Mark de Bont added a comment - Problem also occurs in 5.9.10

            Problem also occurs in 5.9.7

            Mark de Bont added a comment - Problem also occurs in 5.9.7

            Hey spittet,
            you worked on this issue for more than 7 months. Did you fix it?

            Paul Pasler added a comment - Hey spittet , you worked on this issue for more than 7 months. Did you fix it?

            This issue should be on the upgrade notes for all releases. Things to check on your system before doing an upgrade.

            Deleted Account (Inactive) added a comment - This issue should be on the upgrade notes for all releases. Things to check on your system before doing an upgrade.

            Voting, this issue hosed my company's production bamboo instance.

            Travis Dimmig added a comment - Voting, this issue hosed my company's production bamboo instance.

            Any update on this? We moved a bunch of plans last week and have just rebooted our production bamboo and it no longer boots, bootstrap failing.

            Thomas Shaw added a comment - Any update on this? We moved a bunch of plans last week and have just rebooted our production bamboo and it no longer boots, bootstrap failing.

              Unassigned Unassigned
              cbenard Carlen Benard (Inactive)
              Affected customers:
              33 This affects my team
              Watchers:
              39 Start watching this issue

                Created:
                Updated:
                Resolved: