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

Triggering a build using the Queue API can cause deserialize error

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • Triggers
    • None
    • 3
    • 1
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Issue Summary

      When triggering a build using the Queue API, if the body contains any unexpected JSON the system will attempt to deserialize it into an java.util.ArrayList and fail.

      This results in the build not executing. The body content is not required to trigger the build, so unexpected valid JSON should not cause the command to stop.

      Example: Using the Bitbucket server webhook to trigger builds without change detection.

      Steps to Reproduce

      1. POST to the Queue API with a valid JSON payload.

      Expected Results

      The server begins building the plan.

      Actual Results

      The server returns an error 400 with the following:

      {"message":"Can not deserialize instance of java.util.ArrayList out of VALUE_STRING token\n at [Source: org.apache.catalina.connector.CoyoteInputStream@47331eb5; line: 1, column: 2]","status-code":400}
      

      Nothing is shown in the bamboo log files.

      Workaround

      If you have control over the POST payload, ensure each value is in an array. E.g:

      {
           "bamboo.variable.1": ["somevalue"],
           "bamboo.variable.2": ["somevalue"]
      }
      

              Unassigned Unassigned
              ephillips@atlassian.com Edward
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: