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

Changing or adjusting the repository details on a Bamboo Spec or via UI for a plan, it creates all the branches from the second repo

    XMLWordPrintable

Details

    Description

      Issue Summary

      Whenever we change repository details (such as repository URL or even the linked repository entity) on a Bamboo Spec or even via UI for a plan, it it starts creating all the new branches detected from the second/new repo.

      Steps to Reproduce

      1. Create two linked Bitbucket repositories
        Repo1: TEST1
        Branches:
        * branch1
        * branch2
        * branch3
        
        Repo2: TEST2
        Branches:
        * testbranch1
        * testbranch2
        * testbranch3
        
      2. Create a plan, link it to Repo1 and enable automatic branching.
      3. Export it to specs.
      4. Publish the plan.
      5. Now, change the spec to point to Repo2 and publish the spec.
      6. Go adjust the automatic branch detection interval at Bamboo Administration >> Server Configuration, this forces a poll.
      7. Repo2 branches all automatically get created at once.

      UI version

      1 - 2. The same steps from above;
      3. Delete repo1 and add repo2, or change linked repo1 to point to repo2;
      4. Reproduce a loss of connection between Bamboo and Bitbucket;
      5. When the connection re-establishes all the branches will be detected and a plan branch will be created for each.

      Expected Results

      No new branches of the changed repository should be detected and created.

      Actual Results

      Bamboo detects the new branches and dispatches to the initial build for all of them. This may overload a number of worker threads that are available in Bamboo to process the status of builds and move things along healthily through the queue to agents.

      Workaround

      For the UI version of the bug

      We can avoid this bug by adding the second repository before deleting the first one. Or disable automatic branch creation before making any modifications in the plan repository configuration.

      Attachments

        Issue Links

          Activity

            People

              851f15845f55 Mateusz Szmal
              skale Sharmila
              Votes:
              5 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated: