Skip to content

Integrate GitLab Duo Pro bulk add-on assignment API with the UI

Vamsi Vempati requested to merge 442371-integrate-bulk-assignment-api into master

What does this MR do and why?

Integrates the API to bulk assign GitLab Duo Pro add-on for multiple users at a time.

  • Adds loading state for the API call
  • Resets user selection upon successful API call
  • Adds tests

All changes are behind a feature flag, no changelog required.

MR Status
Add ability select multiple users !145889 (merged)
Show confirmation modal with selected users !146444 (merged)
API integration to assign add-on to selected users 👈 👈 👈 You are here
Success alert and error handling 🚧

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.

Scenario Screenshot
SaaS - Bulk assignment

Screen Recording 2024-03-21 at 3.49.13 PM.mov

Loading state

Screen Recording 2024-03-21 at 3.53.31 PM.mov

API request and response

Screenshot 2024-03-21 at 4.00.19 PM.png

Screenshot 2024-03-21 at 4.00.52 PM.png

SM - no change

Screenshot 2024-03-21 at 3.57.49 PM.png

How to set up and validate locally

Application setup

  1. Customers Dot needs to be setup in order to view the billing page for a group
  2. Start GDK in SaaS mode GITLAB_SIMULATE_SAAS=1 gdk start

Group setup

  1. Create a Group
  2. Buy a Subscription for your group from Settings > Billing

Feature flag

Run the following in your rails console

Feature.enable(:hamilton_seat_management, Namespace.find(your-group-id))
Feature.enable(:gitlab_com_duo_pro_bulk_user_assignment, Namespace.find(your-group-id))

Add-on purchase

Purchase an add-on for the subscription purchased above in Group setup step by following the instructions here (under Add Code Suggestions Add-On to a subscription section).

Code Suggestions tab

  1. Visit /groups/<your-namespace-name>/-/usage_quotas#code-suggestions-usage-tab

Related to #442371

Edited by Vamsi Vempati

Merge request reports