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

Rerun build fails due to duplicate key error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 5.11.0, 5.10.3
    • 5.7.2, 5.9.7
    • Builds
    • None

    Description

      Issue 1

      Problem:

      Rerun build results in the following error in the UI:

      An unexpected error has occurred
      duplicate key: foo.bar (it is a global variable)
      

      In the atlassian-bamboo.log:

      2015-02-05 10:55:28,433 ERROR [http-apr-8085-exec-11] [ChainExecutionManagerImpl] duplicate key: foo.bar
      

      Issue 2

      Summary

      Rerun falied/imcomplete jobs only result on Multiple entries with same key error

      Environment

      • Bamboo v5.10.0

      Steps to Reproduce

      1. Create a Project (e.g..: Project), Plan (e.g.: Duplicate Variable)
      2. Create 3 JOBs configured under the Default Stage
        • Default Job
        • Second Job
        • Testing Job
      3. Configure each JOB as follows:
        Default Job
        Task Configuration
        Inject Bamboo Variables Path to properties file*:
          duplicate.variables.txt
        Namespace*:
          inject
        Scope of the variables:
          [x] Result
        Script
        echo "${bamboo.buildResultKey}"
        echo "${bamboo.inject.INJECTED}"
        
        Second Job
        Task Configuration
        Inject Bamboo Variables Path to properties file*:
          duplicate.variables.txt
        Namespace*:
          inject
        Scope of the variables:
          [x] Result
        Script
        echo "${bamboo.buildResultKey}"
        echo "${bamboo.inject.INJECTED}"
        
        Testing Job
        Task Configuration
        Script
        exit 1
        

        exit 1 forces the job to fail which results in the Rerun failed/incomplete jobs only option to be revealed.

      4. Run the build (and expect it to fail).
      5. Rerun the build by hitting the option Rerun falied/incomplete jobs only

        The following must be located in the Build Working Directory so it can be accessed by Inject Bamboo Variables task

      duplicate.variables.txt
      INJECTED=foo
      

      Expected Results

      The job runs and terminates, as expected c/o exit 1, without error.

      Actual Results

      The following message is displayed in the UI:
      An unexpected error has occurred

      Multiple entries with same key: inject.INJECTED=VariableDefinitionContextImpl {variableType=RESULT, key=inject.INJECTED, value=foo} and inject.INJECTED=VariableDefinitionContextImpl{variableType=RESULT, key=inject.INJECTED, value=foo}

      Plan 'PROJ-DV' did not start

      The exception below is thrown and logged in the <bamboo-install>/logs/catalina.log file:

      <bamboo-home>/logs/atlassian-bamboo.log
      2016-07-12 12:05:28,720 ERROR [http-nio-8085-exec-5] [ChainExecutionManagerImpl] Multiple entries with same key: inject.INJECTED=VariableDefinitionContextImpl{variableType=RESULT, key=inject.INJECTED, value=foo} and inject.INJECTED=VariableDefinitionContextImpl{variableType=RESULT, key=inject.INJECTED, value=foo}
      

      Workaround

      No workaroud available

      Attachments

        Issue Links

          Activity

            People

              mgardias Marcin Gardias
              jgiles@atlassian.com James Giles IV (Inactive)
              Votes:
              10 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: