-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
7.2.0, 7.2.1, 7.2.2, 7.2.6, 7.2.3, 7.2.4, 7.2.5, 7.2.7
-
None
-
1
-
Severity 3 - Minor
-
Exporting plan that has run a Docker container with multiple volumes mapping to the same folder returns Multiple entries with same key error
Issue Summary
Exporting plan that has run a Docker container with multiple volumes mapping to the same folder returns Multiple entries with same key error.
Steps to Reproduce
- Create a job
- Add a Docker task and select Run a Docker container in the Command drowpdown
- In the Volumes section of the task, add multiple entries with the same key, such as:
- Click on the plan >> Actions >> Configure plan >> Actions >> View plan as Java Specs / YAML
Expected Results
Bamboo should not thrown any error by exporting a plan as Specs.
Actual Results
The below exception is thrown in the atlassian-bamboo.log file and in the user interface:
2022-03-29 15:03:45,899 ERROR [http-nio-8085-exec-24] [ExceptionMappingInterceptor] Multiple entries with same key: ${bamboo.working.directory}=/opt/data and ${bamboo.working.directory}=/data java.lang.IllegalArgumentException: Multiple entries with same key: ${bamboo.working.directory}=/opt/data and ${bamboo.working.directory}=/data at com.google.common.collect.ImmutableMap.conflictException(ImmutableMap.java:215) at com.google.common.collect.ImmutableMap.checkNoConflict(ImmutableMap.java:209) at com.google.common.collect.RegularImmutableMap.checkNoConflictInKeyBucket(RegularImmutableMap.java:147) at com.google.common.collect.RegularImmutableMap.fromEntryArray(RegularImmutableMap.java:110) at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:393) at com.atlassian.bamboo.plugins.docker.export.RunContainerTaskExporter.configMapToVolumeMappings(RunContainerTaskExporter.java:202) at com.atlassian.bamboo.plugins.docker.export.RunContainerTaskExporter.toSpecsEntity(RunContainerTaskExporter.java:160) at com.atlassian.bamboo.plugins.docker.export.DockerTaskExporter.toSpecsEntity(DockerTaskExporter.java:46) at com.atlassian.bamboo.task.export.TaskDefinitionExporter.toSpecsEntity(TaskDefinitionExporter.java:116) at com.atlassian.bamboo.configuration.external.helpers.TaskDefinitionExportHelper.toSpecsEntity(TaskDefinitionExportHelper.java:65) at com.atlassian.bamboo.configuration.external.PlanConfigExportServiceImpl.lambda$null$15(PlanConfigExportServiceImpl.java:307)
Workaround
Remove one of the volume mapping in the Volumes section of the Docker task.
- mentioned in
-
Page Loading...