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

RSS import breaks if a property is defined to the Source code checkout task at the specs file

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 8.0.1
    • 8.0.0
    • Publishing / RSS
    • None

      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

      1. 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
        
      2. Make sure you have a project with the key SMT
      3. Enable specs for the repository
      4. 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

            Zuzanna Struczewska made changes -
            Remote Link Original: This issue links to "Page (Confluence)" [ 599185 ]
            Zuzanna Struczewska made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 600076 ]
            Zuzanna Struczewska made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 599185 ]
            Zuzanna Struczewska made changes -
            Symptom Severity Original: Severity 1 - Critical [ 15830 ] New: Severity 2 - Major [ 15831 ]
            Marcin Gardias made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Waiting for Release [ 12075 ] New: Closed [ 6 ]
            Marcin Gardias made changes -
            Status Original: In Review [ 10051 ] New: Waiting for Release [ 12075 ]
            Marcin Gardias made changes -
            Remote Link New: This issue links to "+core+ Dogfooding › Test Git Branch Detection › bugfix-BAM-21403-yaml-repo (tardigrade-bamboo)" [ 576475 ]
            Marcin Gardias made changes -
            Status Original: In Progress [ 3 ] New: In Review [ 10051 ]
            Marcin Gardias made changes -
            Status Original: Waiting for Release [ 12075 ] New: In Progress [ 3 ]
            Marcin Gardias made changes -
            Status Original: In Progress [ 3 ] New: Waiting for Release [ 12075 ]

              mgardias Marcin Gardias
              gribeiro Gabriel Ribeiro
              Affected customers:
              0 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: