Skip to content

Support bamboo api polymorphism

What does this MR do?

In https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21970 we changed the way we read results from Bamboo REST API following observation that Bamboo returns an array of results, rather than a single result as previously assumed. This was consistent with the Bamboo API reference indicating an array of results is returned.

However, new observations indicate that Bamboo's REST API does not actually return a consistent data structure: it may return a single result or an array of results. It remains unclear whether an array is returned if and only if size >= 2.

This MR merges the behavior of https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21970 and previous behavior to support both data structures that Bamboo might return: with and without array.

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/51950

Does this MR meet the acceptance criteria?

Edited by Grzegorz Bizon

Merge request reports