Skip to content

Refactor x_ray/scan with CloudConnector::AvailableServices

Nikola Milojevic requested to merge refactor_code_suggestions_and_x_ray into master

What does this MR do and why?

Part of the https://gitlab.com/groups/gitlab-org/-/epics/12556+

Refactor the code to utilize CloudConnector::AvailableServices, for both Gitlab.com and Self-managed instances for for XRay features (to limit the scope of the change).

Our goal is to decouple how add-ons are bundled with the features/services. We should:

  • Replace AccessService.access_token with CloudConnecor::AvailableServices.find_by_name(...).access_token
  • Replace gitlab_duo_pro_add_on check with CloudConnecor::AvailableServices.find_by_name(...).purchased?(current_namespace)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Related to: https://gitlab.com/gitlab-org/gitlab/-/issues/454354

Edited by Nikola Milojevic

Merge request reports