Details
-
Bug
-
Resolution: Fixed
-
High
-
6.10.4, 7.0.4
-
8
-
Severity 2 - Major
-
1
-
Description
Issue Summary
Bamboo Specs, both executing from the IDE and using RSS will fail if the linked repository used by the plan is deleted from Bamboo and created back with the same name.
Steps to Reproduce
- Create a plan via specs using a linked repository
- Delete the linked repository
- Recreate the liked repository with the same name
- Run the specs again or commit a change to the specs-enabled repository
Expected Results
The plan will be updated with the new repository ID
Actual Results
The plan will not be published and the below exception is thrown in the atlassian-bamboo.log file:
2019-12-27 15:14:49,841 INFO [http-nio-8085-exec-20] [AccessLogFilter] root GET http://bamboo:8085/rest/api/latest/repository/22937601/scan/status?_=1577459087618 1565798kb 2019-12-27 15:14:54,739 INFO [http-nio-8085-exec-25] [AccessLogFilter] root GET http://bamboo:8085/rest/api/latest/repository/80838661/scan/status?_=1577459087619 1546183kb 2019-12-27 15:14:56,284 INFO [14-repository-stored-specs:pool-21-thread-1] [RepositoryStoredSpecsServiceImpl] Bamboo Specs execution took 4.977 s 2019-12-27 15:14:56,580 INFO [15-BAM::SpecsDetection:pool-22-thread-1] [HungBuildPlanConfigurationPlugin] setting default values for edit page. custom.com.atlassian.bamboo.plugin.hungbuildkiller.hung.enabled 2019-12-27 15:14:56,621 INFO [15-BAM::SpecsDetection:pool-22-thread-1] [HungBuildPlanConfigurationPlugin] setting default values for edit page. custom.com.atlassian.bamboo.plugin.hungbuildkiller.hung.enabled 2019-12-27 15:14:56,654 WARN [15-BAM::SpecsDetection:pool-22-thread-1] [RepositoryStoredSpecsServiceImpl] java.lang.IllegalArgumentException: com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException: planRepository / branchtest: Repository parent can not be changed. at com.atlassian.bamboo.configuration.external.PlanConfigImportServiceImpl.lambda$validateAndCreateRepositoryObjects$8(PlanConfigImportServiceImpl.java:809) at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:196) at com.atlassian.bamboo.configuration.external.PlanConfigImportServiceImpl.validateAndCreateRepositoryObjects(PlanConfigImportServiceImpl.java:786) at com.atlassian.bamboo.configuration.external.PlanConfigImportServiceImpl.lambda$modifyTopLevelPlanFunction$2(PlanConfigImportServiceImpl.java:513) at com.atlassian.bamboo.core.ScopedExclusionServiceImpl.tryWithLock(ScopedExclusionServiceImpl.java:74) at com.atlassian.bamboo.configuration.external.PlanConfigImportServiceImpl.modifyExistingTopLevelPlan(PlanConfigImportServiceImpl.java:405) at com.atlassian.bamboo.configuration.external.PlanConfigImportServiceImpl.lambda$importPlan$0(PlanConfigImportServiceImpl.java:370) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) at com.atlassian.bamboo.persistence.BambooTransactionHibernateTemplate.execute(BambooTransactionHibernateTemplate.java:28) at com.atlassian.bamboo.configuration.external.PlanConfigImportServiceImpl.importPlan(PlanConfigImportServiceImpl.java:351) at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.importPlanProperties(RepositoryStoredSpecsServiceImpl.java:1052) at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.importBambooYamlForPlan(RepositoryStoredSpecsServiceImpl.java:1023) at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.lambda$importBambooYamlsOfAllTypes$6(RepositoryStoredSpecsServiceImpl.java:797) at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.importBambooYamlsWithImporter(RepositoryStoredSpecsServiceImpl.java:835) at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.importBambooYamlsOfAllTypes(RepositoryStoredSpecsServiceImpl.java:804) at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.processSpecs(RepositoryStoredSpecsServiceImpl.java:567) at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.runBambooSpecs(RepositoryStoredSpecsServiceImpl.java:308) at com.atlassian.bamboo.configuration.external.RssDetectionServiceImpl.runRssDetection(RssDetectionServiceImpl.java:284) at com.atlassian.bamboo.configuration.external.detection.RssDetectionRunnable.run(RssDetectionRunnable.java:42) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 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.lang.Thread.run(Thread.java:748) Caused by: com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException: planRepository / branchtest: Repository parent can not be changed. at com.atlassian.bamboo.vcs.configuration.service.VcsRepositoryConfigurationServiceImpl.validatePlanRepository(VcsRepositoryConfigurationServiceImpl.java:1255) at com.atlassian.bamboo.configuration.external.PlanConfigImportServiceImpl.lambda$validateAndCreateRepositoryObjects$8(PlanConfigImportServiceImpl.java:798) ... 27 more
Workaround
1. If using repository-stored Specs (RSS)
- Delete the plan from Bamboo UI before committing the new changes to the repository
2. If running specs from the IDE/Maven.
- Delete the repository at plan's repository settings before executing the specs code again.
Attachments
Issue Links
- is related to
-
BAM-20061 All plan branches are set to master (default branch) if the repository configuration is re-added
- Closed
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...