-
Bug
-
Resolution: Fixed
-
Low
-
8.0.0
-
None
-
1
-
Severity 2 - Major
-
Issue Summary
RSS import breaks if a property is defined to the Source code checkout task at the specs file and no repository is defined for the plan
Steps to Reproduce
- Link a new repository to Bamboo with the following content for the /bamboo-specs/bamboo.yaml file
version: 2 plan: project-key: SMT key: TST name: First Plan aka. Plan A stages: - Default Stage: manual: false final: false jobs: - Default Job Default Job: key: JOB1 tasks: - checkout: force-clean-build: 'true' - script: interpreter: SHELL scripts: - echo test > text.txt artifacts: - name: Text pattern: '**/*.txt' shared: true required: true branches: create: manually delete: never link-to-jira: true notifications: [] labels: [] other: concurrent-build-plugin: system-default
- Make sure you have a project with the key SMT
- Enable specs for the repository
- Run a manual scan for specs
Expected Results
- The plan will be created with one stage and one job with two tasks, Source code checkout and a script task.
- The source code checkout task will use the repository containing the specs code as the default.
Actual Results
The specs scan fails with the following error at the UI:
30-Aug-2021 22:39:30 Bamboo YAML import failed: com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException: Duplicated repository name within a plan: yamlrss 30-Aug-2021 22:39:30 30-Aug-2021 22:39:30 30-Aug-2021 22:39:30 Do you need help? Please visit http://docs.atlassian.com/bamboo/docs-0800/Bamboo+Specs+troubleshooting 30-Aug-2021 22:39:30
And the below exception is thrown in the atlassian-bamboo.log file:
2021-08-30 22:39:30,725 INFO [17-BAM::SpecsDetection:pool-25-thread-3] [YamlSpecsImportServiceImpl] Bamboo YAML import failed on incorrect YAML com.atlassian.bamboo.specs.yaml.YamlSpecsValidationException: com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException: Duplicated repository name within a plan: yamlrss at com.atlassian.bamboo.configuration.external.yaml.BambooYamlToSpecsConverterImpl.validateEntity(BambooYamlToSpecsConverterImpl.java:929) at com.atlassian.bamboo.configuration.external.yaml.BambooYamlToSpecsConverterImpl.createPlan(BambooYamlToSpecsConverterImpl.java:163) at com.atlassian.bamboo.configuration.external.rss.YamlSpecsImportServiceImpl.parseYaml(YamlSpecsImportServiceImpl.java:163) at com.atlassian.bamboo.configuration.external.rss.YamlSpecsImportServiceImpl.processSimplifiedYaml(YamlSpecsImportServiceImpl.java:107) at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.tryProcessYaml(RepositoryStoredSpecsServiceImpl.java:338) at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.runBambooSpecs(RepositoryStoredSpecsServiceImpl.java:184) at com.atlassian.bamboo.configuration.external.RssDetectionServiceImpl.runRssDetection(RssDetectionServiceImpl.java:374) at com.atlassian.bamboo.configuration.external.detection.RssDetectionRunnable.run(RssDetectionRunnable.java:42) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException: Duplicated repository name within a plan: yamlrss at com.atlassian.bamboo.specs.api.validators.common.ImporterUtils.checkNoErrors(ImporterUtils.java:55) at com.atlassian.bamboo.specs.api.model.plan.PlanProperties.validate(PlanProperties.java:235) at com.atlassian.bamboo.specs.api.model.plan.PlanProperties.<init>(PlanProperties.java:123) at com.atlassian.bamboo.specs.api.builders.plan.Plan.build(Plan.java:657) at com.atlassian.bamboo.specs.api.builders.plan.Plan.build(Plan.java:65) at com.atlassian.bamboo.specs.api.builders.CallEntityPropertiesBuilder.build(CallEntityPropertiesBuilder.java:10) at com.atlassian.bamboo.specs.api.util.EntityPropertiesBuilders.build(EntityPropertiesBuilders.java:14) at com.atlassian.bamboo.configuration.external.yaml.BambooYamlToSpecsConverterImpl.validateEntity(BambooYamlToSpecsConverterImpl.java:927) ... 16 more 2021-08-30 22:39:30,787 INFO [17-BAM::SpecsDetection:pool-25-thread-3] [ImmutablePlanCacheServiceImpl] Invalidating SMT-TST 2021-08-30 22:39:30,789 INFO [AtlassianEvent::0-BAM::EVENTS:pool-2-thread-33] [BitbucketServerRssStatusUpdater] Sending RSS notification to Stash (repository: yamlrss) 2021-08-30 22:39:30,859 INFO [17-BAM::SpecsDetection:pool-25-thread-3] [RssDetectionRunnable] Exception while executing RSS detection for RssDetectionWork[repository=786435,branch=master] com.atlassian.bamboo.specs.yaml.YamlSpecsValidationException: com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException: Duplicated repository name within a plan: yamlrss at com.atlassian.bamboo.configuration.external.yaml.BambooYamlToSpecsConverterImpl.validateEntity(BambooYamlToSpecsConverterImpl.java:929) at com.atlassian.bamboo.configuration.external.yaml.BambooYamlToSpecsConverterImpl.createPlan(BambooYamlToSpecsConverterImpl.java:163) at com.atlassian.bamboo.configuration.external.rss.YamlSpecsImportServiceImpl.parseYaml(YamlSpecsImportServiceImpl.java:163) at com.atlassian.bamboo.configuration.external.rss.YamlSpecsImportServiceImpl.processSimplifiedYaml(YamlSpecsImportServiceImpl.java:107) at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.tryProcessYaml(RepositoryStoredSpecsServiceImpl.java:338) at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.runBambooSpecs(RepositoryStoredSpecsServiceImpl.java:184) at com.atlassian.bamboo.configuration.external.RssDetectionServiceImpl.runRssDetection(RssDetectionServiceImpl.java:374) at com.atlassian.bamboo.configuration.external.detection.RssDetectionRunnable.run(RssDetectionRunnable.java:42) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException: Duplicated repository name within a plan: yamlrss at com.atlassian.bamboo.specs.api.validators.common.ImporterUtils.checkNoErrors(ImporterUtils.java:55) at com.atlassian.bamboo.specs.api.model.plan.PlanProperties.validate(PlanProperties.java:235) at com.atlassian.bamboo.specs.api.model.plan.PlanProperties.<init>(PlanProperties.java:123) at com.atlassian.bamboo.specs.api.builders.plan.Plan.build(Plan.java:657) at com.atlassian.bamboo.specs.api.builders.plan.Plan.build(Plan.java:65) at com.atlassian.bamboo.specs.api.builders.CallEntityPropertiesBuilder.build(CallEntityPropertiesBuilder.java:10) at com.atlassian.bamboo.specs.api.util.EntityPropertiesBuilders.build(EntityPropertiesBuilders.java:14) at com.atlassian.bamboo.configuration.external.yaml.BambooYamlToSpecsConverterImpl.validateEntity(BambooYamlToSpecsConverterImpl.java:927) ... 16 more
Workaround
There are two options identifies so far:
1. Remove the definitions for the checkout task, i.e:
- checkout: force-clean-build: 'true'
2. Add the definition for the default repository as per Referring linked repositories documentation, i.e:
repositories: - yamlrss: scope: global
Where "yamlrss" is the name of the linked repository
[BAM-21403] RSS import breaks if a property is defined to the Source code checkout task at the specs file
Remote Link | Original: This issue links to "Page (Confluence)" [ 599185 ] |
Remote Link | New: This issue links to "Page (Confluence)" [ 600076 ] |
Remote Link | New: This issue links to "Page (Confluence)" [ 599185 ] |
Symptom Severity | Original: Severity 1 - Critical [ 15830 ] | New: Severity 2 - Major [ 15831 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Waiting for Release [ 12075 ] | New: Closed [ 6 ] |
Status | Original: In Review [ 10051 ] | New: Waiting for Release [ 12075 ] |
Remote Link |
New:
This issue links to "+core+ Dogfooding › Test Git Branch Detection › bugfix- |
Status | Original: In Progress [ 3 ] | New: In Review [ 10051 ] |
Status | Original: Waiting for Release [ 12075 ] | New: In Progress [ 3 ] |
Status | Original: In Progress [ 3 ] | New: Waiting for Release [ 12075 ] |