Skip to content

Set Up Group Routes for GitLab Duo LP and Seat Utilization Pages

What does this MR do and why?

The purpose of this MR is to reconfigure the current routes for the GitLab Duo page for Groups to /gitlab_duo/seat_utilization while work is being done to create the new landing page under /gitlab_duo.

We also want to be sure that all old paths redirect to the new gitlab_duo/seat_utilization page for now and that by clicking GitLab Duo in the breadcrumbs, we are redirected to the Seat Utilization page until the Duo page work is ready.

Related Issues:

  • #496289 (closed) - Duo Settings Page - Reroute GitLab Duo as Seat Utilization Page
  • #497584 (closed) - Create new Routes for GitLab Duo for Groups to direct to new Seat Utilization Page

Related MRs:

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 on Groups After on Groups After Screen Recording on Groups
Screenshot_2024-10-02_at_8.43.24_PM Screenshot_2024-10-04_at_2.46.14_PM Screen_Recording_2024-10-04_at_2.46.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=1
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

Group - SaaS Instance 0. Run GITLAB_SIMULATE_SAAS=1 gdk restart in your GDK.

  1. Go to Group > Settings > GitLab Duo.
  2. Validate page redirects to /-/settings/gitlab_duo/seat_utilization.
  3. Validate title now says Seat utilization and that breadcrumbs exist.
  4. Use the following path /-/settings/gitlab_duo_usage, and validate that it also redirects to /-/settings/gitlab_duo_seat_utilization.

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 rspec ee/spec/features/gitlab_subscriptions/trials/duo_enterprise/creation_with_multiple_existing_namespace_flow_spec.rb
  2. Run bundle exec rspec ee/spec/features/gitlab_subscriptions/trials/duo_enterprise/creation_with_one_existing_namespace_flow_spec.rb
  3. Run bundle exec rspec ee/spec/features/gitlab_subscriptions/trials/duo_pro/creation_with_multiple_existing_namespace_flow_spec.rb
  4. Run bundle exec rspec ee/spec/features/gitlab_subscriptions/trials/duo_pro/creation_with_one_existing_namespace_flow_spec.rb
  5. Run bundle exec rspec ee/spec/features/groups/settings/gitlab_duo_spec.rb
  6. Run bundle exec rspec ee/spec/helpers/ee/groups_helper_spec.rb
  7. Run bundle exec rspec ee/spec/lib/ee/sidebars/groups/menus/settings_menu_spec.rb
  8. Run bundle exec rspec ee/spec/lib/nav/gitlab_duo_settings_page_spec.rb
  9. Run bundle exec rspec ee/spec/presenters/gitlab_subscriptions/trials/duo_pro_status_widget_presenter_spec.rb
  10. Run bundle exec rspec ee/spec/requests/gitlab_subscriptions/trials/duo_enterprise_controller_spec.rb
  11. Run bundle exec rspec ee/spec/requests/gitlab_subscriptions/trials/duo_pro_controller_spec.rb
  12. Run bundle exec rspec ee/spec/requests/groups/settings/gitlab_duo/seat_utilization_controller_spec.rb
  13. Run bundle exec rspec ee/spec/views/groups/add_ons/discover_duo_pro/show.html.haml_spec.rb
Edited by Lindsey Shelton

Merge request reports

Loading