Skip to content

Duo Landing Page Setup for Admin

What does this MR do and why?

IMPORTANT 🛑 DO NOT AUTO MERGE! Please redirect branch to master when approvals are ready. There is a Merge Dependency set in place, but it is on the parent branch currently. Setting branch to parent branch for testing purposes.

The purpose of this MR is to reconfigure set up the initial /gitlab_duo page with the Seat Utilization Card box component for Admin.

We also want to be sure that all old paths redirect to the new gitlab_duo page for now and that by clicking GitLab Duo in the breadcrumbs.

Related Issues:

  • #493379 - Setup Duo Landing Page
  • #493957 - Duo Settings Page - Setup Seat Utilization Box

Related MRs:

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.

THESE CHANGES ARE FOR ADMIN ONLY

Before on Seat Utilization After on Seat Utilization After on GitLab Duo Screen Recording
Screenshot_2024-10-07_at_8.54.52_PM Screenshot_2024-10-08_at_12.06.56_PM Screenshot_2024-10-08_at_12.03.54_PM Screen_Recording_2024-10-08_at_12.05.57_PM

How to set up and validate locally

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

For frontend changes:

You will need an GitLab Ultimate license for these changes as well as a connection to CustomersDot.

In gitlab-development-kit

  • env.runit example
export GITLAB_SIMULATE_SAAS=0
export GITLAB_LICENSE_MODE=test
export LLM_DEBUG=1
export AI_GATEWAY_URL=http://0.0.0.0:5052
export CLOUD_CONNECTOR_SELF_SIGN_TOKENS=1
export CUSTOMER_PORTAL_URL=https://customers.staging.gitlab.com/
  • gdk.yml example to set up CDot
license:
  customer_portal_url: https://customers.staging.gitlab.com
  license_mode: test

Admin - SM Instance

  1. Run GITLAB_SIMULATE_SAAS=0 gdk restart in your GDK.
  2. Go to Admin > AI-powered features > GitLab Duo.
  3. Validate page redirects to admin/gitlab_duo.
  4. Validate title now says GitLab Duo and that breadcrumbs exist.
  5. Click Assign seats, validate it redirects to admin/gitlab_duo/seat_utilization.
  6. Validate health bar and badge tier are removed from the Seat utilization page.
  7. Validate GitLab Duo exists in Breadcrumbs and is highlighted still in Left Nav, Click GitLab Duo, validate you return to admin/gitlab_duo page.
  8. Click Purchase seats, validate you are directed to Customers Staging.

Tests

  1. Run npx jest ee/spec/frontend/usage_quotas/code_suggestions/components/code_suggestions_usage_spec.js

For backend changes:

Tests

  1. Run bundle exec ee/spec/lib/sidebars/admin/menus/ai_powered_features_menu_spec.rb
  2. Run bundle exec ee/spec/lib/sidebars/admin/menus/code_suggestions_menu_spec.rb
  3. Run bundle exec ee/spec/requests/admin/gitlab_duo_controller_spec.rb
Edited by Lindsey Shelton

Merge request reports

Loading