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

Plans with Submodules and Branch merging enabled will never run

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Medium
    • None
    • 4.4.6
    • Repository (Git)
    • None

    Description

      When a plan uses a Git Repository that uses Git Submodules and that plan also has branches with Branch Merging enabled, it will never run the branch plan as Bamboo fails to check out the Submodule. It will remain stuck on 'Queued' for about 10 minutes, then fail, never reaching the Elastic Agent.

      Disabling Branch Merging will allow the branch plan to run successfully, this also shows that the elastic agent successfully checks out the Submodule (once an SSH key is present on the agent).

      The Bamboo log itself shows the following error

      2013-06-14 09:35:11,491 WARN [3-DelayedChangeDetectionThread:pool-6-thread-15] [ChainExecutionManagerImpl] Exception during merge: Checkout to revision 7cdf15301b67473812af4af83d44312ddcd34b06 has failed.command /usr/bin/git submodule update --init --recursive failed with code 1. Working directory was [/data/jirastudio/bamboo/home/xml-data/build-dir/serverSide/RHIN-SBM0-1/mergeWorkspace]., stderr:
      Submodule 'submodule' (git@bitbucket.org:user/submodule.git) registered for path 'submodule'
      Cloning into 'submodule'...
      ssh: connect to host bitbucket.org port 22: Connection timed out
      fatal: The remote end hung up unexpectedly
      Clone of 'git@bitbucket.org:user/submodule.git' into submodule path 'submodule' failed
      com.atlassian.bamboo.repository.RepositoryException: Checkout to revision 7cdf15301b67473812af4af83d44312ddcd34b06 has failed.command /usr/bin/git submodule update --init --recursive failed with code 1. Working directory was [/data/jirastudio/bamboo/home/xml-data/build-dir/serverSide/RHIN-SBM0-1/mergeWorkspace]., stderr:
      Submodule 'submodule' (git@bitbucket.org:user/submodule.git) registered for path 'submodule'
      Cloning into 'lock'...
      ssh: connect to host bitbucket.org port 22: Connection timed out
      fatal: The remote end hung up unexpectedly
      Clone of 'git@bitbucket.org:user/submodule.git' into submodule path 'submodule' failed
              at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.checkout(NativeGitOperationHelper.java:390)
              at com.atlassian.bamboo.plugins.git.GitRepository$3.call(GitRepository.java:338)
              at com.atlassian.bamboo.plugins.git.GitRepository$3.call(GitRepository.java:314)
              at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:324)
              at com.atlassian.bamboo.plugins.git.GitRepository.retrieveSourceCode(GitRepository.java:313)
              at com.atlassian.bamboo.plugins.hg.BitbucketRepository.retrieveSourceCode(BitbucketRepository.java:296)
              at com.atlassian.bamboo.plan.branch.BranchIntegrationHelperImpl.merge(BranchIntegrationHelperImpl.java:112)
              at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.doVcsMerge(ChainExecutionManagerImpl.java:911)
              at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.access$700(ChainExecutionManagerImpl.java:93)
              at com.atlassian.bamboo.chains.ChainExecutionManagerImpl$4.run(ChainExecutionManagerImpl.java:538)
              at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:333)
              at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.execute(ChainExecutionManagerImpl.java:522)
              at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.tryStartChainState(ChainExecutionManagerImpl.java:287)
              at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.delayedStart(ChainExecutionManagerImpl.java:189)
      

      The Elastic Agent does not show any activity (because it is never invoked by Bamboo)

      workaround
      Disable 'Use Submodules'
      add a script task to the plan that performs
      git submodule init
      git submodule update

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              imaduro Ivan Maduro (Inactive)
              Votes:
              12 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated: