Resolve "Multiple clusters: incorrect cluster details injected - environment scope is ignored"
What does this MR do?
Resolves incorrect output of deployment_platform when the Project has multiple clusters and multiple environments
Why was this MR needed?
Same kubernetes_platform was being returned on deployment_platform method, completely ignoring the environment argument on EE. This was resolved by rearranging DeploymentPlatform methods in the following way:
- Change
find_cluster_platform_kubernetesto search for a specific environment on EE, and ignore environment argument on CE - Override
find_cluster_platform_kubernetesanddeployment_platformmethods - Remove memoization from
deployment_platformon EE, otherwise when searching for another platform, once the first one is assigned, environment parameter is completely ignored
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Tests added for this feature/bug - Review
-
Has been reviewed by Backend
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered -
End-to-end tests pass ( package-qamanual pipeline job)
What are the relevant issue numbers?
Closes #5347 (closed)
CE Port: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/17904
Edited by Kamil Trzciński