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
- Create a Project (e.g..: Project), Plan (e.g.: Duplicate Variable)
- Create 3 JOBs configured under the Default Stage
- Default Job
- Second Job
- Testing Job
- 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] ResultScript 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] ResultScript 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.
- Run the build (and expect it to fail).
- 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