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

          Form Name

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

            Renata Dornelas made changes -
            Remote Link Original: This issue links to "Page (Atlassian Documentation)" [ 105992 ]
            Monique Khairuliana (Inactive) made changes -
            Workflow Original: Bamboo Workflow 2016 v1 - Restricted [ 1437494 ] New: JAC Bug Workflow v3 [ 3380428 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Dave Chevell made changes -
            Remote Link Original: This issue links to "Page (Atlassian Documentation)" [ 105992 ] New: This issue links to "Page (Atlassian Documentation)" [ 105992 ]
            Augusto Santos (Inactive) made changes -
            Description Original: 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:
            {noformat:title=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]]
            {noformat}

            *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
            {code}
            <Bamboo Install Directory>/atlassian-bamboo/WEB-INF/classes
            {code}
            and open the {{upgrades.xml}} file.

            3. Find the following line:
            {code:xml}
            <upgrade build="4410" build-min="4410" build-max="9999" class="com.atlassian.bamboo.upgrade.tasks.validation.BranchKeyStartsWithMastersChainKey"/>
            {code}

            and update it by commenting out the entry to:
            {code:xml}
            <!-- <upgrade build="4410" build-min="4410" build-max="9999" class="com.atlassian.bamboo.upgrade.tasks.validation.BranchKeyStartsWithMastersChainKey"/> -->
            {code}

            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|https://confluence.atlassian.com/display/BAMBOO/Exporting+data+for+backup] 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.


            New: 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:
            {noformat:title=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]]
            {noformat}
            *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
            {code:java}
            <Bamboo Install Directory>/atlassian-bamboo/WEB-INF/classes
            {code}
            and open the {{upgrades.xml}} file.

            3. Find the following line:
            {code:xml}
            <upgrade build="4410" build-min="4410" build-max="9999" class="com.atlassian.bamboo.upgrade.tasks.validation.BranchKeyStartsWithMastersChainKey"/>
            {code}
            and update it by commenting out the entry to:
            {code:xml}
            <!-- <upgrade build="4410" build-min="4410" build-max="9999" class="com.atlassian.bamboo.upgrade.tasks.validation.BranchKeyStartsWithMastersChainKey"/> -->
            {code}
            4. Save the file Restart Bamboo.

            5. Get an export of your instance.

            6. Raise an issue with [https://support.atlassian.com|https://support.atlassian.com/] and attach your [export|https://confluence.atlassian.com/display/BAMBOO/Exporting+data+for+backup] 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.
            Neil Hickey made changes -
            Affects Version/s New: 5.10.3 [ 61417 ]
            Krystian Brazulewicz made changes -
            Fix Version/s Original: 5.12.0 [ 61527 ]
            Fix Version/s New: 5.12.0.2 [ 62126 ]

            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.
            Daniel R made changes -
            Remote Link New: This issue links to "Page (Extranet)" [ 187772 ]

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

                Created:
                Updated:
                Resolved: