Yaml Specs: branch-overrides[*].other
Asked by Nathan Iwanski:

It would appear you can not override "other" configs with branch-overrides. The docs lead me to believe all configuration is valid and should be merged appropriately, however my experiences have shown otherwise.  

For instance, the main plan has \`other.concurrent-build-plugin: 1\` and a branch override has 8 configured instead. Only the base plan's config is used. Is this to be expected or is it a bug?  

Thank you  

<br />

Edit: I guess going back, the note to the side of the docs says "Miscellaneous plugins configuration on a plan level." which could be taken to mean only the top level config is used. I don't find that very clear in expectations, but maybe that's on me. It would be fantastic if this weren't the case...


Answers:
author: Shashank Kumar
body: Hello Nathan,

Welcome to Atlassian community.

You can look at <https://docs.atlassian.com/bamboo-specs-docs/9.6.5/specs.html?yaml#overriding-branch-settings-using-bamboo-specs> to understand what configs can be changed.

Can you give one example which you trying to change for your branch which is not working?

Regards,

Shashank Kumar

comments: author: Nathan Iwanski
body: Thank you, however those are the docs I'm referencing and they don't appear to communicate the issue at hand. Or that section doesn't, the Miscellaneous Plugins section may allude to it in a note on the side of the yaml documentation.

**tl;dr:**If you override something for a branch, you would expect it to be overridden. It appears there are configurations that can not be overridden, and I do not believe that is clearly communicated if it is the intended behavior.

An example config which would result in a concurrency limit of 1, even on the "main" branch that supposedly overrides this to 8:  

```
---
version: 2
plan:
  project-key: LOCAL
  key: PLAN
  name: Test Plan
triggers:
  - remote
branches:
  create:
    for-new-branch: .*
other:
  concurrent-build-plugin: 1
stages:
  - Build Stage:
      manual: false
      final: false
      jobs:
        - Build Job
  - Test Stage:
      manual: true
      final: false
      jobs:
        - Test Job

Build Job:
  !include "shared/jobs/build.yaml"

Test Job:
  !include "shared/jobs/test.yaml"

branch-overrides:
  - main:
      other:
        concurrent-build-plugin: 8
      stages:
        - Build Stage:
            manual: false
            final: true
            jobs:
              - Build Job
        - Test Stage:
            manual: false
            final: true
            jobs:
              - Test Job
        - Release Stage:
            manual: false
            final: true
            jobs:
              - Release Job
      Build Job:
        !include "shared/jobs/build.yaml"
      Test Job:
        !include "shared/jobs/test.yaml"
      Release Job:
        !include "shared/jobs/release.yaml"
```


author: Shashank Kumar
body: Hello Nathan,

Yes you are right. There are few properties which you cannot override like the one example which you specified.

I don't know if this is a bug or a intended behaviour, I will check this internally with the right people and provide an update here.

Regards,

Shashank Kumar


author: Shashank Kumar
body: Hello Nathan,

I did check this internally and feedback is that **branch-override** will override only the attributes for branches which you are able to change from GUI for a plan branches, see the below screen. Anything which gets tagged to the default plan configuration will not get changed via branch override.

For this you can probably use Specs branches and modify the individual specs file for each branch if you wish to have specific configuration for each branch but that will work after the branch is created.

I agree the documentation is not very clear about this, probably this can be improved a little

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/346620iA1ABB96CF6A32F83/image-size/large?v=v2&px=999 "image.png")


Tags: bug

spec

yaml