-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Medium
-
Affects Version/s: 9.3.0, 9.2.1, 9.2.3, 9.3.1, 9.2.4, 9.3.2, 9.2.5, 9.3.3, 9.3.4, 9.2.6, 9.2.0, 9.2.2, 9.2.7, 9.3.5
-
Component/s: Bamboo Specs
-
None
-
1
-
Severity 3 - Minor
Issue Summary
Adding a new job to Java Specs for non-default plan branch fails to find remote agents available to execute the job when plan is dedicated to remote agents.
This is reproducible on Data Center: yes
Steps to Reproduce
- Create at least one remote agent
- Create a simple Java Specs of a plan that contains one stage and one job. For example:
public Plan plan() { final Plan plan = new Plan(new Project() .oid(new BambooOid("gmye0h9lmfb7")) .key(new BambooKey("PROJ")) .name("PROJ"), "PLAN", new BambooKey("PLAN")) .oid(new BambooOid("gmoosvwdsmwz")) .pluginConfigurations(new ConcurrentBuilds()) .stages(new Stage("Stage 1") .jobs(new Job("Job 1", new BambooKey("JOB1")) .tasks(new VcsCheckoutTask() .description("Checkout Default Repository") .checkoutItems(new CheckoutItem().defaultRepository()), new ScriptTask() .inlineBody("echo \"starting job 1\"")) .dockerConfiguration(new DockerConfiguration() .enabled(false)))) .linkedRepositories("specs-branch") .triggers(new BitbucketServerTrigger()) .planBranchManagement(new PlanBranchManagement() .delete(new BranchCleanup()) .notificationForCommitters()); return plan; } - Create a linked repository and add the Java Specs to this repository and execute a Specs scan in a main branch.
- Create a new branch in the repository and execute the Specs scan of this branch
- Dedicate the remote agent to this plan
- Now add a new job to the newly created branch in the remote repository and execute the Specs scan again. For example:
public Plan plan() { final Plan plan = new Plan(new Project() .oid(new BambooOid("gmye0h9lmfb7")) .key(new BambooKey("PROJ")) .name("PROJ"), "PLAN", new BambooKey("PLAN")) .oid(new BambooOid("gmoosvwdsmwz")) .pluginConfigurations(new ConcurrentBuilds()) .stages(new Stage("Stage 1") .jobs(new Job("Job 1", new BambooKey("JOB1")) .tasks(new VcsCheckoutTask() .description("Checkout Default Repository") .checkoutItems(new CheckoutItem().defaultRepository()), new ScriptTask() .inlineBody("echo \"starting job 1\"")) .dockerConfiguration(new DockerConfiguration() .enabled(false)), new Job("Job 2", new BambooKey("JOB2")) .tasks(new VcsCheckoutTask() .description("Checkout Default Repository") .checkoutItems(new CheckoutItem().defaultRepository()), new ScriptTask() .inlineBody("echo \"starting job 2\"")) .dockerConfiguration(new DockerConfiguration() .enabled(false)))) .linkedRepositories("specs-branch") .triggers(new BitbucketServerTrigger()) .planBranchManagement(new PlanBranchManagement() .delete(new BranchCleanup()) .notificationForCommitters()); return plan; }
Expected Results
The new added job to the plan branch should identify the correct remote agents that are dedicated to execute the plan. The new job shows the message: "No agent can build this job.".
Actual Results
The new added job to the plan branch does not identify the correct remote agents that are dedicated to execute the plan.
Find some screenshoot of the settings used during this test:
-> Agent dedication to the plan

-> Default branch configuration

-> New branch with the new job configuration

Workaround
- Go to Cog Icon >> Agents and remove the dedication for all the remote agents dedicated to the plan. OR
- Instead of dedicating remote agents to build plans dedicate remote agents to build project.