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

PR Branch plan fail to run if merge strategy enabled and auto create PR branch plan isn't used

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 6.7.2
    • None

      Issue Summary

      After PR branch plan is created with merge strategy, setting auto create branch plan to other options (apart from PR) will cause existing branch plan fail to start

      Steps to Reproduce

      1. Set "Create plan branch" to "When pull request is created" at Plan Configuration >> Branches
      2. Configure Merge strategy Branch Updater
      3. Create a PR in Bitbucket Server - A PR branch plan is automatically created in Bamboo
      4. Run the PR branch plan to confirm that it is working
      5. Set the "Create plan branch" to "Manually"
      6. Run the PR branch plan again

      Expected Results

      It is able to run

      Actual Results

      The below exception is thrown in the atlassian-bamboo.log file:

      2019-01-07 16:54:49,667 INFO [http-nio-8085-exec-25] [AccessLogFilter] kahloun.foong POST http://localhost:8085/build/admin/triggerManualBuild.action?buildKey=BAM-STAS1 325529kb
      2019-01-07 16:54:49,687 ERROR [http-nio-8085-exec-25] [ManualBuildDetectionAction] : Error encountered while triggering manual build: integration plan branch key is null but shouldn't. Check your integration strategy configuration
      java.lang.IllegalStateException: integration plan branch key is null but shouldn't. Check your integration strategy configuration
      	at com.google.common.base.Preconditions.checkState(Preconditions.java:173)
      	at com.atlassian.bamboo.plan.branch.BranchIntegrationServiceImpl.getIntegrationRepository(BranchIntegrationServiceImpl.java:68)
      	at com.atlassian.bamboo.plan.branch.BranchIntegrationServiceImpl.getPlanRepositoryDefinitionMap(BranchIntegrationServiceImpl.java:141)
      	at com.atlassian.bamboo.build.context.BuildContextBuilderImpl.build(BuildContextBuilderImpl.java:118)
      	at com.atlassian.bamboo.v2.trigger.ManualBuildDetectionAction.generateResultWithoutChanges(ManualBuildDetectionAction.java:129)
      	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl$3.createBuildDetectionResult(ChainExecutionManagerImpl.java:462)
      	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.createNewChainState(ChainExecutionManagerImpl.java:502)
      	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.createChainStateNoDetection(ChainExecutionManagerImpl.java:459)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      

      Workaround

      Set "Create plan branch" to "When pull request is created"

              Unassigned Unassigned
              klfoong Foong (Inactive)
              Votes:
              4 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: