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

Change detection REST endpoint will not check plan branches when remote trigger is disabled on main plan

    XMLWordPrintable

Details

    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

      1. Setup a plan with a branch plan
      2. Add a repository and a remote trigger
      3. Disable the remote trigger on the main plan
      4. Override the trigger on the branch plan to have it's own remote trigger
      5. 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

      Workaround 1

      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.

      Workaround 2

      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.
      Workaround 3

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jowen@atlassian.com Jeremy Owen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: