Details
-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
6.2.2, 6.9.2
-
1
-
Severity 3 - Minor
-
Description
Issue Summary
When POSTing to the Bamboo change detection REST endpoint for the master plan and skipBranches=false, E.g.:
/rest/triggers/1.0/remote/changeDetection?planKey=MASTER-PLAN&skipBranches=false
If the Remote Trigger is disabled on the main plan, the plan branches are not checked (even if they override the trigger configuration with their own, enabled, remote trigger). It fails with the below message as only the master is checked:
<errors>
<error>The plan [MASTER - PLAN] is not configured for remote triggering.</error>
</errors>
Steps to Reproduce
- Setup a plan with a branch plan
- Add a repository and a remote trigger
- Disable the remote trigger on the main plan
- Override the trigger on the branch plan to have it's own remote trigger
- Fire off the below curl:
curl -H 'X-Atlassian-Token: no-check' -X POST 'http://localhost:8085/rest/triggers/1.0/remote/changeDetection?planKey=MASTER-PLAN&skipBranches=false'
Expected Results
If skipBranches=false, all plan branches with an overriding remote trigger should be checked for changes.
Actual Results
No change detection occurs.
It fails with the below error:
<errors>
<error>The plan [MASTER - PLAN] is not configured for remote triggering.</error>
</errors>
Workaround
You could re-enable the remote trigger on the main plan configuration. The side effect will be that the main plan will trigger if there are changes on the branch it's pointed to at Plan Configuration >> Repositories whenever Bitbucket gets changes on a branch.
You could Disable the main plan at Plan Configuration >> Actions >> Disable plan. This means that the main plan will be skipped in the change detection process, and only branches that inherit the remote trigger or override it to have a remote trigger will be checked.
Limitations:
- If you only want a limited number of branch plans to be checked you would need to override the trigger on the plans you don't want to be triggered and remove the trigger.
- You can no longer build the main plan without re-enabling it. You could also create a branch plan that points to the same branch as the main plan if you wanted to build that.
You could abandon the remote trigger and override the branch plan trigger to Repository Polling instead. Bamboo will then reach out and check for changes periodically/on a schedule and not rely on the inbound web hook.