Summary
Executable dropdown in task configuration does not contain builder executable if a different type exists with same label. Example, if we have:
- Command executable labelled 'Visual Studio 2015': system.builder.command.Visual Studio 2015
- Visual Studio executable labelled 'Visual Studio 2015': system.builder.devenv.Visual Studio 2015
Visual Studio 2015 will not be selectable within the Visual Studio task.
It may also affect other executables, such as Maven. E.g. having the same label for a Maven 2 and Maven 3 capability:
system.builder.mvn3.Maven 3.3.9
system.builder.mvn2.Maven 3.3.9
This is not re-createable under all circumstances as it appears to be dependent on the order of rows returned to the database which is unreliable across DBMS.
Environment
- MS SQL (The bug is likely DBMS agnostic, but it's just easy to have a reproduction use case due to the row ordering on MS SQL)
Steps to Reproduce
- Using a Bamboo database on MS SQL:
- Bamboo Administration > Overview > Server Capabilities > Add capability
Capability type: Executable
Type: Command
Label: Visual Studio 2015
Path: c:
- Bamboo Administration > Overview > Server Capabilities > Add capability
Capability type: Executable
Type: Visual Studio
Label: Visual Studio 2015
Path: c:
- Plan Configuration > Job > Add Task > Visual Studio
- Select executable dropdown – EMPTY
Expected Results
The capability is present for the entry:
Capability type: Executable
Type: Visual Studio
Label: Visual Studio 2015
Path: c:
Actual Results
No executables are present in the dropdown (duplicate labels can result in an empty executable dropdown)
Workaround
Remove any command capabilities that share a duplicate label with a specific typed builder capability (e.g. Visual Studio, Grails, etc)
The below SQL query may help you verify the presence of other capabilities with the same label but different builders to confirm if this bug is affecting you and where/which agent the conflicting capabilities may come from. Replace Maven 3.3.9 with the capability label that is now showing up:
select *
from CAPABILITY c
left outer join CAPABILITY_SET cs on (c.CAPABILITY_SET = cs.CAPABILITY_SET_ID)
left outer join QUEUE q on q.CAPABILITY_SET = cs.CAPABILITY_SET_ID
where KEY_IDENTIFIER LIKE '%Maven 3.3.9';
- The label is the last segement of the capability key. E.g. in system.builder.mvn3.Maven 3.3.9 the label is Maven 3.3.9
- The builder is anything before it. E.g. in system.builder.mvn3.Maven 3.3.9 the builder is system.builder.mvn3