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

Branch Expiry fails midway when a plan references a deleted repository

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 5.1
    • 5.0, 5.0.1
    • None
    • None

    Description

      The BranchExpiryJob will throw an unhandled exception when trying to search for branches to expire when it comes to a plan with an invalid repository.

      For example, if a plan references a remote repository that has since been deleted or moved, the BranchExpiryJob will error out with:

      2013-08-14 03:00:48,763 ERROR [QuartzScheduler_Worker-9] [JobRunShell] Job branchExpiryGroup.branchExpiryJob threw an unhandled Exception: 
      com.google.common.util.concurrent.UncheckedExecutionException: com.atlassian.bamboo.plugins.git.GitCommandException: command /usr/bin/git ls-remote https://mrdon:********@bitbucket.org/atlassian/remotable-plugins.git failed with code 128. Working directory was [.]., stderr:
      [fatal: https://mrdon:********@bitbucket.org/atlassian/remotable-plugins.git/info/refs not found: did you run git update-server-info on the server?]
              at com.google.common.cache.AbstractCache.getUnchecked(AbstractCache.java:51)
              at com.atlassian.bamboo.plugins.git.CallableResultCache.call(CallableResultCache.java:82)
              at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.getRemoteRefs(NativeGitOperationHelper.java:485)
              at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.resolveBranch(NativeGitOperationHelper.java:420)
              at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.obtainLatestRevision(NativeGitOperationHelper.java:518)
              at com.atlassian.bamboo.plugins.git.GitRepository.getLastCommit(GitRepository.java:522)
              at com.atlassian.bamboo.plan.branch.BranchExpiryJob.execute(BranchExpiryJob.java:88)
              at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
              at com.atlassian.bamboo.quartz.SystemAuthorizedThreadPool$1.run(SystemAuthorizedThreadPool.java:38)
              at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
      Caused by: com.atlassian.bamboo.plugins.git.GitCommandException: command /usr/bin/git ls-remote https://mrdon:********@bitbucket.org/atlassian/remotable-plugins.git failed with code 128. Working directory was [.]., stderr:
      [fatal: https://mrdon:********@bitbucket.org/atlassian/remotable-plugins.git/info/refs not found: did you run git update-server-info on the server?]
              at com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCommand(GitCommandProcessor.java:431)
              at com.atlassian.bamboo.plugins.git.GitCommandProcessor.getRemoteRefs(GitCommandProcessor.java:351)
              at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper$1.call(NativeGitOperationHelper.java:473)
              at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper$1.call(NativeGitOperationHelper.java:464)
              at com.atlassian.bamboo.plugins.git.CallableResultCache$1.load(CallableResultCache.java:29)
              at com.atlassian.bamboo.plugins.git.CallableResultCache$1.load(CallableResultCache.java:25)
              at com.google.common.cache.CustomConcurrentHashMap$ComputingValueReference.compute(CustomConcurrentHashMap.java:3426)
              at com.google.common.cache.CustomConcurrentHashMap$Segment.compute(CustomConcurrentHashMap.java:2322)
              at com.google.common.cache.CustomConcurrentHashMap$Segment.getOrCompute(CustomConcurrentHashMap.java:2291)
              at com.google.common.cache.CustomConcurrentHashMap.getOrCompute(CustomConcurrentHashMap.java:3802)
              at com.google.common.cache.ComputingCache.get(ComputingCache.java:46)
              at com.google.common.cache.AbstractCache.getUnchecked(AbstractCache.java:49)
              ... 9 more
      Caused by: com.atlassian.utils.process.ProcessException: Non-zero exit code: 128
              at com.atlassian.utils.process.PluggableProcessHandler.complete(PluggableProcessHandler.java:69)
              at com.atlassian.utils.process.ExternalProcessImpl.wrapUpProcess(ExternalProcessImpl.java:556)
              at com.atlassian.utils.process.ExternalProcessImpl.finish(ExternalProcessImpl.java:472)
              at com.atlassian.utils.process.ExternalProcessImpl.execute(ExternalProcessImpl.java:426)
              at com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCommand(GitCommandProcessor.java:423)
              ... 20 more
      

      More importantly, this will stop the job continuing on to other plans

      The job should gracefully handle such situations, and proceed to check the rest of the plans for expired branches.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              drizzuto David Rizzuto
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: