Skip to content

Support multiple Duo add-on tiers in Duo management page

What does this MR do and why?

Resolves https://gitlab.com/gitlab-org/gitlab/-/issues/468440+.

This MR uses the new GetAddOnPurchases to retrieve both Duo add-on tiers, if they are both added to the namespace, and sets the page to use the higher one. This is to account for cases where, for example, a namespace would have a Duo Pro add-on, but also a Duo Enterprise trial add-on.

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

Case Screenshot
SaaS: Duo Pro only saas_duo_pro
SaaS: Duo Enterprise only saas_duo_enterprise
SaaS: Duo Pro and Enterprise saas_duo_pro_enterprise
SM/Dedicated: Duo Pro only sm_duo_pro
SM/Dedicated: Duo Enterprise only sm_duo_enterprise
SM/Dedicated: Duo Pro and Enterprise sm_duo_pro_enterprise

How to set up and validate locally

First, enable the feature flags gitlab_duo_usage_menu_item and self_managed_code_suggestions. Then:

  1. Start GDK, CDot, and Zsim.
  2. Set up a user and namespace for testing:
    • For SaaS, create a new user with a new group.
    • For SM, use the root user.
  3. For each test case, create an order in Zuora with an Ultimate subscription and the appropriate Duo add-on tier. Assign it to the group for SaaS, or use the new license from that order for SM/Dedicated.
  4. Navigate to the appropriate page and confirm that the correct add-on tier is used on the page.
Edited by Mohamed Moustafa

Merge request reports

Loading