Skip to content

Generalize Duo Pro copy to Duo in Duo management pages

What does this MR do and why?

Resolves the gitlab part of https://gitlab.com/gitlab-org/gitlab/-/issues/464471+.

This MR further generalizes the Duo Pro copy to Duo, in the Gitlab.com Usage Quotas page (/groups/:group_id/-/usage_quotas#code-suggestions-usage-tab) and the self-managed / Dedicated admin page (/admin/code_suggestions).

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

General
Case Before After
Introducing GitLab Duo CTA before_introducing_duo_pro after_introducing_duo_pro
Bulk Assignments
Case Before After
Confirm assignment (singular) before_bulk_assignment_confirm_singular after_bulk_assignment_confirm_singular
Confirm assignment (plural) before_bulk_assignment_confirm_plural after_bulk_assignment_confirm_plural
Confirm unassignment (singular) before_bulk_unassignment_confirm_singular after_bulk_unassignment_confirm_singular
Confirm unassignment (plural) before_bulk_unassignment_confirm_plural after_bulk_unassignment_confirm_plural
Errors
Case Before After
Not enough seats error before_not_enough_seats_error after_not_enough_seats_error
No seats available error before_no_seats_available_error after_no_seats_available_error
General add-on assignment error before_general_add_on_assignment_error after_general_add_on_assignment_error
General add-on unassignment error before_general_add_on_unassignment_error after_general_add_on_unassignment_error
General add-on bulk assignment error before_general_add_on_bulk_assignment_error after_general_add_on_bulk_assignment_error
General add-on bulk unassignment error before_general_add_on_bulk_unassignment_error after_general_add_on_bulk_unassignment_error
Add-on purchase fetch error before_addon_purchase_fetch_error after_addon_purchase_fetch_error
Add-on eligible users fetch error before_add_on_eligible_users_fetch_error after_add_on_eligible_users_fetch_error

How to set up and validate locally

Gitlab.com

  1. Set up GDK and CDot.
  2. Turn on the gitlab_com_duo_pro_bulk_user_assignment feature flag in GDK.
  3. Create a new user with a group, with a Premium or Ultimate subscription.
  4. Visit /groups/:group_id/-/usage_quotas#code-suggestions-usage-tab.
  5. Confirm the "Introduce GitLab Duo" CTA copy has changed as expected.
  6. Purchase Duo Pro add-on seats for that group to access the rest of the Duo management UI.
  7. Confirm the bulk assignment confirmation copy has changed as expected.
  8. To test the error messages:
    1. Apply no_seats_available_error.patch, which will return an error for any individual seat assignment.
    2. Alter the NO_SEATS_AVAILABLE_ERROR value in usage_quotas/error_contants.js to whichever error you'd like to test.
    3. Assign a seat for any user to display the error message.
    4. Confirm all error messages changed as expected.

Self-managed / Dedicated

  1. Set up GDK and CDot.
  2. Turn on the sm_duo_pro_bulk_user_assignment feature flag in GDK.
  3. Log in as the admin user, ensuring the instance has a Premium or Ultimate subsciption. Follow the same steps as the Gitlab.com section, visiting /admin/code_suggestions instead in step 4.
Edited by Mohamed Moustafa

Merge request reports